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
+14
-3
@@ -22,6 +22,7 @@
|
||||
#include <sstream>
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <cstring>
|
||||
#include <vector>
|
||||
@@ -129,7 +130,8 @@ TEST(the_kl_mode_records_or_scores_and_says_which_input_it_lacks) {
|
||||
|
||||
/* Runtime LoRA: the adapters reach their fields in order, the targets as sorted leaf names, and a
|
||||
* combination that would size slots no adapter uses, or name an adapter that is not served, is
|
||||
* refused by name. */
|
||||
* refused by name. A text model's slot count against its adapters, and its targets, are checked
|
||||
* at startup, where the engine knows whether the model generates text. */
|
||||
TEST(the_lora_flags_reach_their_fields_and_refuse_what_serves_no_adapter) {
|
||||
Config c;
|
||||
CHECK_OK(parse({ "--lora", "b=/ad/b", "--lora", "a=/ad/a", "--max-loras", "3",
|
||||
@@ -144,6 +146,15 @@ TEST(the_lora_flags_reach_their_fields_and_refuse_what_serves_no_adapter) {
|
||||
Config d;
|
||||
CHECK_OK(parse({}, &d));
|
||||
CHECK(!d.lora.enabled());
|
||||
CHECK_EQ(d.lora.rank(false), 16);
|
||||
CHECK_EQ(d.lora.rank(true), 64);
|
||||
Config e;
|
||||
const std::string dir = radtest::tmp_path("loradir");
|
||||
mkdir(dir.c_str(), 0755);
|
||||
CHECK_OK(parse({ "--lora-dir", dir.c_str() }, &e));
|
||||
CHECK(e.lora.enabled());
|
||||
CHECK_EQ(e.lora.slots(), 2);
|
||||
CHECK_EQ(e.lora.rank(true), 64);
|
||||
|
||||
auto refused = [](std::initializer_list<const char*> v, const char* why) {
|
||||
int st = RAD_OK;
|
||||
@@ -157,10 +168,9 @@ TEST(the_lora_flags_reach_their_fields_and_refuse_what_serves_no_adapter) {
|
||||
refused({ "--lora", "/ad/a" }, "NAME=PATH");
|
||||
refused({ "--lora", "a=" }, "NAME=PATH");
|
||||
refused({ "--lora", "a=/x", "--lora", "a=/y" }, "names the adapter 'a' twice");
|
||||
refused({ "--lora", "a=/x", "--lora", "b=/y", "--max-loras", "1" }, "fewer adapters");
|
||||
refused({ "--max-lora-rank", "32" }, "--max-lora-rank sizes runtime LoRA slots");
|
||||
refused({ "--lora-target-modules", "q_proj" }, "--lora-target-modules sizes");
|
||||
refused({ "--max-loras", "2" }, "names no module an adapter may target");
|
||||
refused({ "--lora-dir", "/no/such/dir" }, "is not a directory");
|
||||
refused({ "--lora", "a=/x", "--lora-target-modules", "self_attn.q_proj" }, "leaf names");
|
||||
refused({ "--lora", "a=/x", "--lora-target-modules", ".*proj" }, "leaf names");
|
||||
refused({ "--lora", "a=/x", "--lora-target-modules", " , " }, "names no module");
|
||||
@@ -454,6 +464,7 @@ const std::map<std::string, std::vector<std::string>>& legal_values() {
|
||||
{ "--kld-corpus", { "/c.jsonl", "--kld-record", "/r" } },
|
||||
{ "--kld-out", { "/o.json", "--kld-ref", "/r" } },
|
||||
{ "--lora", { "a=/adapters/a" } },
|
||||
{ "--lora-dir", { "/" } },
|
||||
{ "--max-loras", { "2", "--lora-target-modules", "q_proj" } },
|
||||
{ "--max-lora-rank", { "32", "--lora", "a=/adapters/a" } },
|
||||
{ "--lora-target-modules", { "q_proj,v_proj", "--max-loras", "1" } },
|
||||
|
||||
Reference in new issue
Block a user