ComfyUI > Nodes > antrobots ComfyUI Nodepack > KSampler with Refiner

ComfyUI Node: KSampler with Refiner

Class Name

refine

Category
antrobots-ComfyUI-nodepack/sampling
Author
antrobot (Account age: 3193days)
Extension
antrobots ComfyUI Nodepack
Latest Updated
2025-04-02
Github Stars
0.02K

How to Install antrobots ComfyUI Nodepack

Install this extension via the ComfyUI Manager by searching for antrobots ComfyUI Nodepack
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter antrobots ComfyUI Nodepack in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

KSampler with Refiner Description

Enhance image quality and detail using two-step sampling process with base and refiner models for refined output.

KSampler with Refiner:

The refine node is designed to enhance the quality and detail of generated images by utilizing a two-step sampling process. It leverages both a base model and a refiner model to iteratively improve the output, ensuring that the final image is more refined and closer to the desired outcome. This node is particularly beneficial for tasks that require high precision and detail, as it allows for a more controlled and nuanced approach to image generation. By integrating a refiner model, the node can apply additional processing steps that enhance the image's features, leading to a more polished and visually appealing result. The main goal of the refine node is to provide users with the ability to produce high-quality images with improved detail and accuracy, making it an essential tool for AI artists seeking to elevate their creative outputs.

KSampler with Refiner Input Parameters:

base_pipe

The base_pipe parameter is a tuple that contains the components of the base model pipeline. It includes the base model, VAE, and other necessary elements for the initial image generation process. This parameter is crucial as it sets the foundation for the image that will be refined.

KSampler with Refiner_pipe

The refine_pipe parameter is a tuple similar to base_pipe, but it contains the components of the refiner model pipeline. This parameter is used in the second stage of the sampling process to enhance the image generated by the base model.

total_steps

The total_steps parameter defines the total number of sampling steps to be performed. It impacts the level of detail and refinement in the final image, with more steps generally leading to higher quality results. The minimum value is 1, and there is no strict maximum, but it should be set according to the desired balance between quality and computational resources.

KSampler with Refiner_step

The refine_step parameter specifies the step at which the refiner model should take over from the base model. It allows for control over when the refinement process begins, impacting the final image's detail and quality.

cfg

The cfg parameter stands for configuration and includes various settings that influence the sampling process. It can affect aspects such as noise levels and model behavior, playing a significant role in the outcome of the image generation.

sampler_name

The sampler_name parameter indicates the name of the sampling method to be used. Different samplers can produce varying results, so this parameter allows users to select the most suitable method for their specific needs.

scheduler

The scheduler parameter manages the scheduling of the sampling steps, ensuring that they are executed in the correct order and at the appropriate times. It is essential for maintaining the flow and timing of the image generation process.

image

The image parameter is a tensor representing the initial image to be refined. It serves as the starting point for the refinement process, and its dimensions influence the size and resolution of the final output.

seed

The seed parameter is used to initialize the random number generator, ensuring reproducibility of the results. By setting a specific seed, users can generate the same image multiple times, which is useful for experimentation and comparison.

base_denoise

The base_denoise parameter controls the level of denoising applied during the base model's sampling process. It affects the smoothness and clarity of the initial image, with higher values leading to less noise.

KSampler with Refiner_denoise

The refine_denoise parameter is similar to base_denoise but applies to the refiner model's sampling process. It influences the final image's detail and noise levels, allowing for fine-tuning of the refinement stage.

use_image

The use_image parameter is a boolean that determines whether an existing image should be used as the starting point for refinement. If set to true, the provided image is encoded and used; otherwise, a new latent image is generated.

mask

The mask parameter is an optional tensor that defines areas of the image to be preserved or altered during refinement. It allows for targeted refinement, enabling users to focus on specific parts of the image.

KSampler with Refiner Output Parameters:

image

The image output parameter is a tensor representing the final refined image. It is the result of the two-step sampling process, combining the base and refiner models' outputs to produce a high-quality, detailed image. This output is crucial for users seeking to create visually appealing and precise images.

KSampler with Refiner Usage Tips:

  • Experiment with different refine_step values to find the optimal point for switching from the base model to the refiner model, as this can significantly impact the final image quality.
  • Adjust the base_denoise and refine_denoise parameters to control the level of detail and noise in the image, balancing smoothness and clarity according to your artistic goals.

KSampler with Refiner Common Errors and Solutions:

"Invalid pipeline configuration"

  • Explanation: This error occurs when the base_pipe or refine_pipe is not correctly configured or missing essential components.
  • Solution: Ensure that both pipelines are properly set up with all necessary elements, including the model, VAE, and other components.

"Mismatch in image dimensions"

  • Explanation: This error arises when the dimensions of the input image do not match the expected size for the model.
  • Solution: Verify that the input image tensor has the correct dimensions and adjust if necessary to match the model's requirements.

"Invalid mask shape"

  • Explanation: This error is triggered when the provided mask does not have the correct shape or dimensions.
  • Solution: Check the mask tensor's shape and ensure it aligns with the image dimensions, making adjustments as needed.

KSampler with Refiner Related Nodes

Go back to the extension to check out more related nodes.
antrobots ComfyUI Nodepack
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.