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:
Deadcode committed 2026-10-20 21:05:16 +02:00
1 parent 685ec5bd85
commit 4246a1dd04
124 files changed
+14326 -387

No files matched your search

+26
View File
@@ -937,6 +937,32 @@ static int declare(RadBuilder* b, const RadModelMeta* meta, const RadBuildCtx* c
m.b_mask = decl_b(b, nm.f("lat_mask"), RAD_F32, { lane_rows, 1 }, RAD_BUF_PERSIST);
m.b_store = decl_b(b, nm.f("cond_store"), RAD_BF16,
{ 2 * (int64_t)kMaxLanes * cond_rows(), gd.n_embd }, RAD_BUF_PERSIST);
/* ---- adapter key names. LoRA files name the blocks by Black Forest Labs' modules, as
* ComfyUI loads them (comfy/ldm/flux3): `single_blocks.N.q_proj` or a fused `qkv`,
* `attn_out`, `mlp_in`, `mlp_out`, and the mode blocks under `content_mode_blocks`. */
{
const int64_t Q = gd.n_head_all * gd.head_dim;
std::vector<LoraName> n;
static const char* const kBlocks[][2] = {
{ "single_blocks.#.", "single_transformer_blocks.#." },
{ "txt_mode_blocks.#.", "txt_mode_blocks.#." },
{ "content_mode_blocks.image.#.", "mode_blocks.image.#." },
{ "content_mode_blocks.image_cond.#.", "mode_blocks.image_cond.#." },
};
for (const auto& bl : kBlocks) {
const std::string f = bl[0], t = bl[1];
n.push_back({ f + "q_proj", t + "attn.to_q" });
n.push_back({ f + "k_proj", t + "attn.to_k" });
n.push_back({ f + "v_proj", t + "attn.to_v" });
n.push_back({ f + "qkv", t + "attn.to_q", 0, Q, 0 });
n.push_back({ f + "qkv", t + "attn.to_k", Q, 2 * Q, 0 });
n.push_back({ f + "qkv", t + "attn.to_v", 2 * Q, 3 * Q, 0 });
n.push_back({ f + "attn_out", t + "attn.to_out.0" });
n.push_back({ f + "mlp_in", t + "ff.linear_in" });
n.push_back({ f + "mlp_out", t + "ff.linear_out" });
}
RAD_ARCH_TRY(lora_names(b, "transformer.", kLoraDiffusionSpellings, n));
}
RAD_ARCH_TRY(declare_te(b, meta, m));
RAD_ARCH_TRY(declare_encoder(b, meta, m));
RAD_ARCH_TRY(declare_dit(b, meta, m));