Views
No views yet
anima_train_control_net_lllite.py from the sd-scripts repository.About earlier Preview3-based weights. Sample weights trained against the older Anima Preview3 base model — including lineart / depth / pose / fake scribble, as well as a Preview3-era any-test like and inpainting v1 — are still hosted in this repository. They are documented in the legacy model cardPREVIEW3.md. The four conditioning types not retrained for Anima-Base v1.0 (lineart / depth / pose / scribble) remain available there. The Preview3 weights also work on Anima-Base v1.0 with somewhat reduced quality.
sd-scripts の anima_train_control_net_lllite.py で Anima-Base v1.0 向けに学習した、ControlNet-LLLite のサンプル重みです。アーキテクチャ、データセット形式、推論手順の詳細は 学習・推論ガイド を参照してください。実験的な ComfyUI ノードも kohya-ss/ComfyUI-Anima-LLLite で公開しています。旧 Preview3 ベースの重みについて: 旧 Anima Preview3 向けに学習した重み — lineart / depth / pose / fake scribble および Preview3 世代の any-test like / inpainting v1 — は引き続き本リポジトリで公開しています。詳細は旧モデルカードPREVIEW3.mdを参照してください。Anima-Base v1.0 向けに再学習していない 4 種(lineart / depth / pose / scribble)はそちらでのみ公開しています。Preview3 版重みは Anima-Base v1.0 上でも品質はやや落ちるものの利用可能です。
| File | Type | Conditioning source |
|---|---|---|
anima-lllite-inpainting-v2.safetensors | inpainting (4ch: RGB + mask) | Generated images with dynamic masking |
anima-lllite-any-test-like-v2.safetensors | any-test like (mixed) | Lineart / scribble / grayscale, heavily augmented |
Thev2suffix indicates the Anima-Base v1.0 generation, distinguishing these weights from the Preview3-erav1series.
v2 は Anima-Base v1.0 世代であることを示すサフィックスで、Preview3 世代の v1 系と区別するためのものです。| Type | Cond image | Mask image | Generated image |
|---|---|---|---|
| inpainting | ![]() | ![]() | ![]() |
| any-test like | ![]() | --- | ![]() |
Anima-Base v1.0 (anima-base-v1.0.safetensors)v2 weights)enable_bucket = true, bucket_no_upscale = true, bucket_reso_steps = 16, min_bucket_reso = 64, max_bucket_reso = 3072. The exact per-bucket resolutions are determined automatically from the source images' actual sizes.adamw8bitbf16--gradient_checkpointing enabled — to accommodate the wider resolution range up to 1536²)42caption_dropout_rate = 0.15 (enabled to support CFG at inference time; Preview3 weights were trained without caption dropout, except for inpainting)--cache_latents_to_disk --cache_text_encoder_outputs_to_disk--attn_mode flashDifference from Preview3 common setup. Preview3 used batch size 6 with--gradient_checkpointingdisabled at 1024²-only resolutions. For Anima-Base v1.0, the resolution range now extends to 1536², so the common setup uses batch size 12 with--gradient_checkpointingenabled. Per-model LLLite dims (--cond_emb_dim,--lllite_cond_dim,--lllite_mlp_dim) are set per-model rather than at a shared default.
Anima-Base v1.0 / anima-base-v1.0.safetensors) / Qwen-Image VAE / Qwen3-0.6B (base)enable_bucket = true、bucket_no_upscale = true、bucket_reso_steps = 16、min_bucket_reso = 64、max_bucket_reso = 3072。実バケット解像度は元画像から自動算出。--gradient_checkpointing 有効、解像度上限 1536² に対応するため)、seed 42、caption_dropout_rate 0.15(推論時の CFG 対応のため有効化。Preview3 重みは inpainting を除き caption dropout なしで学習)、latent / TE 出力ともディスクキャッシュ、--attn_mode flash。Preview3 との差分: Preview3 は 1024² までで batch 6・gradient checkpointing 無効でしたが、Anima-Base v1.0 は 1536² まで扱う関係で batch 12・gradient checkpointing 有効に変更。LLLite 次元(--cond_emb_dim/--lllite_cond_dim/--lllite_mlp_dim)は共通デフォルトを置かず、モデルごとに設定します。
--lllite_cond_in_channels 4 --lllite_inpaint_masked_input.--learning_rate 1e-3--timestep_sampling shift --discrete_flow_shift 3.0--lllite_target_layers self_attn_q_pre,self_attn_kv_pre,mlp_fc1_pre (Q, K/V, and MLP fc1 all injected — wider injection than the other models)--lllite_cond_resblocks 4--cond_emb_dim 64 --lllite_cond_dim 128 --lllite_mlp_dim 64 (larger dims than the Preview3 common setup of 32/32/32 — unlike the other ControlNet types, inpainting must preserve the color information of the unmasked region of the input image, which requires more capacity)--lllite_cond_in_channels 4 --lllite_inpaint_masked_input--max_train_epochs 64 configured. Published weight: epoch 30 (≈ 10,770 steps), saved as anima-lllite-inpainting-v2.safetensors.img2img with a mask (otherwise the colors may shift slightly). The sample image embeds the workflow.--lllite_cond_in_channels 4 --lllite_inpaint_masked_input で学習しています。1e-3、--timestep_sampling shift --discrete_flow_shift 3.0self_attn_q_pre,self_attn_kv_pre,mlp_fc1_pre(Q / K/V / MLP fc1 すべて、他モデルより広め)--lllite_cond_resblocks 4--cond_emb_dim 64 --lllite_cond_dim 128 --lllite_mlp_dim 64(Preview3 共通設定の 32/32/32 より大きく設定。他の ControlNet と異なり、inpainting では入力画像のマスク領域外の色情報を保持する必要があるため、より大きい容量が必要)--lllite_cond_in_channels 4 --lllite_inpaint_masked_input--max_train_epochs 64 設定。公開重みは epoch 30(≈ 10,770 step)時点で、ファイル名は anima-lllite-inpainting-v2.safetensors。img2img でマスクを併用することを推奨します(併用しないと色味が微妙に変化することがあります)。サンプル画像が workflow を含んでいます。--lllite_cond_in_channels 3, no --lllite_inpaint_masked_input.)PREVIEW3.md).--timestep_sampling shift --discrete_flow_shift 3.0--lllite_target_layers self_attn_q_pre (Q only — narrower injection than inpainting)--lllite_cond_resblocks 6--cond_emb_dim 32 --lllite_cond_dim 64 --lllite_mlp_dim 64--max_train_epochs 32 configured. Trained in two phases:
--learning_rate 1e-3, batch size 12, 6 epochs (≈ 11,000 steps), ~17 hours. Loss stopped decreasing around epoch 6, so training was continued on a separate machine.--learning_rate 3e-4, batch size 8 per GPU × 2 GPUs (effective batch size 16), 6 epochs (≈ 9,000 steps), ~50 hours. Loss continued to decrease for the first ~2 epochs of this phase, then plateaued; training was stopped at epoch 6.anima-lllite-any-test-like-v2.safetensors.--lllite_cond_in_channels はデフォルト (3)、--lllite_inpaint_masked_input なし。PREVIEW3.md)。--timestep_sampling shift --discrete_flow_shift 3.0self_attn_q_pre(Q のみ。inpainting より狭め)--lllite_cond_resblocks 6--cond_emb_dim 32 --lllite_cond_dim 64 --lllite_mlp_dim 64--max_train_epochs 32 設定。2 段階で学習:
1e-3、batch size 12、6 epoch(≈ 11,000 step)、約 17 時間。epoch 6 付近で loss が下がらなくなったため別 PC で継続学習。3e-4、batch size 8/GPU × 2 GPU(実効 batch 16)、6 epoch(≈ 9,000 step)、約 50 時間。最初の 2 epoch 程度までは loss が下がりましたが、それ以降は顕著に下がらなくなり 6 epoch で打ち切り。anima-lllite-any-test-like-v2.safetensors。anima_minimal_inference_control_net_lllite.py. Architecture metadata is embedded in each .safetensors, so you normally only need to point --lllite_weights at the file and pass a --control_image.LICENSE.LICENSE として同梱しています。PREVIEW3.md.