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
@@ -48,6 +48,9 @@ struct Branch {
|
||||
std::vector<int32_t> tokens;
|
||||
std::shared_ptr<mm::PromptMedia> media; /* null for a prompt with no pictures */
|
||||
int32_t n_drop = 0;
|
||||
/* The user's prompt through the model's second tokenizer (RadGeneratorDecl::aux_tokens);
|
||||
* empty otherwise. */
|
||||
std::vector<int32_t> aux;
|
||||
};
|
||||
|
||||
/* One finished image, or a preview of one. */
|
||||
@@ -99,6 +102,8 @@ struct Request {
|
||||
float cfg = 1.0f;
|
||||
int32_t width = 0, height = 0; /* pixels, whole multiples of the declared multiple */
|
||||
int32_t steps = 0; /* 0: the model's default (or its fixed schedule) */
|
||||
/* A discrete-time model's sampler and scheduler (RAD_GEN_SAMPLER_*, RAD_GEN_SCHED_*). */
|
||||
int32_t sampler = 0, scheduler = 0;
|
||||
int32_t n = 1;
|
||||
uint64_t seed = 0; /* image i draws its noise from seed + i */
|
||||
int32_t previews = 0; /* partial images per image, 0..3 */
|
||||
@@ -109,6 +114,10 @@ struct Request {
|
||||
bool inpaint = false;
|
||||
Pixels inp_src;
|
||||
std::vector<float> inp_mask;
|
||||
/* The runtime LoRA slot every pass of the request runs with (Engine::gen_lora_acquire), -1
|
||||
* for none, and the hold that keeps the slot's adapters in it until the request is done. */
|
||||
int32_t lora_slot = -1;
|
||||
std::shared_ptr<void> lora_hold;
|
||||
std::shared_ptr<Ticket> ticket;
|
||||
};
|
||||
|
||||
@@ -119,6 +128,31 @@ struct Request {
|
||||
std::vector<float> schedule(const RadGeneratorDecl& d, const std::vector<double>& fixed,
|
||||
int32_t steps, int64_t tokens);
|
||||
|
||||
/* ================================================================== a discrete-time schedule */
|
||||
/* The sigma table of a model trained on discrete timesteps (RadGeneratorDecl::train_steps), as
|
||||
* ComfyUI's ModelSamplingDiscrete builds it: betas in f64, their cumulative product, sigma_t =
|
||||
* sqrt((1 - abar_t) / abar_t), then f32, and the f32 logs. */
|
||||
struct DiscreteTable {
|
||||
std::vector<float> sigmas; /* [train_steps], ascending: sigmas[t] is timestep t's */
|
||||
std::vector<float> log_sigmas;
|
||||
float sigma_min() const { return sigmas.front(); }
|
||||
float sigma_max() const { return sigmas.back(); }
|
||||
/* sigma at a fractional timestep: the logs interpolated linearly, t clamped to the table. */
|
||||
float sigma_at(double t) const;
|
||||
/* The timestep a sigma is conditioned at: the table's nearest in log sigma. */
|
||||
int32_t timestep(float sigma) const;
|
||||
};
|
||||
/* RAD_E_INVAL with `why` for a declaration whose schedule cannot be built. */
|
||||
int discrete_table(const RadGeneratorDecl& d, DiscreteTable* out, std::string* why);
|
||||
/* The n + 1 sigmas `scheduler` places for `steps` (0: the default) steps, the last 0. */
|
||||
std::vector<float> schedule_discrete(const RadGeneratorDecl& d, const DiscreteTable& t,
|
||||
int32_t scheduler, int32_t steps);
|
||||
/* The names a request spells samplers and schedulers by, and their ids (-1: none). */
|
||||
const char* sampler_name(int32_t id);
|
||||
const char* scheduler_name(int32_t id);
|
||||
int32_t sampler_id(const std::string& name);
|
||||
int32_t scheduler_id(const std::string& name);
|
||||
|
||||
/* ================================================================== the generator's sequence */
|
||||
/* One conditioning sequence as the generator sees it (RadGeneratorDecl::layout): the prompt row or
|
||||
* reference latent row behind each row, rotary positions, segments, and the output image's frame. */
|
||||
|
||||
Reference in new issue
Block a user