Replicate lucataco/pasd-magnify
PASD detail-adding upscaler in ComfyUI
- image
- IMAGE
PASD - Pixel-Aware Stable Diffusion - is a "more detail" upscaler. It belongs to the same family as SUPIR: instead of just interpolating an image to be bigger, it uses a diffusion model to invent plausible detail while it scales, guided by a text prompt. That makes it good at magnifying soft or small images into something crisp and textured, and bad at leaving a clean image alone. This node runs PASD on Replicate's cloud through ComfyUI-Replicate.
Before anything else, sort out which upscaling job you actually have. If your source is already sharp and you just want more pixels, a plain ESRGAN or Lanczos pass is the right (and free, and instant) tool - a generative upscaler like PASD is overkill and will rewrite detail you didn't want touched. PASD is for the case where the image is soft or small and you want the model to add detail that was never there.
How it works
PASD conditions a Stable Diffusion upscaling pass on the input image plus a prompt, using pixel-aware guidance to keep the added detail aligned to the original structure. The prompt matters here - it nudges what kind of detail gets hallucinated. The node sends your image and settings to Replicate and returns the upscaled IMAGE.
Inputs and outputs that matter
Required input is an IMAGE. Output is an IMAGE.
upsample_scale(2) - the magnification, 1 to 4.prompt- a quality/description prompt that steers the added detail. The default ("clean, high-resolution, 8k, best quality, masterpiece") is a generic quality prompt; describing the actual subject can help it add the right detail.n_prompt- the negative, pre-filled to suppress noise, blur, and anatomy artifacts.denoise_steps(20, range 10–50) - more steps, more refinement, slower and pricier.conditioning_scale(1.1) - how tightly it holds to the input structure. Higher keeps it faithful; lower lets it invent more.guidance_scale(7.5) - standard CFG for the prompt.
seed fixes the result; force_rerun forces a fresh pass.
How to install it
ComfyUI Manager: search ComfyUI-Replicate, install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/replicate/comfyui-replicate
cd comfyui-replicate
pip install -r requirements.txt
Restart, and set your token first:
export REPLICATE_API_TOKEN="r8_************"; python main.py
Token: replicate.com/account/api-tokens.
Common issues
Image output, cleanly supported by the pack.
The shared trap of every generative upscaler applies: it rewrites faces. Like SUPIR, PASD adds detail based on what it thinks it's looking at, so a recognizable face can come back as a different-but-plausible one. Keep identifiable faces out of the pass, or give them a separate, gentler treatment. If it's over-texturing a clean image - adding grain or fake detail - either your source didn't need a generative upscaler at all, or your conditioning_scale is too low (raise it to stay faithful to the input).
If the added detail is generic mush, put the actual subject in the prompt rather than leaving the default quality-word soup. And the pack standard: a missing REPLICATE_API_TOKEN errors on the first run, more denoise_steps and higher upsample_scale cost more per run, and every call bills on Replicate. For genuinely degraded sources, SUPIR in this same pack is the heavier-hitting restoration option.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| promptopt | STRING | Frog, clean, high-resolution, 8k, best quality, masterpiece | — |
| n_promptopt | STRING | dotted, noise, blur, lowres, oversmooth, longbody, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality | — |
| denoise_stepsopt | INT | 2010–50 | — |
| upsample_scaleopt | INT | 21–4 | — |
| conditioning_scaleopt | FLOAT | 1.100.5–1.5 | — |
| guidance_scaleopt | FLOAT | 7.500.5–10 | — |
| seedopt | INT | — | |
| force_rerunopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |