ComfyUI YSC HighRes-Fix
A custom node for ComfyUI designed to simplify the "High-Resolution Fix" process. This node takes an input image, performs a direct upscale, and then re-encodes it into a latent image, preparing it for a final sampling pass to add details.
What It Does
This node replicates the functionality of a high-resolution fix pipeline. Instead of just resizing an image, it intelligently upscales it and then uses a diffusion sampling process (denoising) to add fine details that are consistent with the original image's content.
How It Works
The node's operation is straightforward:
- Image Input: You provide a low-resolution image (e.g., the output of your initial generation).
- Brute Upscale: The node applies a simple, direct upscale to the image to increase its dimensions.
- Latent Encoding: This larger, upscaled image is then encoded back into the latent space.
- Latent Output: The node outputs this new, larger latent image.
This output latent is then ready to be passed to a KSampler node (or similar) with a low-to-moderate denoising strength. This final sampling step is where the new details are "painted" onto the upscaled image.
How to Use (Example Workflow)
- Generate your initial image (e.g., 512x512) as you normally would.
- Connect the output image from your
VAE Decodenode to theimageinput of the YSC HighRes-Fix node. - Connect the
LATENToutput from the YSC HighRes-Fix node to thelatent_imageinput of a secondKSamplernode. - Connect your model, positive prompt, and negative prompt to this second
KSampler. - Crucially, set the
denoiseon this secondKSamplerto a value like0.3to0.55. This value controls how much detail is added. - Connect the
LATENToutput of thisKSamplerto a finalVAE Decodenode to get your high-resolution image.
Inputs
image: The source image (from aVAE DecodeorLoad Imagenode) that you want to upscale and refine.
Outputs
LATENT: The upscaled and re-encoded latent image, ready for a final sampling (denoising) pass.
Installation
- Navigate to your
ComfyUI/custom_nodes/directory. - Clone this repository:
(Replace the URL with your actual repository URL)
git clone [https://github.com/yannickcruz/ComfyUI-YSC-HighResFix.git](https://github.com/yannickcruz/ComfyUI-YSC-HighResFix.git) - Alternatively, download the
.pyfiles from this repository and place them directly in theComfyUI/custom_nodes/directory. - Restart ComfyUI.