snapref-v2s

0ppxnhximxr/snapref-v2s

作者
0ppxnhximxr
任务
图像生成
下载量
6,667
点赞数
69
趋势分
23
许可证
other
收录时间
2026/11/25

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
  • style-reference
  • anime
  • snapref
  • preview

SnapRef v2s PRE1

[!NOTE] SnapRef v2s PRE1 = SnapRef v2a + a new Style mode. Character & Style and Character give bit-identical results to v2a, so updating changes nothing you already make. Style is new and is a preview. See Style mode, the character stays out and several style pictures.

[!IMPORTANT] Please support SnapRef! Developing these models has taken 1,000+ H100 GPU-hours and 800,000 training images so far. If SnapRef is useful to you, a ⭐ on GitHub, sharing your results or reporting issues helps a lot, and GPU sponsorship is very welcome.

Support SnapRef on Ko-fi

Each output is a different character written in the prompt (a maid, a boy with glasses, a reader in the park) drawn in the art style of the picture under it. The last one uses five pictures by the same artist.

What you can make

How to use it
🖌️ Any character in a picture's art style newUse Style and give a picture in the style you want. Write the character and the scene in the prompt.
🖼️ A steadier style from several pictures newGive several pictures by the same artist, for example of different characters, with a Strength for each.
🎭 Character and sceneUse Character & Style (cs) to carry the reference's appearance and visual treatment into another setting.
🎨 Character, your choice of styleUse Character (char) and add watercolor, retro anime or flat-color tags to the prompt.
🧩 Several views of one characterCombine a portrait with a full-body picture to provide more outfit and silhouette information.

The simple SnapRef node takes up to eight pictures and now has three modes: Character & Style · Character · Style. SnapRef (Advanced) adds style to its mode list.

Style mode

Keep the prompt and the seed, change only the style picture. The character comes from the prompt, the rendering from the picture: line weight, color palette, lighting and shading.

Same prompt and seed in every column of a row. The left column uses no style picture. Some pictures change the palette and lighting more than the construction of the face; see Things to watch for.

The character stays out

The same picture behaves differently in the two modes. Character & Style draws the character in the picture. Style draws the character in your prompt, in the picture's style; the fox ears, the hat and the outfits of the pictures do not carry over.

Same picture, same scene and same seed in each row. The Character & Style prompt describes only the scene; the Style prompt adds the character (a silver-haired maid, a boy with glasses).

Several style pictures

Give several pictures by the same artist. The idea: what the pictures share is the art style, so several of them reinforce it. Below, five pictures of two different characters by one artist, each with its own Strength.

Same prompt and seed in each row. One picture already changes the rendering; five pictures can make it steadier and closer to the set, more visibly in some scenes (bottom row) than in others. Several style pictures were not part of training and are not in the evaluation below.

[!TIP] Style mode in three steps. Choose Style, put one or more pictures in the art style you want into the picture slots, and write the character and the scene in the prompt. Keep Strength at 1.0 to start; lower a picture's Strength (for example 0.35) when it pulls too much of its own look into the result.

Quick start

  1. Install Anima base v1.0 with its text encoder and VAE in ComfyUI.
  2. Copy comfyui/snapref/ from this repository into ComfyUI/custom_nodes/snapref/ (replace an older copy), then restart ComfyUI. Style mode needs this node version; v2a and older adapter files keep working in it.
  3. Download snapref_v2s_pre1.safetensors to ComfyUI/models/loras/.
  4. Open workflows/snapref_v2s_style.json, choose a picture in the art style you want in the SnapRef node and queue. For the character modes, open workflows/snapref_v2s_simple.json.

Optional FP8 download: snapref_v2s_pre1_fp8.safetensors is approximately 278 MB (about 49% smaller). Put it in the same models/loras/ folder and select it in the SnapRef adapter field. It uses E4M3FN matrices with per-row scales; the node restores them to BF16 for inference. Its Character & Style and Character results are identical to the v2a FP8 file; Style results can differ slightly from the BF16 file.

In Style mode, write the character and the scene, as you would without a reference:

masterpiece, best quality, score_7, safe, 1girl, solo, short silver hair, blue eyes, maid, apron,
holding tray, cafe interior, smile, cowboy shot

In Character & Style and Character, keep writing only the scene, as in v2a:

masterpiece, best quality, score_7, safe, 1girl, solo, sitting on a wooden garden bench,
looking at viewer, gentle smile, dappled sunlight, flowering trees

[!TIP] The Style button is dimmed? The selected adapter has no Style mode (v2a and older files). Select snapref_v2s_pre1.safetensors. A workflow saved in Style mode keeps that setting and shows a warning until you do.

[!NOTE] SnapRef uses its own node. Loading these weights through LoraLoader or a generic Diffusers pipeline is not supported.

Workflows

WorkflowUse
Style newSimple node in Style mode: pictures in the art style you want, character and scene in the prompt.
Style (Advanced) newSnapRef (Advanced) with mode style and a separate image input.
SimplePick images inside the SnapRef node; Character & Style, Strength and Fidelity.
Single referenceSnapRef (Advanced) with a separate image input.
Character modeTake the character from the reference and set the style in the prompt.
Multi-referenceTwo views of the same character.
Reference weightsTwo references with the second weight set to 0.4.
Two charactersStitch references side by side and describe two characters in the prompt.

Settings

The showcased images use CFG 4.5 · Euler / simple · 28 steps · Fidelity 1.0 on Anima base v1.0.

Simple SnapRef controlStarting pointPurpose
Adaptersnapref_v2s_pre1.safetensorsSelect the v2s PRE1 weights.
ModeCharacter & Style · Character · StyleStyle: only the art style of the pictures; the character comes from the prompt.
Strength per picture1.0Contribution of that picture; 0 disables it. In Style mode, values above 1.0 start to bring in the pictures' character.
Fidelity1.0Lower values allow more prompt freedom.
InputStarting valuePurpose
modecscs: character and style; char: character with prompt-driven styling; style: art style only.
strength0.0Global reference attention on a log scale; different from the simple node's per-picture Strength. Keep 0.0 in style.
fidelity1.0Ignored when ref_in_uncond or ref_guidance_on is enabled.
ref_megapixels1.0Maximum area of each encoded reference; smaller images are not enlarged.
ref_captionemptyOptional reference appearance tags. Leave empty in style.
ref_in_uncondoffKeep the reference out of the negative branch at the showcased default.
ref_guidance_onoffAdditional reference guidance; the figures use it disabled.
image_2, image_3optionalAdditional images: the same character (cs, char) or the same artist (style).
use_batchoffRead multiple images from an IMAGE batch.
multi_layoutseparateEncode references independently. stitch combines them into one image.
weight_1 … weight_31.0Per-reference contribution in separate layout.

Character modes, unchanged from v2a

Character & Style and Character use exactly the v2a computation: the v2s file contains the v2a weights byte for byte, and the Style parts switch on only in Style mode. The v2a examples below are therefore also what v2s draws.

Four references, three scene prompts. Orange outlines mark the inputs. The prompts describe the scene, pose and lighting without character names or appearance tags.

Character styles

Keep the reference, change the style prompt (char mode). The scene and seed stay the same within each row.

Multi-reference

Use two pictures of the same character: one with a clear face and another showing the full outfit.

One reference versus two, with the same prompt and seed in each row. The second-reference weight is 1.0 for Persica and 0.4 for Mia. These are selected examples, not an aggregate improvement score.

Reference weights

Start with both weights at 1.0. If a second picture changes the look too much, try lowering its weight.

How Style mode works

SnapRef reads the reference once and keeps what it saw as a set of attention keys and values; the image being generated reads them at every step. The v2a part that draws from them is unchanged and frozen. v2s adds a small style-only branch to the part that reads the reference, active only in Style mode, so the reference is summarized as "how it is drawn" rather than "who it is".

