⚗ Alchemica Photo Composite (keep the rest identical)
Repaint one zone, keep the rest pixel-identical
- original
- new_image
- mask
- image
You repainted four pixels of someone's eye colour and the whole photo came back slightly softer, slightly shifted, with a different wall behind them. This node is the fix: paste the result back only where you painted.
What it is
AlchemicaPhotoComposite is the second half of the AlchemicaSampler pack's photo pair, the one that ends the story started by ⚗ Alchemica Photo Prepare. Prepare encodes your photo into a latent with a mask baked in, you run it through Krea 2, and then this node composites the decoded result over the original through that same mask. Outside the mask, the photo is untouched - pixel for pixel, no VAE round-trip, no drift in the parts you were happy with.
That matters more than it sounds. Inpainting with a normal masked latent still means the whole image goes through the model's decoder, and a VAE decode is not free of change: skin softens, fine texture fuzzes, sometimes colours shift a hair. When the thing you wanted to change is one eye, "everything else came back 3% different" is the whole complaint. Compositing through the mask removes that complaint entirely.
How it works
It's deliberately dumb, and that's the appeal. The mask you fed in is already grown and feathered by Photo Prepare (mask_grow and mask_feather), so the blend edge is soft in exactly the way you set up earlier. This node takes original, new_image and mask, and does a straight per-pixel lerp: original × (1 − mask) + new × mask. Where the mask is 1 you get Krea's output, where it's 0 you get the original bytes, and in the feathered band you get a normal cross-fade.
Two conveniences are baked in. If the new image doesn't match the original's size it gets resized to fit, so a slightly different working resolution won't break the paste. And if the mask comes through as all-white - which is what Photo Prepare emits when you didn't paint anything - the node just returns the new image as it is. No mask means the whole photo, which is the sane reading.
Inputs and outputs
Three required inputs, no widgets to fuss over:
original- theimageoutput of ⚗ Alchemica Photo Prepare, i.e. the photo at the working size. Not your file on disk. If you feed the un-resized original, the composite edge sits in the wrong place.new_image- the decoded result of your Krea 2 sampler (theimageoutput of the KSampler / sampler node), at whatever size it produced.mask- themaskoutput of the same Prepare node. It carries the grow and feather you configured there.
One output: image. Wire it into Save Image, or into a Preview, or into the Black and White node if you're going further.
Installing it
ComfyUI Manager, search "AlchemicaSampler", or the usual:
cd ComfyUI/custom_nodes
git clone https://github.com/Nessuno76/ComfyUI-AlchemicaSampler
# restart the ComfyUI server, not just the browser
The pack needs ComfyUI 0.36.0 or newer and has no extra Python dependencies. For anything to generate you also need the three Krea 2 files, none of them bundled: krea2_turbo_nvfp4.safetensors (or the fp8_scaled one) into models/diffusion_models, qwen3vl_4b_fp8_scaled.safetensors into models/text_encoders, qwen_image_vae.safetensors into models/vae. This node itself uses none of them - it's pure pixel maths - but it's useless without a sampler upstream.
Where it goes wrong
- Feather applied twice. The mask arriving here is already softened. Don't run it through another blur node first; you'll get a halo where the new pixels sit on top of a gradient that doesn't match the surrounding texture.
- The mask is all white and you expected a partial change. Photo Prepare warns about this in its report - the classic cause is painting the zone you want to keep in the MaskEditor, or using invert. The composite is behaving correctly; the mask is wrong upstream.
- A hard seam at the edge. Usually mask_grow is too small: the model had no context to blend into, so the boundary is where the two renderings meet. Bump the grow (12–24px is a normal range) and re-run rather than fighting it here.
- Nothing changed at all. Check the new image actually differs from the original - with denoise low enough, Krea 2 returns something extremely close to the input, and the composite faithfully pastes near-identical pixels.
For the classic inpainting rule, this node changes nothing: generous mask overlap and a feathered edge beat a tight, precise mask every time.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| original | IMAGE | 'foto' from ⚗ Photo · prepare | |
| new_image | IMAGE | The decoded result of ⚗ AlchemicaKrea | |
| mask | MASK | 'maschera' from ⚗ Photo · prepare |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |