snapref-v1a

0ppxnhximxr/snapref-v1a

作者
0ppxnhximxr
任务
图像生成
下载量
1,166
点赞数
28
趋势分
28
许可证
other
收录时间
2026/11/4

license: other license_name: circlestone-labs-non-commercial-license license_link: LICENSE.md base_model: circlestone-labs/Anima base_model_relation: adapter pipeline_tag: text-to-image library_name: diffusers tags:

  • anima
  • comfyui
  • reference-image
  • character-consistency
  • anime
  • snapref

SnapRef v1a

One reference image. Your character, in any pose and scene you prompt.

A reference adapter for Anima base v1.0. The reference is read once and reused at every sampling step, so it adds only about 15 % to generation time.

A larger sibling with twice the LoRA rank is SnapRef v1b. It follows the prompt slightly more closely and keeps the character about as well.

Characters that were not in the training data. Each column uses the same prompt and seed. The prompt describes only the scene.


Quick start

  1. Install Anima base v1.0 with its text encoder and VAE.
  2. Copy comfyui/snapref/ into ComfyUI/custom_nodes/ and restart ComfyUI.
  3. Put snapref_v1a.safetensors into ComfyUI/models/loras/.
  4. Open workflows/snapref_v1a_simple.json, click the picture slot in the SnapRef node and queue.

Write only the scene. Hair, eyes, outfit and style come from the reference.

masterpiece, best quality, score_7, safe, 1girl, solo, full body, sitting, crossed legs, bench, street, night

[!NOTE] The adapter is not a regular LoRA. Load it with the SnapRef node, not with LoraLoader. Direct loading with the Diffusers API is not supported.

[!TIP] Two nodes. SnapRef is the simple one: pick one or two pictures of the character inside the node, choose Character & Style or Character, and set Strength and Fidelity. SnapRef (Advanced) has every setting described below. Saved workflows open on SnapRef (Advanced) unchanged.

Settings

The settings below are the inputs of SnapRef (Advanced). The simple node keeps everything else at these defaults.

settingdefaultwhat it does
modecscs copies the character and the style. char copies only the character, so you can set the style with artist tags
strength0how closely to follow the reference. Try 1–2 for more detail (trims, sleeves, accessories)
ref_guidance_onoffa stronger push toward the reference, at about 1.4× the time
ref_guidance4.5strength of that push; 6–8 for a closer match
settingdefault
adaptersnapref_v1a.safetensorsthe bf16 file or the FP8 file
ref_in_uncondoffon: the reference is followed more loosely and the prompt more closely
fidelity1.00-1; lower follows the prompt more freely. Ignored when ref_in_uncond or ref_guidance_on is on
ref_megapixels1.0the reference is shrunk to this size if it is larger
ref_captionemptyoptional appearance tags of the reference; can help with accessories
correctionapgwith ref_guidance_on: keeps colors from over-saturating
ref_end1.0with ref_guidance_on: 0.6 is faster with nearly the same result
settingdefault
image_2, image_3more references of the same character, e.g. a full-body shot when image is an upper-body shot
use_batchoffuse every image of an IMAGE batch as a reference
multi_layoutseparateseparate: each reference on its own. stitch: side by side in one reference (same speed as one image)
weight_1 … weight_31.0how much each reference counts (0–2, 0 = skipped); separate layout only

strength and the weights no longer slow sampling down. With everything left at the defaults, the images are the same as with the previous node (bit-identical). See workflows/snapref_v1a_multi_reference.json.

Recommended sampling: euler or er_sde, simple, 28–30 steps, cfg 4.5.

Two characters

Put the two references side by side with the core Image Stitch node and connect the result as the reference. In the prompt, use 2girls (or 1boy, 1girl) instead of solo, and say in a few words who is on the left and who is on the right. A landscape size works best. See workflows/snapref_v1a_two_characters.json.

Results

SnapRef v1aElectronGirl v2Role-Ref-KVAnima, no reference
seconds per image ¹8.914.412.57.7

¹ A100, 832×1216, 28 steps, default settings of each adapter.

On characters not seen in training, the adapter predicts images better with the right reference than with a wrong one: identity gap 0.0041 on the held-out denoising loss. The numbers are in heldout_loss.json.

How it works

The reference goes through the model once, through its own branch, and every layer's attention keys and values are cached. While the image is generated, each layer attends to its own tokens and to the cached reference. Each branch has its own LoRA. The reference sits at a separate position in the model's coordinate space, so it is read for appearance and not copied as a layout.

Training used 58,300 Anima-generated images: 2,367 characters, each drawn in several scenes and poses by the same artist style. Data generation and training took about 120 H100 GPU-hours.

FP8

snapref_v1a_fp8.safetensors is half the size (195 MB) and gives practically the same images. It also works with the FP8 Anima base.

Compatibility and troubleshooting

  • Black image with an fp16 model or --fast. Fixed in the node update of 2026-10-31. Anima overflows in fp16. ComfyUI runs the model in fp16 when the checkpoint is stored in fp16 (many merges), with --fp16-unet, or with --fast / --fast fp16_accumulation. The old node encoded the reference in fp16 there and produced NaN. The new node keeps that part in fp32, as ComfyUI itself does. bf16 output is unchanged (same bits). With the old node, add --bf16-unet to the ComfyUI launch arguments, or drop fp16_accumulation from --fast.
  • Anzhc Mod Guidance: works in either node order with the updated node. Before, applying Mod Guidance first dropped the reference.
  • Spectrum: works with ref_guidance_on off. With it on, Spectrum-type step forecasting breaks; the node now logs a warning.
  • sorryhyun Mod Guidance: with the default settings it can stop with a tensor-size error (4 vs 2). Turning on ref_in_uncond or ref_guidance_on avoids it.

Known limitations

  • Very small details (earrings, fine patterns, scars) can be simplified.
  • A dark-skinned reference can come out with lighter skin.
  • With some outdoor full-body prompts, the bottom of the image can turn into a plain white floor. Naming the ground (grass, path) fixes it.
  • A scene can override the reference outfit (beach → swimsuit). Raise strength or name the outfit.
  • With two characters, attributes the references do not show clearly (for example, closed eyes) can be mixed between the two.

Files

file
snapref_v1a.safetensorsadapter, bf16 (382 MB)
snapref_v1a_fp8.safetensorsadapter, FP8 (195 MB)
comfyui/snapref/ComfyUI nodes: SnapRef (simple) and SnapRef (Advanced), for every SnapRef version
workflows/simple (SnapRef node), single character, two characters, several references of one character, side-by-side comparison with other adapters

License

The weights are a derivative of the CircleStone Model and are distributed under the CircleStone Labs Non-Commercial License v1.2 (LICENSE.md, NOTICE.txt). Non-commercial use only. Not affiliated with or endorsed by CircleStone Labs.

内容来源:Hugging Face 模型卡

在 Hugging Face 查看