Eric Qwen Direction Average
Average 2-4 pairs so one image doesn't own your edit
- direction_1
- direction_2
- direction_3
- direction_4
- direction
A direction computed from one image pair is stuck to that image. Average a few pairs and you get the thing that actually transfers. Eric Qwen Direction Average merges 2–4 QWEN_DIRECTIONs into one, and it does exactly what averaging implies: consistent components reinforce, inconsistent ones cancel.
That's the mechanism, and it's worth understanding because it's why directions generalize at all. A "film look" direction computed from a single portrait carries that person's skin tone, background, and lighting with it. Average it with directions from five other diverse portraits and the person-specific stuff cancels out while the shared "film look" axis - which pointed the same way in every pair - survives intact. The docs measured it: averaging 14 Silvermax pairs dropped RMS to 28% of the individual pair values, which is another way of saying most of the magnitude was image noise.
The inputs
direction_1,direction_2- required.direction_3,direction_4- optional.normalize- off by default here (unlike the folder version). Averaging shrinks magnitude, so the recommended move is to flip this on and rescale totarget_rms.target_rms- the rescale target: 1.0 unit direction, 2.0 moderate default, 3.5 ≈ the strength of a typical single pair. Pick one number and use it across your whole library soscale=1.0always means the same intensity.
Output is one direction.
The honest quality ladder
From the docs, how many pairs you need:
| Pairs | What you get | |---|---| | 1 | Image-specific - only good for that exact image | | 3 | Major improvement, most obvious content cancels | | 5 | Good for most applications | | 8–10 | Excellent, well-generalized | | 14+ | Diminishing returns |
For 3–4 pairs, this node is fine. Past that, use Direction Average From Folder - it'll chew through a whole directory of saved pairs in one go.
Where the average points
When you average directions, use a mix: skin tones, hair colors, lighting setups, backgrounds, focal distances. If you want a gender-neutral transfer, include both male and female subjects. Every dimension you cover is one that won't accidentally dominate the averaged axis.
Installing it
ComfyUI Manager → "Eric Qwen-Edit", or:
cd ComfyUI/custom_nodes
git clone https://github.com/EricRollei/Eric_Qwen_Edit_Experiments.git
Restart. Needs a loaded Qwen-Image-Edit pipeline upstream only if the directions come from live Direction Compute nodes; pre-saved direction files need no model.
Gotchas
- The average is quieter, not broken. If the averaged direction feels weak, that's the cancellation doing its job - turn on
normalizeand settarget_rmsto ~2.0–3.5 to restore comparable strength. - Averaging similar images wastes the step. Two near-identical portraits cancel nearly everything. Diversity is the input quality that matters.
- Consistency beats quantity. Use the same wording pattern for the target/baseline prompts across all your pairs so the text-token signal points the same way in every direction.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| direction_1 | QWEN_DIRECTION | — | |
| direction_2 | QWEN_DIRECTION | — | |
| direction_3opt | QWEN_DIRECTION | — | |
| direction_4opt | QWEN_DIRECTION | — | |
| normalizeopt | BOOLEAN | false | — |
| target_rmsopt | FLOAT | 2.00.1–10 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| direction | QWEN_DIRECTION | — |