ComfyUI > Nodes > ComfyUI-Latent-Modifiers

ComfyUI Extension: ComfyUI-Latent-Modifiers

Repo Name

ComfyUI-Latent-Modifiers

Author
Clybius (Account age: 1762 days)
Nodes
View all nodes(1)
Latest Updated
2024-06-14
Github Stars
0.07K

How to Install ComfyUI-Latent-Modifiers

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

ComfyUI-Latent-Modifiers Description

ComfyUI-Latent-Modifiers enhances the diffusion process in ComfyUI by providing nodes that modify latent variables, including adjustments for sharpness, tonemap, rescale, and extra noise.

ComfyUI-Latent-Modifiers Introduction

ComfyUI-Latent-Modifiers is an extension designed to enhance the capabilities of ComfyUI by providing a set of nodes that modify the latent space during the diffusion process. This extension allows AI artists to have more control over the quality and style of their generated images. By adjusting various parameters, users can achieve sharper details, better contrast, and more stylistic effects without needing deep technical knowledge.

How ComfyUI-Latent-Modifiers Works

The extension works by introducing multiple parameters that influence the latent space during the diffusion process. Think of the latent space as a hidden layer where the image is gradually formed. By modifying this space, you can steer the final output towards your desired quality and style. The extension provides tools to adjust sharpness, contrast, noise, and other aspects, making it easier to fine-tune the generated images.

ComfyUI-Latent-Modifiers Features

Sharpness

This feature sharpens the noise in the middle of the diffusion process, leading to more perceptual detail, especially at higher strengths. It uses code from Fooocus's sampling process.

Tonemap

Tonemapping clamps the conditioning noise (CFG) using a user-chosen method, allowing for higher CFG values. Different methods like Reinhard, Arctan, Quantile, Gated, CFG-Mimic, and Spatial-Norm offer various ways to control the noise.

Rescale

This feature dynamically lowers the CFG by comparing the standard deviation to the existing latent, helping to maintain a balanced image quality.

Extra Noise

Adds extra noise in the middle of the diffusion process to conditioning and performs the inverse operation on unconditioning if chosen. This can add interesting variations to the generated images.

Contrast

Adjusts the contrast of the conditioning, leading to more vibrant and pop-style results. It acts as a secondary CFG slider for stylization without changing the subject's pose and location much.

Combat CFG Drift

As CFG increases, the mean can drift away from zero. This feature subtracts the mean or median of the latent, potentially leading to sharper and higher frequency results but may cause discoloration.

Divisive Norm

Normalizes the latent using avg_pool2d, reducing noisy artifacts and enhancing features like sharpness.

Spectral Modulation

Converts the latent to frequencies, clamps higher frequencies while boosting lower ones, and then converts it back to an image latent. This helps to address oversaturation or burning due to higher CFG values.

ComfyUI-Latent-Modifiers Models

Currently, the extension does not include different models but focuses on providing a comprehensive set of features within a single framework. Each feature can be customized to achieve various effects, making it versatile for different artistic needs.

What's New with ComfyUI-Latent-Modifiers

Updates and Changes

  • Sharpness: Improved code integration for better detail enhancement.
  • Tonemap: Added multiple tonemapping methods for more control over noise clamping.
  • Rescale: Enhanced dynamic scaling for better CFG management.
  • Extra Noise: Introduced options for adding and managing extra noise.
  • Contrast: Improved contrast adjustment for more vibrant results.
  • Combat CFG Drift: Enhanced mean/median subtraction for sharper images.
  • Divisive Norm: Improved normalization to reduce artifacts.
  • Spectral Modulation: Added frequency-based modulation for better control over saturation and burning.

Troubleshooting ComfyUI-Latent-Modifiers

Common Issues and Solutions

  1. Image Too Noisy:
  • Solution: Adjust the Extra Noise and Spectral Modulation settings. Lower the spectral_mod_percentile and spectral_mod_multiplier to reduce noise.
  1. Image Too Blurry:
  • Solution: Increase the Sharpness parameter. Ensure that Combat CFG Drift is properly configured to avoid discoloration.
  1. Over-Saturated Images:
  • Solution: Use the Spectral Modulation feature to clamp higher frequencies. Adjust the tonemap_multiplier and tonemap_percentile for better control.
  1. Contrast Issues:
  • Solution: Fine-tune the Contrast settings. Use positive values for more contrast and negative values for less.

Frequently Asked Questions

  • Can I use multiple features simultaneously? Yes, the extension is designed to allow multiple features to work together seamlessly.

  • What are the recommended settings for beginners? Start with default values and gradually adjust parameters like Sharpness, Contrast, and Tonemap to see their effects.

Learn More about ComfyUI-Latent-Modifiers

For additional resources, tutorials, and community support, you can explore the following:

  • ComfyUI Documentation
  • Community Forums
  • Interactive Desmos Visualization for Arctan (https://www.desmos.com/calculator/e4nrcdpqbl) These resources will help you get the most out of ComfyUI-Latent-Modifiers and connect with other AI artists for tips and inspiration.

ComfyUI-Latent-Modifiers Related Nodes

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.