Nodes/ComfyUI-Replicate/Replicate philz1337x/clarity-upscaler
ComfyUI Node

Replicate philz1337x/clarity-upscaler

The open Magnific-style upscaler in ComfyUI

By replicate·Created 2 years ago·Updated 2 years ago· 207
Replicate philz1337x/clarity-upscaler
  • image
  • mask
  • IMAGE
promptmasterpiece, best quality, highres, <lora:more_details:0.5> <lora:SDXLrender_v2.0:1>
negative_prompt(worst quality, low quality, normal quality:2) JuggernautNegative-neg
scale_factor2.00
dynamic6.00
creativity0.35
resemblance0.60
tiling_width112
tiling_height144
sd_modeljuggernaut_reborn.safetensors [338b85bc4f]
schedulerDPM++ 3M SDE Karras
num_inference_steps18
seed1337
downscalingfalse
downscaling_resolution768
lora_links
custom_sd_model
sharpen0.00
handfixdisabled
patternfalse
output_formatpng
force_rerunfalse

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:
    cd ComfyUI/custom_nodes
    git clone https://github.com/replicate/comfyui-replicate
    cd comfyui-replicate
    pip install -r requirements.txt
    
    then restart.

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.

CategoryReplicate

Inputs (23)

NameTypeDefaultDescription
imageIMAGE
promptoptSTRINGmasterpiece, best quality, highres, <lora:more_details:0.5> <lora:SDXLrender_v2.0:1>
negative_promptoptSTRING(worst quality, low quality, normal quality:2) JuggernautNegative-neg
scale_factoroptFLOAT2.00
dynamicoptFLOAT6.001–50
creativityoptFLOAT0.350–1
resemblanceoptFLOAT0.600–3
tiling_widthoptCOMBO11216 options: 16, 32, 48, 64, 80, 96, +10
tiling_heightoptCOMBO14416 options: 16, 32, 48, 64, 80, 96, +10
sd_modeloptCOMBOjuggernaut_reborn.safetensors [338b85bc4f]3 options: epicrealism_naturalSinRC1VAE.safetensors [84d76a0328], juggernaut_reborn.safetensors [338b85bc4f], flat2DAnimerge_v45Sharp.safetensors
scheduleroptCOMBODPM++ 3M SDE Karras30 options: DPM++ 2M Karras, DPM++ SDE Karras, DPM++ 2M SDE Exponential, DPM++ 2M SDE Karras, Euler a, Euler, +24
num_inference_stepsoptINT181–100
seedoptINT1337
downscalingoptBOOLEANfalse
downscaling_resolutionoptINT768
lora_linksoptSTRING
custom_sd_modeloptSTRING
sharpenoptFLOAT0.000–10
maskoptIMAGE
handfixoptCOMBOdisabled3 options: disabled, hands_only, image_and_hands
patternoptBOOLEANfalse
output_formatoptCOMBOpng3 options: webp, jpg, png
force_rerunoptBOOLEANfalse

Outputs (1)

NameTypeDescription
IMAGEIMAGE