Nodes/comfyui-mixlab-nodes/Apply VisualStyle Prompting ♾️Mixlab
ComfyUI Node Runs on cloud

Apply VisualStyle Prompting ♾️Mixlab

Training-free style transfer from one reference

By MixLabPro·Created 3 years ago·Updated 2 months ago· 1,859
Apply VisualStyle Prompting ♾️Mixlab
  • reference_image
  • model
  • clip
  • vae
  • positive
  • negative
  • model
  • positive
  • negative
  • latents
reference_image_text
enabledtrue
denoise1.00
batch_size1

Say you've got one image with a look you love - a painterly texture, a specific color grade, a particular illustration style - and you want new content in that same style, without training a LoRA and without downloading an adapter model. ApplyVisualStyle Prompting does exactly that. It's a training-free style-transfer node: hand it a reference image and a short description of it, and it steers your generation toward that style by manipulating the model's attention, so the new image inherits the how it looks while your prompt controls the what.

It's shadowcz007's port of the Visual Style Prompting technique (adapted from ExponentialML's ComfyUI_VisualStylePrompting, which itself implements the research method). Mechanically it's a cousin of IP-Adapter - both are "image prompting," both let a reference drive style with no fine-tuning. The difference is IP-Adapter injects a CLIP embedding through a dedicated 100MB-ish adapter, while Visual Style Prompting works purely through shared self-attention with the reference during sampling: no adapter file to download at all. That's its main appeal - and, honestly, its main quirk, since attention-based style transfer can be less consistent than a well-tuned IP-Adapter, so treat it as another tool in the drawer rather than a strict upgrade.

How it works

The node patches your MODEL so that, during sampling, the generation shares attention features with the reference image. You give it the reference and a text description of that reference, plus the usual pipeline pieces (model, clip, vae, your positive/negative conditioning), and it returns a modified model, adjusted conditioning, and initial latents ready to sample. In effect it wires the reference's style into the diffusion process itself rather than adding a side module.

The inputs and outputs that matter

There are a lot of inputs because it wraps a chunk of the pipeline, but the ones you actually think about:

  • reference_image (IMAGE) - the style source.
  • reference_image_text (STRING) - a short caption of the reference. This matters more than people expect; it anchors what the style is about.
  • enabled (BOOLEAN, default true) - toggle the effect on/off to A/B it.
  • denoise (FLOAT, default 1) and batch_size (INT) - standard sampling controls.
  • Plus the plumbing: model, clip, vae, positive, negative.

Outputs: model, positive, negative, and latents - feed these into your sampler (KSampler / SamplerCustom) to actually render.

How to install it

Via ComfyUI Manager: search comfyui-mixlab-nodes, install, restart. Or clone the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/shadowcz007/comfyui-mixlab-nodes.git

then pip install -r requirements.txt (or install.bat on the Windows portable build) and restart. No separate style model to download - that's the whole selling point versus IP-Adapter.

Common issues & troubleshooting

The style barely transfers. The reference_image_text is doing real work - a vague or empty caption weakens the effect. Describe the reference honestly ("loose watercolor portrait, muted palette") so the method knows what to carry over.

It copied the content, not just the style. Attention-sharing methods can leak composition and subject from the reference, not only its look. Push your positive prompt harder toward the content you do want, and pick a reference whose style you like but whose subject you don't mind losing.

Model architecture mismatch. This descends from an SD-era technique; wiring it into a pipeline built around a very different base model can misbehave. If it errors or does nothing, confirm your model/clip/vae are a matched, compatible set for the era the node targets.

Compare against IP-Adapter before committing. If consistency is shaky, the honest alternative for style transfer on SD 1.5/SDXL is IP-Adapter Plus at weight ~0.6–0.8. Visual Style Prompting wins on "no extra model to install"; IP-Adapter often wins on control.

Category♾️Mixlab/Style

Inputs (10)

NameTypeDefaultDescription
reference_imageIMAGE
reference_image_textSTRING
modelMODEL
clipCLIP
vaeVAE
positiveCONDITIONING
negativeCONDITIONING
enabledBOOLEANtrue
denoiseFLOAT1.000–1
batch_sizeINT11–4096

Outputs (4)

NameTypeDescription
modelMODEL
positiveCONDITIONING
negativeCONDITIONING
latentsLATENT