Replicate philz1337x/clarity-upscaler
The open Magnific-style upscaler in ComfyUI
- image
- mask
- IMAGE
Clarity Upscaler is the popular open-source answer to Magnific - a creative upscaler that enlarges an image while inventing convincing detail: skin pores, hair strands, fabric texture. It got a lot of attention as "Magnific reverse-engineered and made open source," and under the hood it's a MultiDiffusion + ControlNet + LoRA stack on an SD1.5 checkpoint. This node runs it on Replicate's cloud, so there's nothing to set up locally, no VRAM budget, and it works on any machine - you just need a Replicate account, a REPLICATE_API_TOKEN, and to accept per-run cost.
Match the tool to the job first. Our upscaling notes separate "more pixels" (fast, non-generative) from "more detail" (generative, invents texture). Clarity is firmly the second kind. It'll transform a soft or small image - and, being generative, it will rewrite faces.
How it works
It tiles the image, runs a diffusion pass over each tile guided by a ControlNet that keeps every tile faithful to the source, and blends them - which is how it hits large sizes without the composition breaking. Detail LoRAs push texture on top. The two knobs that decide everything are creativity (how much new detail it's allowed to invent) and resemblance (how tightly it holds to the original). That pair is the entire personality of this class of upscaler.
The inputs and outputs that matter
image(required) - the picture to upscale.scale_factor(2) - how much bigger. 2× is the safe default; higher costs more and hallucinates more.creativity(0.35) - the reimagine dial. Up for grungy, detailed texture; down to stay faithful.resemblance(0.6) - how strongly the ControlNet holds it to the source. Raise it if the output drifts from the original.prompt/negative_prompt- the defaults already embed detail LoRAs (<lora:more_details>) and a quality negative; you can add a description of the subject to steer texture.
Output is a single IMAGE. Notable extras: handfix (disabled / hands_only / image_and_hands) to specifically repair hands, sd_model to pick the base checkpoint (Juggernaut Reborn by default), num_inference_steps (18), dynamic (HDR), sharpen, mask for targeted upscaling, and force_rerun to skip Replicate's cache.
How to install it
One install brings every Replicate node.
- ComfyUI Manager: search ComfyUI-Replicate, install, restart.
- Manual:
then restart.cd ComfyUI/custom_nodes git clone https://github.com/replicate/comfyui-replicate cd comfyui-replicate pip install -r requirements.txt
No weights land on disk - just the replicate pip package. Set your token first: export REPLICATE_API_TOKEN="r8_..." (replicate.com/account/api-tokens).
Common issues & troubleshooting
The face changed. Expected - generative upscalers rebuild faces they don't recognize rather than preserving them. Turn handfix on for hands, but for a recognizable face, keep it out of the upscale and inpaint it separately. This is inherent to the tile-ControlNet approach, not a setting you can fully fix.
It hallucinated detail or over-crisped the image. Lower creativity (try 0.2) and raise resemblance. If the source was already sharp and you only wanted it bigger, this is the wrong tool - use a plain ESRGAN pixel upscaler that adds resolution without inventing anything.
It added a slightly "SD 1.5" texture. Clarity is built on an SD1.5 checkpoint, so its invented detail carries that flavor. Try a different sd_model (EpicRealism vs Juggernaut vs the anime option) to better match your image, and keep creativity modest.
Same image on a re-run. Replicate returned the cached result. Change the seed or set force_rerun.
Inputs (23)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| promptopt | STRING | masterpiece, best quality, highres, <lora:more_details:0.5> <lora:SDXLrender_v2.0:1> | — |
| negative_promptopt | STRING | (worst quality, low quality, normal quality:2) JuggernautNegative-neg | — |
| scale_factoropt | FLOAT | 2.00 | — |
| dynamicopt | FLOAT | 6.001–50 | — |
| creativityopt | FLOAT | 0.350–1 | — |
| resemblanceopt | FLOAT | 0.600–3 | — |
| tiling_widthopt | COMBO | 112 | 16 options: 16, 32, 48, 64, 80, 96, +10 |
| tiling_heightopt | COMBO | 144 | 16 options: 16, 32, 48, 64, 80, 96, +10 |
| sd_modelopt | COMBO | juggernaut_reborn.safetensors [338b85bc4f] | 3 options: epicrealism_naturalSinRC1VAE.safetensors [84d76a0328], juggernaut_reborn.safetensors [338b85bc4f], flat2DAnimerge_v45Sharp.safetensors |
| scheduleropt | COMBO | DPM++ 3M SDE Karras | 30 options: DPM++ 2M Karras, DPM++ SDE Karras, DPM++ 2M SDE Exponential, DPM++ 2M SDE Karras, Euler a, Euler, +24 |
| num_inference_stepsopt | INT | 181–100 | — |
| seedopt | INT | 1337 | — |
| downscalingopt | BOOLEAN | false | — |
| downscaling_resolutionopt | INT | 768 | — |
| lora_linksopt | STRING | — | |
| custom_sd_modelopt | STRING | — | |
| sharpenopt | FLOAT | 0.000–10 | — |
| maskopt | IMAGE | — | |
| handfixopt | COMBO | disabled | 3 options: disabled, hands_only, image_and_hands |
| patternopt | BOOLEAN | false | — |
| output_formatopt | COMBO | png | 3 options: webp, jpg, png |
| force_rerunopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |