Nodes/Eric Qwen-Edit & Qwen-Image Nodes/Eric Qwen Direction Apply
ComfyUI Node

Eric Qwen Direction Apply

The scale dial that makes directions worth building

By EricRollei·Created 6 months ago·Updated 4 months ago· 20
Eric Qwen Direction Apply
  • conditioning
  • direction
  • conditioning
scale1.00
methodlerp
scopeall_tokens
prefix_N0
scope_N7
normalize_directionfalse
target_rms2.0

This is where a saved direction actually does work. Eric Qwen Direction Apply takes a base conditioning and nudges it along a direction vector:

result = base_conditioning + scale × direction

At scale 0 you get a pure passthrough of the base - your A/B control. At 1.0 you get the full target effect, and because the dial runs −5 to +5, 0.5 is half-strength, 1.5 is amplified, and −1 is the opposite direction. The tooltip's guidance for a trained LoRA is to start at 0.5 - LoRAs make the model more responsive to directions, so you need less.

The inputs

  • conditioning - the base embedding to modify (usually straight from an Encode).
  • direction - from Direction Compute, Direction Load, or an Average node.
  • scale - the dial. 0 = passthrough, 1 = standard, >1 amplified, <0 opposite.
  • method - lerp or slerp. Same story as Interpolate: lerp for moderate scales (0.3–1.2), slerp for large extrapolation or negative scales where lerp's magnitude can grow or collapse unpredictably.
  • scope - which token region the direction touches:
    • skip_prefix_N - text tokens only → expression / attribute edits.
    • keep_prefix_N - image tokens only → style / film / visual edits.
    • all_tokens - everything (default).
    • last_N_tokens - not recommended for Qwen.
  • prefix_N - the image/text boundary; 0 auto-reads from the conditioning's Encode metadata.
  • normalize_direction + target_rms - this pair is the secret to stacking. With normalize_direction on, the direction is rescaled to target_rms (default 2) before scale is applied, so scale means the same thing across different direction files. Chaining multiple directions? Turn it on and use the same target_rms on every Apply node, otherwise a loud direction will drown a quiet one.

Compound edits

Chain Apply nodes: each one feeds its output into the next, all sharing normalize_direction=True and the same target_rms, with equal weighting on each:

Encode(image, "editorial portrait") → Apply(lighting, 0.5) → Apply(color_warm, 0.4) → Apply(skin, 0.3) → Conditioned Edit

The coarse/fine rule

The docs hammer one point that saves you hours: text prompt = coarse intent, direction = fine character. A prompt saying "convert to black and white" will produce B&W at both scale +1 and scale −1 of a Silvermax direction - the direction shapes the tonal character of that conversion, not whether it happens. So always give Conditioned Edit a descriptive prompt; "portrait" alone gives the denoiser almost no operational context.

Installing it

ComfyUI Manager → "Eric Qwen-Edit", or git clone https://github.com/EricRollei/Eric_Qwen_Edit_Experiments.git into ComfyUI/custom_nodes, then restart. Needs a loaded Qwen-Image-Edit pipeline via the pack's loader (Qwen/Qwen-Image-Edit-2511, ~54 GB).

Gotchas

  • Direction applies, output unchanged? Check scale isn't 0 (that's the passthrough position) and that the direction wasn't computed from an unrelated image pair.
  • With a LoRA, don't stack full strength. A trained LoRA amplifies direction response; scale 1.0 on top of a LoRA can overshoot. Start at 0.5.
  • Match the scope to the direction type. Applying an expression direction (signal in text tokens) with keep_prefix_N does nothing, because you've excluded the region where the signal lives.
CategoryEric Qwen-Edit/Conditioning/Directions

Inputs (9)

NameTypeDefaultDescription
conditioningQWEN_CONDITIONINGBase conditioning to modify
directionQWEN_DIRECTIONDirection to apply
scaleFLOAT1.00-5–50=passthrough, 1=standard, >1=amplified, <0=opposite. With a trained LoRA, start at 0.5 - LoRA increases responsiveness.
methodoptCOMBOlerplerp: linear interpolation (fast, good for scale 0.3-1.2). slerp: spherical interpolation (preserves embedding magnitude; better for large scale >1.5 or negative scale).
scopeoptCOMBOall_tokensall_tokens: apply to entire sequence. skip_prefix_N: text tokens only → expression / attribute. keep_prefix_N: image tokens only → style / film / visual. last_N_tokens: not recommended for Qwen.
prefix_NoptINT00–5120 = auto from Encode metadata.
scope_NoptINT71–128Only used for last_N_tokens scope.
normalize_directionoptBOOLEANfalseNormalize direction to target_rms before applying scale. Makes scale comparable across direction files. Recommended when chaining multiple directions.
target_rmsoptFLOAT2.00.1–10RMS target when normalize_direction=True. Use same value across all Apply nodes.

Outputs (1)

NameTypeDescription
conditioningQWEN_CONDITIONING