The branch was trained on pairs drawn from about 150,000 generated pictures by 3,674 artists: a picture by one artist as the reference and another picture by the same artist, of a different character, as the target, with that character written in the prompt and no artist tag. Copying the reference's character makes such a pair harder to match, while its line work and coloring help, so the branch learned to keep the style and leave the character out.

a The two readings of one picture: the reader and drawer are the frozen v2a parts, and only Style mode adds the branch. b What Style mode keeps and leaves out; the numbers are the held-out evaluation below. c Why the branch drops the character. d Swap test; each gray line is one held-out artist.

How it compares

Character & Style and Character: bit-identical to v2a on our fixed parity set and on the v2a release workflows; the v2a weights inside the file are byte-identical. The v2a evaluation applies unchanged.

Style: 24 held-out artists that were never used in training, one style picture each.

MetricNo referencev2a Character & Stylev2s Style
Distance to the picture's character (CCIP) ↑, higher = less copied0.4180.1780.398
Distance to the prompted character (CCIP) ↓0.05350.2200.0545
Swap test (same prompt and seed, the style picture replaced by another artist's)Result
Closer to the right artist's style with the right picture (CSD)+0.063 [0.046, 0.081], 92% of cases
With another artist's picture, the output moves toward that artist (CSD)+0.045 [0.023, 0.067], 83% of cases

Style mode copies the picture's character about as little as using no reference at all, keeps the prompted character as well as no reference does, and follows that artist's style: swapping the picture moves the output toward the new artist. Brackets are 95% bootstrap intervals. The metrics are sensitive to framing, pose and lighting; the figures above are selected examples.

Things to watch for

  • Style is a preview. Some pictures change the palette, lighting and line quality more than the way faces are drawn.
  • A little of a picture's coloring can carry over, such as a dark outfit or a skin tone. Name colors in the prompt when they matter.
  • In Style mode, Strength above 1.0 (or Advanced strength above 0) brings in more of the pictures' character and follows the prompt less.
  • One node uses one mode. Combining a character reference and a style reference in the same generation is not supported yet.
  • Use pictures you have the right to use, and respect the artists whose work you reference.
  • Small accessories and fine patterns can change in the character modes, as in v2a. Artwork text or signature-like marks can be copied from a reference. Inspect outputs before sharing them.

Changelog

v2s PRE1

  • New Style mode. Takes only the art style of the pictures; the character comes from the prompt. Several style pictures can be combined, each with its own Strength.
  • Character & Style and Character are unchanged: bit-identical to v2a stable. The v2a weights are inside the file byte for byte, and the Style parts switch on only in Style mode.
  • ComfyUI node: Style in SnapRef and SnapRef (Advanced). The picture panel shows each mode in its own color with matching card labels and a one-line prompt hint, and dims the Style button for adapters without Style mode. v2a and older adapter files keep working.
  • Two new workflows: Style and Style (Advanced).
  • Weight files: 543 MB, about 162 MB more than v2a for the Style branch; optional FP8 file 278 MB.

v2a stable

Character reference, several views of one character and per-reference weights. See the v2a model card.

Release details

ReleaseSnapRef v2s PRE1 (v2a + Style mode, preview)
Base used for these examplesAnima base v1.0
Weight filesnapref_v2s_pre1.safetensors
File size543,395,968 bytes, approximately 543 MB
SHA-25695f91797827cbf5efd86e29fac5b2646df1505d46acb20f913877b3c9a429609

Files

File or folderContents
snapref_v2s_pre1.safetensorsv2s PRE1 adapter weights: the v2a weights plus the Style branch.
snapref_v2s_pre1_fp8.safetensorsOptional FP8 storage variant, 278,127,904 bytes; inference computes in BF16.
comfyui/snapref/SnapRef and SnapRef (Advanced) with Style mode, including the image-picker interface.
workflows/Eight ComfyUI workflows configured for v2s PRE1.
figures/Release figures and hero preview.
SHA256SUMSChecksums for the weights and release files.
LICENSE.md · NOTICE.txtWeight license and attribution.

License

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

内容来源:Hugging Face 模型卡

在 Hugging Face 查看