Instructions to use 0ppxnhximxr/snapref-v2s with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use 0ppxnhximxr/snapref-v2s with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("0ppxnhximxr/snapref-v2s", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
SnapRef v2s PRE1
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.
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.
One reference image. Its character, or only its style.
Character & Style and Character draw the character in the picture in any pose and scene, as in v2a.
Style takes only the art style of the picture: you write the character in the prompt.
Download on Hugging Face Β· Civitai Β· Try the demo Β· Quick start Β· Style mode Β· Several style pictures Β· Character modes Β· Evaluation
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 new | Use 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 new | Give several pictures by the same artist, for example of different characters, with a Strength for each. |
| π Character and scene | Use Character & Style (cs) to carry the reference's appearance and visual treatment into another setting. |
| π¨ Character, your choice of style | Use Character (char) and add watercolor, retro anime or flat-color tags to the prompt. |
| π§© Several views of one character | Combine 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.
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.0to start; lower a picture's Strength (for example0.35) when it pulls too much of its own look into the result.
Quick start
- Install Anima base v1.0 with its text encoder and VAE in ComfyUI.
- Copy
comfyui/snapref/from this repository intoComfyUI/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. - Download
snapref_v2s_pre1.safetensorstoComfyUI/models/loras/. - 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, openworkflows/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
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.
SnapRef uses its own node. Loading these weights through LoraLoader or a generic Diffusers pipeline is not supported.
Workflows
| Workflow | Use |
|---|---|
| Style new | Simple node in Style mode: pictures in the art style you want, character and scene in the prompt. |
| Style (Advanced) new | SnapRef (Advanced) with mode style and a separate image input. |
| Simple | Pick images inside the SnapRef node; Character & Style, Strength and Fidelity. |
| Single reference | SnapRef (Advanced) with a separate image input. |
| Character mode | Take the character from the reference and set the style in the prompt. |
| Multi-reference | Two views of the same character. |
| Reference weights | Two references with the second weight set to 0.4. |
| Two characters | Stitch 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 control | Starting point | Purpose |
|---|---|---|
| Adapter | snapref_v2s_pre1.safetensors |
Select the v2s PRE1 weights. |
| Mode | Character & Style Β· Character Β· Style | Style: only the art style of the pictures; the character comes from the prompt. |
| Strength per picture | 1.0 |
Contribution of that picture; 0 disables it. In Style mode, values above 1.0 start to bring in the pictures' character. |
| Fidelity | 1.0 |
Lower values allow more prompt freedom. |
SnapRef (Advanced) settings
| Input | Starting value | Purpose |
|---|---|---|
mode |
cs |
cs: character and style; char: character with prompt-driven styling; style: art style only. |
strength |
0.0 |
Global reference attention on a log scale; different from the simple node's per-picture Strength. Keep 0.0 in style. |
fidelity |
1.0 |
Ignored when ref_in_uncond or ref_guidance_on is enabled. |
ref_megapixels |
1.0 |
Maximum area of each encoded reference; smaller images are not enlarged. |
ref_caption |
empty | Optional reference appearance tags. Leave empty in style. |
ref_in_uncond |
off | Keep the reference out of the negative branch at the showcased default. |
ref_guidance_on |
off | Additional reference guidance; the figures use it disabled. |
image_2, image_3 |
optional | Additional images: the same character (cs, char) or the same artist (style). |
use_batch |
off | Read multiple images from an IMAGE batch. |
multi_layout |
separate |
Encode references independently. stitch combines them into one image. |
weight_1 β¦ weight_3 |
1.0 |
Per-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.
More character-mode scenes
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.
| Metric | No reference | v2a Character & Style | v2s Style |
|---|---|---|---|
| Distance to the picture's character (CCIP) β, higher = less copied | 0.418 | 0.178 | 0.398 |
| Distance to the prompted character (CCIP) β | 0.0535 | 0.220 | 0.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 Advancedstrengthabove0) 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
| Release | SnapRef v2s PRE1 (v2a + Style mode, preview) |
| Base used for these examples | Anima base v1.0 |
| Weight file | snapref_v2s_pre1.safetensors |
| File size | 543,395,968 bytes, approximately 543 MB |
| SHA-256 | 95f91797827cbf5efd86e29fac5b2646df1505d46acb20f913877b3c9a429609 |
Files
| File or folder | Contents |
|---|---|
snapref_v2s_pre1.safetensors |
v2s PRE1 adapter weights: the v2a weights plus the Style branch. |
snapref_v2s_pre1_fp8.safetensors |
Optional 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. |
| SHA256SUMS | Checksums for the weights and release files. |
| LICENSE.md Β· NOTICE.txt | Weight 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.
- Downloads last month
- 1,295
Model tree for 0ppxnhximxr/snapref-v2s
Base model
nvidia/Cosmos-Predict2-2B-Text2Image