ComfyUI  >  Nodes  >  ComfyUI-SUPIR >  SUPIR Model Loader (v2)

ComfyUI Node: SUPIR Model Loader (v2)

Class Name

SUPIR_model_loader_v2

Category
SUPIR
Author
kijai (Account age: 2181 days)
Extension
ComfyUI-SUPIR
Latest Updated
5/21/2024
Github Stars
1.2K

How to Install ComfyUI-SUPIR

Install this extension via the ComfyUI Manager by searching for  ComfyUI-SUPIR
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-SUPIR 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 Cloud for ready-to-use ComfyUI environment

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

Run ComfyUI Online

SUPIR Model Loader (v2) Description

Node for loading and merging SUPIR and SDXL models, simplifying model weight handling and configuration for AI artists.

SUPIR Model Loader (v2):

The SUPIR_model_loader_v2 node is designed to load and merge the SUPIR model with the SDXL model, providing a seamless integration for AI artists to utilize advanced diffusion models in their creative workflows. This node simplifies the process of loading complex model weights and ensures that the models are correctly configured for optimal performance. By handling the intricacies of model loading and configuration, it allows you to focus on the creative aspects of your projects without worrying about the technical details. The node also offers options to manage VRAM usage and precision settings, making it adaptable to various hardware configurations and performance requirements.

SUPIR Model Loader (v2) Input Parameters:

model

This parameter expects a model object that will be used as the base for loading the SUPIR and SDXL models. It is essential for the node's operation as it provides the structure into which the model weights will be loaded.

clip_l

This parameter requires a CLIP model object, which is used for text-to-image tasks. It helps in conditioning the diffusion model with textual information, enhancing the model's ability to generate images based on text prompts.

clip_g

Similar to clip_l, this parameter also requires a CLIP model object. It is used in conjunction with clip_l to provide a more comprehensive conditioning mechanism for the diffusion model, improving the quality and relevance of the generated images.

vae

This parameter expects a VAE (Variational Autoencoder) model object. The VAE is used to encode and decode images, playing a crucial role in the image generation process by managing the latent space representations.

supir_model

This parameter takes a list of filenames from the "checkpoints" directory. It specifies the path to the SUPIR model checkpoint that will be loaded. This is a required parameter as it points to the specific model weights that need to be integrated.

fp8_unet

This boolean parameter determines whether the UNet weights should be cast to torch.float8_e4m3fn. The default value is False. Enabling this option can save a significant amount of VRAM but may slightly impact the quality of the generated images.

diffusion_dtype

This parameter allows you to specify the data type for the diffusion process. The available options are fp16, bf16, fp32, and auto, with auto being the default. This setting helps manage the precision of the model weights, which can affect both performance and memory usage.

high_vram

This optional boolean parameter, with a default value of False, determines whether to use the Accelerate library to load weights directly to the GPU. Enabling this option can speed up the model loading process but requires more VRAM.

SUPIR Model Loader (v2) Output Parameters:

SUPIR_model

This output parameter provides the loaded and configured SUPIR model. It is the primary model that you will use for generating images, now integrated with the SDXL model weights for enhanced performance and capabilities.

SUPIR_VAE

This output parameter provides the VAE model that has been configured alongside the SUPIR model. The VAE is essential for encoding and decoding images, ensuring that the generated outputs are of high quality and fidelity.

SUPIR Model Loader (v2) Usage Tips:

  • Ensure that the supir_model parameter points to the correct checkpoint file to avoid loading errors.
  • Use the fp8_unet option if you are running into VRAM limitations, but be aware of the potential slight impact on image quality.
  • Set the diffusion_dtype to auto unless you have specific requirements or encounter issues with model loading.
  • Enable high_vram if you have sufficient GPU memory and want to speed up the model loading process.

SUPIR Model Loader (v2) Common Errors and Solutions:

Failed to load SUPIR model

  • Explanation: This error occurs when the node is unable to load the specified SUPIR model checkpoint.
  • Solution: Verify that the supir_model parameter is correctly set to a valid checkpoint file. Ensure that the file path is correct and that the file is accessible.

Failed to load SDXL model

  • Explanation: This error indicates that the node encountered an issue while loading the SDXL model checkpoint.
  • Solution: Check the file path for the SDXL model and ensure it is correct. Make sure the checkpoint file is not corrupted and is accessible.

unet missing: <missing_keys>

  • Explanation: This warning indicates that some expected keys are missing from the UNet state dictionary.
  • Solution: Ensure that the model checkpoint files are complete and not corrupted. If the issue persists, consider re-downloading the checkpoint files.

unet unexpected: <unexpected_keys>

  • Explanation: This warning indicates that there are unexpected keys in the UNet state dictionary.
  • Solution: Verify that the correct model checkpoint files are being used. If the files are correct, this warning can often be safely ignored, but it may indicate a mismatch between the model architecture and the checkpoint.

SUPIR Model Loader (v2) Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-SUPIR
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.