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
@@ -0,0 +1,16 @@
|
||||
# anima-bf16.recipe -- Anima (Base, Aesthetic or Turbo) at bf16.
|
||||
#
|
||||
# rad-convert <Anima>/split_files/diffusion_models/anima-aesthetic-v1.1.safetensors \
|
||||
# --add <Anima>/split_files/text_encoders/qwen_3_06b_base.safetensors \
|
||||
# --add <Anima>/split_files/vae/qwen_image_vae.safetensors \
|
||||
# --config <Qwen/Qwen3-0.6B-Base> --tokenizer2 <ComfyUI>/comfy/text_encoders/t5_tokenizer/tokenizer.json \
|
||||
# --arch anima --set anima.variant=aesthetic \
|
||||
# --recipe data/recipes/anima-bf16.recipe -o anima-aesthetic-bf16.rad
|
||||
#
|
||||
# Every linear stays as the release holds it (bf16). Two weights are computed at convert, in f32,
|
||||
# and stored bf16 here: the patch embedding without its padding-mask columns, and the VAE's causal
|
||||
# 3-D convolutions read at their last temporal tap.
|
||||
|
||||
dit.x_embed.weight cast dtype=bf16
|
||||
decoder.* cast dtype=bf16
|
||||
conv2.* cast dtype=bf16
|
||||
@@ -0,0 +1,31 @@
|
||||
# anima-fp8.recipe -- Anima (Base, Aesthetic or Turbo) with block-scaled fp8 linears.
|
||||
#
|
||||
# rad-convert <Anima>/split_files/diffusion_models/anima-aesthetic-v1.1.safetensors \
|
||||
# --add <Anima>/split_files/text_encoders/qwen_3_06b_base.safetensors \
|
||||
# --add <Anima>/split_files/vae/qwen_image_vae.safetensors \
|
||||
# --config <Qwen/Qwen3-0.6B-Base> --tokenizer2 <ComfyUI>/comfy/text_encoders/t5_tokenizer/tokenizer.json \
|
||||
# --arch anima --set anima.variant=aesthetic \
|
||||
# --recipe data/recipes/anima-fp8.recipe -o anima-aesthetic-fp8.rad
|
||||
#
|
||||
# Every linear of the text encoder and of the DiT's 28 blocks (self- and cross-attention, MLP)
|
||||
# becomes E4M3 codes with a bf16 scale a 128 x 128 block, read by the fp8a8 GEMMs over activations
|
||||
# quantised the same way. The LLM adapter, the embeddings, the modulation linears, the final layer
|
||||
# and the VAE stay bf16. The patch embedding (without its padding-mask columns) and the VAE's causal
|
||||
# convolutions (at their last temporal tap) are computed at convert and stored bf16.
|
||||
|
||||
te.blk.*.attn_qkv.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
|
||||
te.blk.*.attn_output.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
|
||||
te.blk.*.ffn_gate_up.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
|
||||
te.blk.*.ffn_down.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
|
||||
dit.blk.*.attn_qkv.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
|
||||
dit.blk.*.attn_output.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
|
||||
dit.blk.*.cross_q.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
|
||||
dit.blk.*.cross_k.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
|
||||
dit.blk.*.cross_v.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
|
||||
dit.blk.*.cross_output.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
|
||||
dit.blk.*.mlp_layer1.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
|
||||
dit.blk.*.mlp_layer2.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
|
||||
|
||||
dit.x_embed.weight cast dtype=bf16
|
||||
decoder.* cast dtype=bf16
|
||||
conv2.* cast dtype=bf16
|
||||
@@ -0,0 +1,45 @@
|
||||
# krea-2-fp8-unscaled.recipe -- a Krea 2 finetune shipped as plain fp8 (every tensor E4M3 with no
|
||||
# scale, as ComfyUI's fp8 checkpoints and most civitai Krea 2 files store it), with block-scaled fp8
|
||||
# linears.
|
||||
#
|
||||
# rad-convert <pipeline directory: Krea-2-Turbo's (or -Raw's) model_index, scheduler, text encoder,
|
||||
# tokenizer and VAE, with the finetune's DiT as transformer/> \
|
||||
# --recipe data/recipes/krea-2-fp8-unscaled.recipe -o finetune-fp8.rad
|
||||
#
|
||||
# The DiT's and the text fusion's linears keep the checkpoint's codes: every value is already on the
|
||||
# E4M3 grid, so a block scale of exactly 1 (rule=fixed) holds each one as the code it was shipped
|
||||
# as, where an absmax scale would round it a second time. The text encoder is the release's bf16 and
|
||||
# is rounded as krea-2-fp8.recipe rounds it. The norms, tables and embedders the finetune stores as
|
||||
# E4M3 are widened exactly to the dtypes krea-2-fp8.recipe gives them. A Turbo finetune takes
|
||||
# Turbo's model_index.json (`is_distilled`: 8 steps, no guidance), a Raw one Raw's.
|
||||
|
||||
te.blk.*.attn_qkv.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
|
||||
te.blk.*.attn_output.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
|
||||
te.blk.*.ffn_gate_up.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
|
||||
te.blk.*.ffn_down.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
|
||||
fuse.*.attn_qkv.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16 rule=fixed scale_value=1
|
||||
fuse.*.attn_gate.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16 rule=fixed scale_value=1
|
||||
fuse.*.attn_output.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16 rule=fixed scale_value=1
|
||||
fuse.*.ffn_gate_up.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16 rule=fixed scale_value=1
|
||||
fuse.*.ffn_down.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16 rule=fixed scale_value=1
|
||||
dit.blk.*.attn_qkv.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16 rule=fixed scale_value=1
|
||||
dit.blk.*.attn_gate.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16 rule=fixed scale_value=1
|
||||
dit.blk.*.attn_output.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16 rule=fixed scale_value=1
|
||||
dit.blk.*.ffn_gate_up.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16 rule=fixed scale_value=1
|
||||
dit.blk.*.ffn_down.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16 rule=fixed scale_value=1
|
||||
|
||||
# The release stores its norms, modulation tables, embedders, projector and output layer f32.
|
||||
# diffusers keeps every norm f32 and runs the rest bf16. Here the text fusion's norms, the q/k norms
|
||||
# and txt_in's norm stay f32; the DiT's norm1, norm2 and final norm are bf16, the fused modulation
|
||||
# kernel's operand, with the rest.
|
||||
fuse.*.norm1.weight cast dtype=f32
|
||||
fuse.*.norm2.weight cast dtype=f32
|
||||
fuse.*.q_norm.weight cast dtype=f32
|
||||
fuse.*.k_norm.weight cast dtype=f32
|
||||
dit.blk.*.q_norm.weight cast dtype=f32
|
||||
dit.blk.*.k_norm.weight cast dtype=f32
|
||||
txt.norm.weight cast dtype=f32
|
||||
fuse.* cast dtype=bf16
|
||||
txt.* cast dtype=bf16
|
||||
dit.* cast dtype=bf16
|
||||
vae.* cast dtype=bf16
|
||||
@@ -0,0 +1,41 @@
|
||||
# q38-27b-mxfp4-df2.recipe -- a bf16 Qwen3.8-27B (or a finetune of it) at MXFP4 with the DFlash2
|
||||
# drafter.
|
||||
#
|
||||
# rad-convert <bf16 Qwen3.8-27B checkpoint> --draft-model <z-lab/Qwen3.8-27B-DFlash2> \
|
||||
# --recipe q38-27b-mxfp4-df2.recipe \
|
||||
# --set quantization_config.quant_method=fp8 --set quantization_config.fmt=e4m3 \
|
||||
# -o q38-27b-mxfp4-df2.rad
|
||||
#
|
||||
# The --set keys give the container the family's fp8 descriptor, so qwen35_fp8 serves it as it
|
||||
# serves the Quark, ParoQuant and NVFP4 releases; without them a bf16 checkpoint selects
|
||||
# qwen35_bf16, which has no 4-bit GEMM.
|
||||
#
|
||||
# The trunk's linears are rounded to MXFP4 (`fp4_e2m1`, an e8m0 scale per 32 of K, the OCP exponent
|
||||
# rule) from the bf16 source, once: the encoding and kernels of q38-27b-quark-mxfp4-df2.recipe,
|
||||
# without Quark's AWQ fold. The delta net's a/b projections, the norms, the embedding and the
|
||||
# vision tower stay bf16; the head goes block fp8 as in the other 27B recipes. The checkpoint's MTP
|
||||
# head is not read: the DFlash2 drafter displaces it.
|
||||
#
|
||||
# The drafter as q38-27b-quark-mxfp4-df2.recipe makes it: its linears at MXFP4, and a 2-bit copy
|
||||
# of the target's head (u2 with a u8 zero, least-squares clip search) whose top 32 the engine
|
||||
# rescores against the target's fp8 head.
|
||||
|
||||
blk.*.ffn_gate_up.weight rtn codes=fp4_e2m1 group=32 scale=e8m0
|
||||
blk.*.ffn_down.weight rtn codes=fp4_e2m1 group=32 scale=e8m0
|
||||
blk.*.attn_qg.weight rtn codes=fp4_e2m1 group=32 scale=e8m0
|
||||
blk.*.attn_k.weight rtn codes=fp4_e2m1 group=32 scale=e8m0
|
||||
blk.*.attn_v.weight rtn codes=fp4_e2m1 group=32 scale=e8m0
|
||||
blk.*.attn_output.weight rtn codes=fp4_e2m1 group=32 scale=e8m0
|
||||
blk.*.ssm_inz.weight rtn codes=fp4_e2m1 group=32 scale=e8m0
|
||||
blk.*.ssm_out.weight rtn codes=fp4_e2m1 group=32 scale=e8m0
|
||||
|
||||
output.weight rtn codes=fp8_e4m3 block=128x128 scale=bf16
|
||||
dflash.draft_head.weight rtn codes=u2 zero=u8 group=128 scale=f16 rule=search
|
||||
|
||||
dflash.fc.weight rtn codes=fp4_e2m1 group=32 scale=e8m0
|
||||
dflash.blk.*.attn_q.weight rtn codes=fp4_e2m1 group=32 scale=e8m0
|
||||
dflash.blk.*.attn_k.weight rtn codes=fp4_e2m1 group=32 scale=e8m0
|
||||
dflash.blk.*.attn_v.weight rtn codes=fp4_e2m1 group=32 scale=e8m0
|
||||
dflash.blk.*.attn_output.weight rtn codes=fp4_e2m1 group=32 scale=e8m0
|
||||
dflash.blk.*.ffn_gate_up.weight rtn codes=fp4_e2m1 group=32 scale=e8m0
|
||||
dflash.blk.*.ffn_down.weight rtn codes=fp4_e2m1 group=32 scale=e8m0
|
||||
@@ -0,0 +1,9 @@
|
||||
# sdxl-bf16.recipe -- Stable Diffusion XL (and its finetunes: Illustrious, NoobAI, Pony, ...) at bf16.
|
||||
#
|
||||
# rad-convert <checkpoint>.safetensors --tokenizer <CLIP tokenizer.json> \
|
||||
# --recipe data/recipes/sdxl-bf16.recipe -o sdxl.rad
|
||||
#
|
||||
# A single-file SDXL checkpoint (Stability's layout) ships its weights f16, some finetunes partly
|
||||
# bf16 or f32; every weight the model reads is served bf16. The VAE's encoder, the text encoders'
|
||||
# unused tails and the checkpoint's bookkeeping tensors are not carried.
|
||||
* cast dtype=bf16
|
||||
Reference in new issue
Block a user