Nodes/⚗ AlchemicaSampler/⚗ Alchemica · Photo · prepare (improve / upscale / mask) [1.0, use Alchemica Photo Prepare (improve / upscale / mask)]
ComfyUI Node

⚗ Alchemica · Photo · prepare (improve / upscale / mask) [1.0, use Alchemica Photo Prepare (improve / upscale / mask)]

Improving a real photo with Krea 2 without melting the face

By Nessuno76·Created about a month ago·Updated 21 days ago· 4
⚗ Alchemica · Photo · prepare (improve / upscale / mask) [1.0, use Alchemica Photo Prepare (improve / upscale / mask)]
  • foto
  • vae
  • maschera
  • modello_upscale
  • latent
  • foto
  • maschera
  • denoise
  • report
◄modomigliora (ritocco leggero)►
◄forza-1.00►
◄megapixel3.00►
◄allarga_maschera12►
◄sfuma_maschera24►

Working on an existing photo is where img2img workflows usually fall apart: you push denoise until the detail shows up and the person stops being the person. This node is the setup half of a two-node answer - it gets the photo into the right resolution, at the right denoise, with a mask that can be feathered, and hands the sampler a latent.

It's the 1.0 node with Italian parameter names; the English twin is ⚗ Alchemica Photo Prepare. Same code, and the mapping is at the bottom.

What the pack actually measured

This is the part worth trusting, because it's specific and it's counterintuitive. On a real photo, re-drawing at the photo's own size came out softer than the original - face similarity 0.76, sharpness 105–106 against 329 for the source - and the eyes turned green. Upscaling to 3 MP first and then re-drawing the detail gave similarity 0.82 and sharpness 245.

So: don't work at the photo's native size. Upscale past it, then let the model re-draw. That's what megapixel is for, and why the node defaults to 3.

The inputs

  • foto - the photo. To change only one zone, paint it in the MaskEditor (right-click the Load Image node → Open in MaskEditor).
  • vae - the Qwen-Image VAE.
  • modo - the preset that sets everything: migliora (~0.22–0.30) is the same photo, cleaner; ricostruisci 0.40 re-draws the detail while keeping the subject; cambia 0.60 applies the prompt while keeping pose and composition; trasforma 0.80 treats the photo as a base only.
  • forza - -1 means "use the mode's denoise". Set it yourself if you want a specific value; the pack's measurements were taken around 0.6 with 0.3–0.8 as the useful range.
  • megapixel - the working size, 3 MP recommended, 0 = the photo's own size (which is the setup that produced the soft result, so think about it first).
  • allarga_maschera - pixels added around the painted zone, so the edge itself gets redrawn rather than left as a seam.
  • sfuma_maschera - soft edge in pixels, 24 by default. This is your anti-seam control.
  • maschera (optional) - the Load Image node's MASK output. Empty means the whole photo.
  • modello_upscale (optional) - an upscale model, used only when megapixel exceeds the photo's size, before Krea re-draws the detail.

Outputs, and every one of them has a destination: latent to the sampler, foto and maschera to ⚗ Photo · compose for the final paste-back, denoise (FLOAT) to the sampler's denoise - wire it, don't retype it - and report.

The workflow it belongs to

Load Image ──foto──► ⚗ Photo · prepare ──latent───► Alchemica KSampler (denoise wired from 'denoise')
Load Image ──mask──►                    ──foto─────┐
                                        ──maschera─┤
KSampler image ──────────────────────────────────► ⚗ Photo · compose → Save

The pack's KREA2_FOTO_RAPIDO is this, wired. Three things it does that you should copy: describe the photo with the Prompt enhancer rather than typing a generic prompt (the encoder can look at the image, and it's the difference between similarity 0.81 and 0.76), keep ancestral noise off (variety 0) because you're refining a real photo, and go through an upscale model to 3 MP rather than working at native size.

One caveat the pack flags itself: if the painted mask covers the whole photo, you've just built a very slow img2img and the node warns you.

Installing

# ComfyUI Manager: search "AlchemicaSampler"
cd ComfyUI/custom_nodes && git clone https://github.com/Nessuno76/ComfyUI-AlchemicaSampler

ComfyUI 0.36+, no pip dependencies, restart the server. Model files (krea2_turbo_nvfp4, qwen3vl_4b_fp8_scaled, qwen_image_vae) are not included.

Porting to the 1.1 node

foto → image, modo → mode, forza → strength, megapixel → megapixel, allarga_maschera → mask_grow, sfuma_maschera → mask_feather, maschera → mask, modello_upscale → upscale_model; outputs latent, foto → image, maschera → mask, denoise, report. Do it - the English node is where fixes land, and it's discoverable in the search box.

Where people get burned

Soft results. You worked at native resolution. Raise megapixel and put an upscale model in front of the redraw.

A visible rectangle where you painted. sfuma_maschera too low, or allarga_maschera too low so the boundary is being drawn from neither the new nor the old image convincingly.

Denoise typed by hand and inconsistent. Wire the denoise output. That's what it's there for, and it's how the mode presets stay meaningful when you switch them.

Category⚗ AlchemicaMente/legacy (1.0)

Inputs (9)

NameTypeDefaultDescription
fotoIMAGEThe photo to work on. To change only one zone, paint it: right click on the Load Image node -> Open in MaskEditor
vaeVAE—
modoCOMBOmigliora (ritocco leggero)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
forzaFLOAT-1.00-1–1-1 = from the mode. Otherwise the denoise you want (0.1 almost nothing ... 1.0 a new image)
megapixelFLOAT3.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
allarga_mascheraINT120–128Pixels added around the painted zone (so the edge is redrawn too)
sfuma_mascheraINT240–128Soft edge in pixels: the new zone blends into the photo without a seam
mascheraoptMASKThe MASK output of Load Image (painted zone). Empty = the whole photo
modello_upscaleoptUPSCALE_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)
fotoIMAGEThe photo at the working size: to ⚗ Photo · compose 'originale'
mascheraMASKThe feathered mask (all white if none): to ⚗ Photo · compose
denoiseFLOATTo ⚗ AlchemicaKrea denoise (convert the widget to an input)
reportSTRINGWhat was done