Nodes/ComfyUI-UtilsCollection/Krea2 System Prompt Scaled Encoder (Advanced)
ComfyUI Node

Krea2 System Prompt Scaled Encoder (Advanced)

A Krea 2 encoder with a resolution dial and numbered picture anchors

By silveroxides·Created 2 months ago·Updated about 7 hours ago· 24
Krea2 System Prompt Scaled Encoder (Advanced)
  • clip
  • image_inputs
  • visual_fusion_config
  • vae
  • CONDITIONING
prompt
system_prompt
vlm_resolution384
formula
padding_methodzero-pad
vae_resolutionFast (1024)
ref_latent_modeoff
multiplier1.0
vae_dimension_multiple8
semantic_anchorfalse

Most of the "system prompt" encoder nodes in silveroxides' UtilsCollection are preset-driven: you pick a resolution from a dropdown and move on. This one is the advanced sibling that trades presets for precision. TextEncodeKrea2SystemEditScaledAdv - "Krea2 System Prompt Scaled Encoder (Advanced)" - gives you a free-form vlm_resolution dial, a formula field, padding control, and per-image <Picture N> semantic anchors for Krea 2 workflows.

Like nearly every non-UC_ node in this pack, it's a deprecated alias of a canonical node - specifically of UC_AdvancedVisualConditioningEncode. The pack keeps the old ID registered so existing graphs load, and marks it deprecated so you know to migrate. Take the replacement if ComfyUI offers.

What "scaled" means here

The headline difference from the simpler Krea 2 encoders is vlm_resolution as an integer rather than a preset combo. It's an equivalent-square VLM target from 256 to 3584 in 32-pixel steps (default 384), and anything outside 256–3584 silently preserves the source image's original resolution. That matters because the semantic path - where your reference images get read by the vision encoder - is the part that sets the ceiling on how much detail the model can borrow from an image. Crank it toward 1024+ when a reference carries fine style cues you don't want lost at 384.

The rest of the schema is the pack's standard advanced stack:

  • prompt - with fusion off, image_input_N places image N inline; with fusion on, image_input_fusion (or image_input_1) targets the fused slot.
  • formula - used only with fusion off and no numbered placeholders; an empty formula falls back to the first image pass.
  • padding_method - zero-pad or interpolate, for aligning images of different aspect ratios (only active when fusion config is off).
  • vae_resolution / ref_latent_mode / vae_dimension_multiple - the VAE structural path for reference latents.
  • multiplier - a global scale on the final conditioning vector; handy for pushing or damping overall prompt adherence.
  • semantic_anchor - the feature that makes multi-image prompting legible: prefix each encoded visual slot with its numbered <Picture N> anchor, so the model knows which image you mean when your prompt says "the jacket in Picture 2."
  • image_inputs - autogrowing image sockets mapped sequentially to a, b, c, … / numbered variables.

Optional visual_fusion_config (from UC_VisualFusionConfig) swaps the fallback formula/padding behavior for proper spatial fusion of isolated visual blocks, without the coordinate blur you get from naive image compositing. Output is a single CONDITIONING, straight into the sampler's positive input.

Install

Via ComfyUI Manager (search ComfyUI-UtilsCollection) or:

cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection

Restart, and note the pack's real deps are just opencv-python plus typing-extensions.

When you'd reach for it

When a preset's "Fast (384)" is too coarse and 1024 is too slow, and you want, say, 768 for the semantic read. Or when you're juggling several references and semantic_anchor finally lets you say "Picture 2's lighting" and have it mean something. If you don't need the dial or the anchors, the simpler Krea 2 encoder does the same job with less to trip over - this one earns its "Advanced" label for multi-reference, resolution-sensitive work.

Categoryadvanced/conditioning

Inputs (14)

NameTypeDefaultDescription
clipCLIPCLIP/T5 dual text encoder reference.
promptSTRINGMain prompt. With fusion off, image_input_N places active image N inline. With fusion on, use image_input_fusion (image_input_1 is accepted as an alias).
system_promptSTRINGSystem prompt injected prior to user description.
vlm_resolutionINT3840–4096Equivalent-square VLM target from 256 to 3584. Values outside that range preserve original resolution.
formulaSTRINGOptional formula used only with fusion off when no numbered inline placeholders are present. Empty selects the first image pass.
padding_methodCOMBOzero-padAlignment method for images with different aspect ratios/resolutions. Active ONLY if visual_fusion_config is disconnected or set to 'off'.
vae_resolutionCOMBOFast (1024)Resolution of the reference latent encoded by the VAE (structural path).
ref_latent_modeCOMBOoffReference latent encoding mode. 'single'/'multi' append latents; 'parallel-single'/'parallel-multi' run them in a separate conditioning stream to prevent semantic override.
multiplierFLOAT1.0-1000–1000Overall multiplier applied to the final conditioning vector.
vae_dimension_multipleINT84–256Pixel multiple used to align reference images before VAE encoding.
semantic_anchorBOOLEANfalsePrefixes each encoded visual slot with its numbered <Picture N>: semantic anchor.
image_inputsCOMFY_AUTOGROW_V3Multimodal images. Maps active inputs sequentially to variables (a, b, c, ...).
visual_fusion_configoptVISUAL_FUSION_CONFIGOptional spatial visual fusion configuration from UC_VisualFusionConfig. Blends isolated visual blocks without coordinate blur.
vaeoptVAE

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONING