ComfyUI  >  Nodes  >  ComfyUI >  FreeU

ComfyUI Node: FreeU

Class Name

FreeU

Category
model_patches/unet
Author
ComfyAnonymous (Account age: 598 days)
Extension
ComfyUI
Latest Updated
8/12/2024
Github Stars
45.9K

How to Install ComfyUI

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

FreeU Description

Enhances AI-generated image quality with advanced filtering and scaling techniques for improved visual fidelity and detail.

FreeU:

FreeU is a node designed to enhance the performance and quality of AI-generated images by applying advanced filtering and scaling techniques. It leverages the power of Fourier filtering and dynamic scaling based on the model's channel configuration to refine the output. The primary goal of FreeU is to improve the visual fidelity and detail of images produced by AI models, making it a valuable tool for AI artists looking to achieve higher quality results. By dynamically adjusting the hidden states and applying Fourier filters, FreeU ensures that the generated images are not only visually appealing but also maintain a high level of detail and clarity.

FreeU Input Parameters:

model_channels

This parameter represents the number of channels in the model's configuration. It is used to determine the scaling factors for the hidden states and the Fourier filter. The value of model_channels directly impacts the scaling dictionary, which in turn affects the intensity and application of the filters. The exact value is derived from the model's UNet configuration and is crucial for the proper functioning of the node.

scale_dict

The scale_dict parameter is a dictionary that maps the model channels to their respective scaling factors. It contains pairs of values that determine how the hidden states and Fourier filters are scaled. The dictionary is constructed using the model channels and predefined scaling factors, ensuring that the filters are applied correctly based on the model's configuration. This parameter is essential for dynamically adjusting the filters to match the model's architecture.

on_cpu_devices

This parameter is a dictionary that keeps track of devices that do not support certain torch.fft functions. If a device is found to be incompatible, the Fourier filter operations are switched to the CPU. This ensures that the node can function correctly even on devices with limited support for specific operations. The on_cpu_devices dictionary helps maintain compatibility and stability across different hardware configurations.

FreeU Output Parameters:

h

The h parameter represents the modified hidden states after applying the scaling factors. It is an intermediate output that reflects the adjustments made to the hidden states based on the scaling dictionary. The h parameter is crucial for ensuring that the hidden states are appropriately scaled, leading to improved image quality.

hsp

The hsp parameter represents the modified hidden states after applying the Fourier filter. It is an intermediate output that reflects the adjustments made to the hidden states based on the Fourier filter and the scaling factors. The hsp parameter is essential for ensuring that the hidden states are appropriately filtered, leading to enhanced image detail and clarity.

FreeU Usage Tips:

  • Ensure that your model's configuration is correctly set up, as the model_channels parameter is derived from the model's UNet configuration.
  • Use appropriate scaling factors in the scale_dict to match the model's architecture and achieve the desired filtering effects.
  • If you encounter issues with certain devices not supporting torch.fft functions, consider switching to CPU for those operations to maintain compatibility.

FreeU Common Errors and Solutions:

Device does not support the torch.fft functions used in the FreeU node, switching to CPU.

  • Explanation: This error occurs when the device being used does not support the required torch.fft functions for Fourier filtering.
  • Solution: The node automatically switches to CPU for the Fourier filter operations. Ensure that your system has sufficient CPU resources to handle the operations, or consider using a different device that supports the required functions.

FreeU Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI
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.