Archived
radiance 1.10.0
LoRA for image and video generators: - civitai and Hugging Face adapter files as published: kohya, ComfyUI and diffusers/PEFT key names; LoRA, LoCon, LoHa, LoKr and full-weight diffs; DoRA, OFT and Tucker are refused by name - stacked per request with a strength each, through the `loras` field or <lora:name:strength> tags in the prompt; --lora-dir serves every file in a directory, GET /v1/loras lists them, and --max-loras / --max-lora-rank size the slots on the card (generators default to rank 64) - Krea 2, Qwen-Image 2.1, FLUX.3 [klein], MiniMax H3, LTX-2.5, Anima and SDXL New models: - Anima (base, aesthetic and turbo): Cosmos-Predict2 DiT with the Qwen3-0.6B text encoder and the Qwen-Image VAE, on one card - Stable Diffusion XL and its single-file finetunes (Illustrious, NoobAI including V-Pred, Pony), read as civitai ships them, with the Euler, Euler a and DPM++ 2M samplers Recipes: - q38-27b-mxfp4-df2: any bf16 Qwen3.8-27B or finetune at MXFP4 with the DFlash2 drafter - Krea 2 finetunes from civitai: scripts/krea2_native.py reads Krea's own key names, and krea-2-fp8-unscaled keeps a plain-fp8 file's codes exactly Changes: --max-num-batched-tokens defaults to 2048 (was 8192). Plugin ABI 25: out-of-tree plugins must be rebuilt.
This commit is contained in:
1 parent
685ec5bd85
commit
4246a1dd04
124 files changed
+14326
-387
No files matched your search
@@ -297,6 +297,36 @@ static int check_format(const RadModelMeta* meta) {
|
||||
return RAD_OK;
|
||||
}
|
||||
|
||||
/* ================================================================== adapter key names */
|
||||
/* LoRA files for Krea 2 name the DiT and the text fusion by the reference code's modules
|
||||
* (krea-ai/krea-2 mmdit.py): `blocks.N.attn.wq`, `txtfusion.refiner_blocks.N.mlp.up`, `tproj.1`;
|
||||
* the container keeps diffusers' names. The language model takes no adapters. */
|
||||
static int declare_lora_names(RadBuilder* b) {
|
||||
std::vector<LoraName> n;
|
||||
static const char* const kInner[][2] = {
|
||||
{ "attn.wq", "attn.to_q" }, { "attn.wk", "attn.to_k" }, { "attn.wv", "attn.to_v" },
|
||||
{ "attn.wo", "attn.to_out.0" }, { "attn.gate", "attn.to_gate" },
|
||||
{ "mlp.gate", "ff.gate" }, { "mlp.up", "ff.up" }, { "mlp.down", "ff.down" },
|
||||
};
|
||||
static const char* const kBlocks[][2] = {
|
||||
{ "blocks.#.", "transformer_blocks.#." },
|
||||
{ "txtfusion.layerwise_blocks.#.", "text_fusion.layerwise_blocks.#." },
|
||||
{ "txtfusion.refiner_blocks.#.", "text_fusion.refiner_blocks.#." },
|
||||
};
|
||||
for (const auto& bl : kBlocks)
|
||||
for (const auto& in : kInner)
|
||||
n.push_back({ std::string(bl[0]) + in[0], std::string(bl[1]) + in[1] });
|
||||
n.push_back({ "txtfusion.projector", "text_fusion.projector" });
|
||||
n.push_back({ "txtmlp.1", "txt_in.linear_1" });
|
||||
n.push_back({ "txtmlp.3", "txt_in.linear_2" });
|
||||
n.push_back({ "first", "img_in" });
|
||||
n.push_back({ "last_linear", "final_layer.linear" });
|
||||
n.push_back({ "tmlp.0", "time_embed.linear_1" });
|
||||
n.push_back({ "tmlp.2", "time_embed.linear_2" });
|
||||
n.push_back({ "tproj.1", "time_mod_proj" });
|
||||
return lora_names(b, "transformer.", kLoraDiffusionSpellings, n);
|
||||
}
|
||||
|
||||
/* ================================================================== declare */
|
||||
static int declare_te(RadBuilder* b, const RadModelMeta* meta, Model& m) {
|
||||
Geom& g = m.gt;
|
||||
@@ -1059,6 +1089,7 @@ static int declare(RadBuilder* b, const RadModelMeta* meta, const RadBuildCtx* c
|
||||
m.b_prev = decl_b(b, nm.f("lat_preview"), RAD_BF16, { lane_rows, m.C }, RAD_BUF_PERSIST);
|
||||
m.b_store = decl_b(b, nm.f("cond_store"), RAD_BF16,
|
||||
{ 2 * (int64_t)kMaxLanes * kCondRows, gd.n_embd }, RAD_BUF_PERSIST);
|
||||
RAD_ARCH_TRY(declare_lora_names(b));
|
||||
RAD_ARCH_TRY(declare_te(b, meta, m));
|
||||
RAD_ARCH_TRY(declare_fusion(b, meta, m));
|
||||
RAD_ARCH_TRY(declare_dit(b, meta, m));
|
||||
|
||||
Reference in new issue
Block a user