ComfyUI-SUPIR

1875

SUPIR_Upscale

SUPIR_Upscale Node Documentation

Overview

The SUPIR_Upscale node is a component within the ComfyUI environment designed to upscale images using the SUPIR image restoration pipeline. This node integrates the functionalities of the SUPIR model and the SDXL model to provide high-quality image upscaling. With features such as ControlNet, denoising encoders, and configurable sampling options, this node allows users to enhance images with improved detail and clarity.

Functionality

The SUPIR_Upscale node leverages the SUPIR image restoration pipeline, specifically the SDXL img2img process, to upscale images. It provides a variety of configuration options to adjust the upscaling process to the user's specific requirements. The node supports different scaling methods, utilizes conditioned sampling, and allows for various advanced settings such as control scales and color fixing options.

Inputs

The SUPIR_Upscale node accepts the following inputs:

  1. supir_model: A pre-trained SUPIR model file.
  2. sdxl_model: A pre-trained SDXL model file.
  3. image: The input image, which is to be upscaled.
  4. seed: An integer seed for reproducibility of results.
  5. resize_method: The method used for resizing images, with options like nearest-exact, bilinear, area, bicubic, and lanczos.
  6. scale_by: A float that determines the scale factor for upscaling.
  7. steps: The number of steps for the diffusion process.
  8. restoration_scale: Adjusts the degree to which the restoration process enhances the image.
  9. cfg_scale: Scale factor for adjusting the Configuration Generation.
  10. a_prompt: Positive prompt to influence the upscaling for desired characteristics, e.g., high quality, detailed.
  11. n_prompt: Negative prompt to avoid certain characteristics, e.g., bad quality, blurry, messy.
  12. s_churn: Controls the amount of change introduced per step.
  13. s_noise: Determines the level of noise to add during sampling.
  14. control_scale & control_scale_start: Scale for controlling the denoising process and its initial value.
  15. cfg_scale_start: Initial configuration scale value.
  16. color_fix_type: Option to fix colors using methods like AdaIn or Wavelet.
  17. keep_model_loaded: Boolean to keep models loaded for successive runs.
  18. use_tiled_vae: Boolean to enable tiled VAE for reducing memory usage in large images.
  19. encoder_tile_size_pixels & decoder_tile_size_latent: Tile sizes for encoding and decoding.
  20. Optional inputs: Captions, diffusion and encoder data types, batch size, tiled sampling options, and memory-saving features like fp8.

Outputs

The node produces:

  • upscaled_image: The final upscaled image, enhanced with the settings provided to the node.

Usage in ComfyUI Workflows

The SUPIR_Upscale node is ideal for users aiming to dramatically enhance image resolution while maintaining or improving visual quality. It can be used in workflows where:

  • High-resolution outputs from lower resolution sources are desired.
  • Detailed and high-quality image restoration is needed.
  • Advanced configurable upscale processes are required for specific artistic or technical purposes.

Users can integrate this node into their ComfyUI workflows by setting appropriate configuration options for the desired upscaled output. By leveraging the various input settings, users can tweak the upscaling process to adequately reflect their artistic vision or meet technical specifications.

Special Features and Considerations

  • Hardware and Memory: Due to the substantial memory requirements, ensure that your hardware setup is well-prepared, especially when working with high-resolution images or large batch sizes. VRAM usage can be decreased with options like tiled VAE or fp8.

  • Control and Flexibility: This node offers a high degree of control, allowing users to specify detailed prompts and encoding configurations to achieve desired upscaling results.

  • Model Requirements: The node requires both SUPIR and SDXL models to function correctly, which should be placed in the appropriate directories.

  • Compatibility: Ensure that the version of PyTorch available is compatible with the node's requirements. The latest stable release (such as 2.2.1) is recommended.

Users might need to iterate through various configurations to fully exploit the node's potential. Understanding the interplay between the control scales, prompts, and configuration settings is key to mastering the SUPIR_Upscale node's capabilities.