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
+35
-2
@@ -918,7 +918,7 @@ TEST(raw_operand_carries_the_pointer_and_refuses_an_offset) {
|
||||
* lora_shrink and lora_expand over its own activation, output and rows, but only on a step that
|
||||
* has an adapter row (RadBatch::lora_slot non-null). A step without one, or a draft pass, issues
|
||||
* the gemm alone, the pass an engine without adapters runs; an encoder pass reaching a site is
|
||||
* refused by name. */
|
||||
* refused by name; a generator pass runs its one slot in every row. */
|
||||
static int k_gemm (const RadArgs* a, RadStream s) { return record("gemm", a, s); }
|
||||
static int k_shrink(const RadArgs* a, RadStream s) { return record("shrink", a, s); }
|
||||
static int k_expand(const RadArgs* a, RadStream s) { return record("expand", a, s); }
|
||||
@@ -933,6 +933,7 @@ TEST(adapter_ops_follow_a_lora_site_only_on_a_step_with_an_adapter_row) {
|
||||
const rad_buf ps = f.add_buffer("lora.scale", RAD_F32, 2, 8, 1536);
|
||||
const rad_buf t0 = f.add_buffer("lora.t0", RAD_F32, 16, 4, 2048);
|
||||
const rad_buf t1 = f.add_buffer("lora.t1", RAD_F32, 16, 4, 2304);
|
||||
const rad_buf rows = f.add_buffer("lora.rows", RAD_I32, 32, 1, 2560); /* [S * 16] */
|
||||
const rad_op g = f.add_op("gemm_nt", "M", { 64 }, { k_gemm }, { "gemm" }, &g_gemm_schema, { w });
|
||||
const rad_op sh = f.add_op("lora_shrink", "M", { 64 }, { k_shrink }, { "shrink" }, nullptr, {});
|
||||
const rad_op ex = f.add_op("lora_expand", "M", { 64 }, { k_expand }, { "expand" }, nullptr, {});
|
||||
@@ -955,6 +956,8 @@ TEST(adapter_ops_follow_a_lora_site_only_on_a_step_with_an_adapter_row) {
|
||||
scr.R = 4;
|
||||
scr.lane[0] = t0; scr.lane[1] = t1;
|
||||
f.P.lora_t.push_back(scr);
|
||||
f.P.lora_rows = rows;
|
||||
f.P.lora_rows_n = 16;
|
||||
CHECK_OK(f.start());
|
||||
|
||||
auto body = [&](Ctx& c) {
|
||||
@@ -1002,8 +1005,38 @@ TEST(adapter_ops_follow_a_lora_site_only_on_a_step_with_an_adapter_row) {
|
||||
c.issue(g, opd, 3, RAD_N_BATCH);
|
||||
});
|
||||
CHECK_EQ(s, RAD_E_UNSUPPORTED);
|
||||
CHECK(std::strstr(f.ctx.step_error(), "encoder or generator pass") != nullptr);
|
||||
CHECK(std::strstr(f.ctx.step_error(), "encoder pass") != nullptr);
|
||||
CHECK_EQ(names(), std::string("gemm"));
|
||||
|
||||
/* A generator pass runs one slot in every row, whatever the gemm's rows are: its slot operand
|
||||
* is that slot's run of the slot-row table; with no slot, the gemm alone. */
|
||||
f.batch.enc = 0;
|
||||
f.batch.gen = RAD_GEN_PASS_DENOISE;
|
||||
f.batch.lora_slot = nullptr;
|
||||
f.ctx.set_gen_lora_slot(-1);
|
||||
g_rec.clear();
|
||||
CHECK_OK(f.step(4, 4, body));
|
||||
CHECK_EQ(names(), std::string("gemm"));
|
||||
f.ctx.set_gen_lora_slot(1);
|
||||
g_rec.clear();
|
||||
CHECK_OK(f.step(4, 5, body));
|
||||
REQUIRE_EQ(names(), std::string("gemm shrink expand"));
|
||||
CHECK(g_rec[1].t[2].data == (void*)((char*)f.ctx.buf_ptr(rows) + 1 * 16 * 4));
|
||||
CHECK_EQ(g_rec[1].t[2].shape[0], (int64_t)4);
|
||||
CHECK(g_rec[2].t[1].data == g_rec[1].t[2].data);
|
||||
/* Rows past the slot table's run are issued in chunks of it, each over its own rows. */
|
||||
f.P.lora_rows_n = 3;
|
||||
g_rec.clear();
|
||||
CHECK_OK(f.step(4, 6, body));
|
||||
REQUIRE_EQ(names(), std::string("gemm shrink expand shrink expand"));
|
||||
CHECK_EQ(g_rec[1].t[0].shape[0], (int64_t)3);
|
||||
CHECK_EQ(g_rec[3].t[0].shape[0], (int64_t)1);
|
||||
CHECK(g_rec[3].t[0].data == (void*)((char*)g_rec[1].t[0].data + 3 * 4 * 2)); /* x row 3 */
|
||||
CHECK(g_rec[4].t[4].data == (void*)((char*)g_rec[2].t[4].data + 3 * 8 * 2)); /* y row 3 */
|
||||
CHECK(g_rec[3].t[2].data == (void*)((char*)f.ctx.buf_ptr(rows) + 1 * 3 * 4));
|
||||
f.P.lora_rows_n = 16;
|
||||
f.ctx.set_gen_lora_slot(-1);
|
||||
f.batch.gen = 0;
|
||||
}
|
||||
|
||||
/* Site is a property of the weights (spec §5.1). A domain with no kernel in some band is refused,
|
||||
|
||||
Reference in new issue
Block a user