PhotoDoddle Conditioning
The Flux edit trick that needs a very specific model
- model
- positive
- negative
- vae
- pixels
- model
- positive
- negative
- latent
PhotoDoddle Conditioning is the setup stage for a specific style of Flux image editing: you hand it a photo and it prepares everything a KSampler needs to turn that photo into something new while keeping the composition. The "PhotoDoddle" spelling with the double-d is the pack author's typo - the technique comes from the PhotoDoodle Flux fine-tune, originally wired up in the ComfyUI-PhotoDoodle project by Yuan-ManX. This node is that project's conditioning stage, ported into Duanyll Nodepack.
The honest framing first: this is a niche node for a niche model. It's not an instruction editor you can just drop into any Flux workflow. It's the plumbing for running PhotoDoodle weights specifically. If you just want to edit images with a sentence, Flux Kontext or Qwen-Image-Edit have friendlier, better-supported paths. Reach for this one when you're deliberately running PhotoDoodle.
How it works
The mechanism is the interesting part, and it's the same trick Flux Kontext and Flux Fill use - what the KB's flux-kontext panel calls in-context concatenation: the reference image rides inside the conditioning rather than through a separate adapter like IP-Adapter or ControlNet.
Specifically, the node patches your Flux model in place:
- It swaps the model's forward pass so it expects a 32-channel latent instead of the usual 16 - the 16 real latent channels plus 16 extra "condition" channels carrying the input image.
- It replaces
concat_condso the extra channels are fed from the conditioning rather than loaded as weights. - It VAE-encodes your
pixelsinto that 16-channel concat latent and injects it into both the positive and negative conditionings under theconcat_latent_imagekey. - It hands you a fresh random-noise latent for the sampler to denoise.
That's why all four outputs come back as one bundle - the patched model, the enriched conditionings, and the starter latent are only meaningful together.
Inputs and outputs
model(MODEL) - must be a Flux checkpoint. The node checks and throws a clear error otherwise.positive/negative(CONDITIONING) - your usual text conditionings; the image gets merged in.vae(VAE) andpixels(IMAGE) - the encoder and the source photo.- Outputs:
model,positive,negative,latent- wire all four into a KSampler, then VAE-decode the result.
The gotchas that will bite you
- The pack doesn't ship the model. This node patches and conditions; it cannot summon PhotoDoodle weights. You have to source the PhotoDoodle Flux model yourself - the ComfyUI-PhotoDoodle repo is where its author documents that. Run it against a plain Flux checkpoint and you'll get the error that the input latent has 16 channels instead of 32 - the model wasn't trained for the concat conditioning.
- Image dimensions must be divisible by 16. The node checks
pixelsand refuses otherwise. Crop or resize first. - Don't stack a Flux ControlNet LoRA on top. The patched
concat_condvalidates channel counts and will call you out - the error message literally asks "Did you mistakenly load a Flux control lora?" - because the LoRA changes the model's input width and breaks the math.
Install
ComfyUI Manager → search Duanyll Nodepack → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/Duanyll/duanyll_nodepack
The pack pulls in kornia, opencv-python-headless and friends, but nothing here downloads at install. The only heavy lift - the PhotoDoodle weights - is on you, and it's the reason to read the original project's docs before you start.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| vae | VAE | — | |
| pixels | IMAGE | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |
| latent | LATENT | — |