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

ComfyUI Node: SUPIR Model Loader (Legacy)

Class Name

SUPIR_model_loader

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 (Legacy) Description

Facilitates loading and integrating SUPIR model for enhanced AI art generation with SDXL model, optimizing performance.

SUPIR Model Loader (Legacy):

The SUPIR_model_loader node is designed to facilitate the loading and integration of the SUPIR model within your AI art generation workflow. This node is essential for merging the SUPIR model with the SDXL model, ensuring that the combined capabilities of both models are leveraged for enhanced image generation. The node handles the loading of model weights, manages device allocation, and optimizes memory usage, making it a crucial component for efficient and high-quality AI art creation. By using this node, you can seamlessly incorporate advanced diffusion models into your projects, benefiting from improved performance and flexibility.

SUPIR Model Loader (Legacy) Input Parameters:

model

This parameter specifies the base model to be used. It is a required input and should be set to the model you intend to enhance with the SUPIR model.

clip_l

This parameter represents the local CLIP model, which is used for text-to-image tasks. It is a required input and should be set to the appropriate CLIP model for your project.

clip_g

This parameter represents the global CLIP model, which complements the local CLIP model in text-to-image tasks. It is a required input and should be set to the appropriate CLIP model for your project.

vae

This parameter specifies the Variational Autoencoder (VAE) model to be used. It is a required input and should be set to the VAE model that matches your base model.

supir_model

This parameter allows you to select the SUPIR model checkpoint file from a list of available checkpoints. It is a required input and should be set to the specific SUPIR model checkpoint you wish to load.

fp8_unet

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

diffusion_dtype

This parameter specifies the data type for the diffusion process. Options include fp16, bf16, fp32, and auto. The default value is auto, which automatically selects the most appropriate data type based on your hardware and model configuration.

high_vram

This optional boolean parameter, when set to True, uses the Accelerate library to load weights directly to the GPU, which can slightly speed up the model loading process. The default value is False.

SUPIR Model Loader (Legacy) Output Parameters:

SUPIR_model

This output parameter represents the loaded and merged SUPIR model. It is the primary model that you will use for generating images, combining the strengths of both the SUPIR and SDXL models.

SUPIR_VAE

This output parameter represents the VAE model associated with the loaded SUPIR model. It is used in conjunction with the SUPIR model to enhance image generation quality.

SUPIR Model Loader (Legacy) Usage Tips:

  • Ensure that the supir_model parameter is set to the correct checkpoint file to avoid loading errors.
  • Use the fp8_unet parameter to save VRAM if you are working with limited resources, but be aware of the potential slight impact on image quality.
  • Set the diffusion_dtype to auto unless you encounter issues with model loading, in which case you can experiment with other data types like fp16 or bf16.
  • Enable the high_vram option if you have a powerful GPU and want to speed up the model loading process.

SUPIR Model Loader (Legacy) Common Errors and Solutions:

Failed to load SUPIR model

  • Explanation: This error occurs when the SUPIR model checkpoint file cannot be loaded, possibly due to an incorrect file path or a corrupted checkpoint file.
  • Solution: Verify that the supir_model parameter is set to the correct checkpoint file and ensure that the file is not corrupted.

Failed to load SDXL model

  • Explanation: This error occurs when the SDXL model checkpoint file cannot be loaded, possibly due to an incorrect file path or a corrupted checkpoint file.
  • Solution: Verify that the SDXL model checkpoint file path is correct and ensure that the file is not corrupted.

unet missing: <missing_keys>

  • Explanation: This warning indicates that some expected keys are missing from the UNet state dictionary during the loading process.
  • Solution: Ensure that the model checkpoint files are compatible and correctly formatted. If the issue persists, consider re-downloading or re-generating the checkpoint files.

unet unexpected: <unexpected_keys>

  • Explanation: This warning indicates that some unexpected keys are present in the UNet state dictionary during the loading process.
  • Solution: Ensure that the model checkpoint files are compatible and correctly formatted. If the issue persists, consider re-downloading or re-generating the checkpoint files.

SUPIR Model Loader (Legacy) 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.