Nodes/⚗ AlchemicaSampler/⚗ Alchemica Photo Prepare (improve / upscale / mask)
ComfyUI Node

⚗ Alchemica Photo Prepare (improve / upscale / mask)

Img2img on a real photo without wrecking it

By Nessuno76·Created about a month ago·Updated 21 days ago· 4
⚗ Alchemica Photo Prepare (improve / upscale / mask)
  • image
  • vae
  • mask
  • upscale_model
  • latent
  • image
  • mask
  • denoise
  • report
◄modeimprove (light retouch)►
◄strength-1.00►
◄megapixels3.00►
◄mask_grow12►
◄mask_feather24►

Feed a photo to a Krea 2 sampler at 1:1 and the honest result is softer than what you put in. This node exists because its author measured that and then built the workaround into the pipeline.

What it is

AlchemicaPhotoPrepare is the front half of the pack's photo workflow - the back half being ⚗ Alchemica Photo Composite. It takes your photo, resizes it to a working resolution, VAE-encodes it (carrying a mask if you painted one), picks the denoise strength that matches the intent you selected, and hands all of that to the sampler. Five outputs, each pointed at one specific socket downstream.

The measured finding behind the design, straight from the pack's notes on a real photo: re-drawing at the photo's own size gave a face similarity of 0.76 versus the original and a sharpness of 106 against the original's 329. Softer, and the eyes changed colour. Upscaling to 3 MP first and then re-drawing scored 0.82 similarity and 245 sharpness. Same model, same prompt - the order of operations was the whole difference. That's why megapixels defaults to 3 and not "original size".

The inputs that matter

  • image - the photo. To change one zone only, paint it: right-click the Load Image node → Open in MaskEditor.
  • vae - you need the Qwen-Image VAE here (the one in models/vae), because this node encodes. Above ~4.5 MP it switches to a tiled encode to keep VRAM down.
  • mode - the intent dial. improve (light retouch), rebuild (more detail), change (same pose), transform (use as base). Each one maps to a denoise number.
  • strength - leave it at −1 and the mode decides. Set it and you win: anything from 0.1 (almost nothing) to 1.0 (a new image). The report always prints the number it actually used, which is the fastest way to learn what the modes mean on your photo.
  • megapixels - working size, 0 = the photo's own size. 3 MP is the recommendation; sides get rounded to multiples of 16.
  • mask_grow / mask_feather - only relevant when you painted a mask. Grow adds pixels around the painted zone so the edge gets redrawn with it; feather softens the boundary so the new zone doesn't show a seam. 12 and 24 are the defaults and they're sensible.
  • Optional mask - the MASK output of Load Image. Empty means whole photo. Optional upscale_model - an ESRGAN-type model, used only when megapixels is above the photo's size, before Krea re-draws the detail.

A mask needs more than 0.1% of its pixels painted to count at all, and if your mask covers more than 95% the report warns you - usually someone painted the wrong thing or hit invert.

The outputs

  • latent → the sampler's latent_image. It carries the mask, so only the painted zone is re-drawn.
  • image → ⚗ Photo Composite's original. This is the photo at the working size, which is what the composite needs.
  • mask → ⚗ Photo Composite's mask.
  • denoise (FLOAT) → the sampler's denoise widget, converted to an input. That's how the mode's number gets where it needs to go.
  • report - resolution, whether the upscale model ran, mask stats, and the denoise it picked.

Installing it

ComfyUI Manager, search "AlchemicaSampler", or:

cd ComfyUI/custom_nodes
git clone https://github.com/Nessuno76/ComfyUI-AlchemicaSampler
# restart the server afterwards

No extra Python dependencies; ComfyUI 0.36.0+. You need the Krea 2 model, its Qwen3-VL text encoder and the Qwen-Image VAE in the right folders to actually generate.

Where it goes wrong

  • The result looks blurrier than the source. You worked at the photo's own size. Set megapixels to 3, connect an upscale model, and let the sampler re-draw the detail at the bigger size.
  • The whole photo changed. Either the mask is empty (check the report - it says "no mask: the whole photo") or you painted the wrong region.
  • Wet, speckled skin. The pack's own lab notes are blunt about this: ancestral variety noise has to be off for photo work, and detail boost has to stay low - 0.40 covers skin with coloured speckles, 0.12 raises micro-relief without the chroma noise.
  • Eyes or hair change colour when you didn't ask. Classic img2img at 0.6+. Drop toward the improve/rebuild end, or mask the eyes and let the composite keep the rest identical.
  • Out of memory at 4 MP+. Use the fast mode, or drop the working size - 16 GB is the pack's stated happy place.
Category⚗ AlchemicaMente/image

Inputs (9)

NameTypeDefaultDescription
imageIMAGEThe photo to work on. To change only one zone, paint it: right click on the Load Image node -> Open in MaskEditor
vaeVAE—
modeCOMBOimprove (light retouch)migliora 0.22 = same photo, cleaner · ricostruisci 0.40 = new detail, same subject · cambia 0.60 = applies the prompt, same pose · trasforma 0.80 = the photo is only a base
strengthFLOAT-1.00-1–1-1 = from the mode. Otherwise the denoise you want (0.1 almost nothing ... 1.0 a new image)
megapixelsFLOAT3.000–8Working size. 3 MP recommended: re-drawing a photo at its own size makes it SOFTER (measured), upscaling first and re-drawing makes it sharper. 0 = the photo's own size
mask_growINT120–128Pixels added around the painted zone (so the edge is redrawn too)
mask_featherINT240–128Soft edge in pixels: the new zone blends into the photo without a seam
maskoptMASKThe MASK output of Load Image (painted zone). Empty = the whole photo
upscale_modeloptUPSCALE_MODELOptional: used only when megapixel > the photo's size, before Krea re-draws the detail

Outputs (5)

NameTypeDescription
latentLATENTTo ⚗ AlchemicaKrea latent_image (it carries the mask: only that zone is re-drawn)
imageIMAGEThe photo at the working size: to ⚗ Photo · compose 'originale'
maskMASKThe feathered mask (all white if none): to ⚗ Photo · compose
denoiseFLOATTo ⚗ AlchemicaKrea denoise (convert the widget to an input)
reportSTRINGWhat was done