ComfyUI  >  Nodes  >  ComfyUI-bleh >  Kohya Deep Shrink (bleh)

ComfyUI Node: Kohya Deep Shrink (bleh)

Class Name

BlehDeepShrink

Category
bleh/model_patches
Author
blepping (Account age: 184 days)
Extension
ComfyUI-bleh
Latest Updated
5/22/2024
Github Stars
0.0K

How to Install ComfyUI-bleh

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

Kohya Deep Shrink (bleh) Description

Dynamic resolution adjustment for AI art generation by scaling latent space based on noise levels for enhanced image quality.

Kohya Deep Shrink (bleh):

BlehDeepShrink is a specialized node designed to dynamically adjust the resolution of latent representations within a model, particularly useful in AI art generation workflows. This node leverages a method to scale down the latent space based on specific sigma values, which are indicative of the noise levels in the model's sampling process. By intelligently shrinking the latent space, BlehDeepShrink helps in refining the details and enhancing the quality of the generated images. The node is particularly beneficial for artists looking to fine-tune their models to achieve higher precision and control over the output, ensuring that the generated art maintains its intended resolution and detail throughout the transformation process.

Kohya Deep Shrink (bleh) Input Parameters:

model

The model parameter represents the AI model that will be patched by the BlehDeepShrink node. This model is the core component that undergoes transformation to adjust its latent space resolution.

commasep_block_numbers

This parameter is a comma-separated list of block numbers that specifies which blocks in the model should be affected by the deep shrink process. The values must be between 1 and 32. Incorrect values will raise an error.

downscale_factor

The downscale_factor determines the factor by which the latent space will be reduced. It is a crucial parameter that directly impacts the resolution of the output. The value should be a positive float, typically less than 1.0 to indicate downscaling.

start_percent

This parameter defines the starting percentage of the sigma range where the downscaling begins. It is a float value between 0 and 1, representing the initial point in the sigma range for applying the shrink.

start_fadeout_percent

The start_fadeout_percent sets the percentage at which the fadeout of the downscaling effect begins. It should be a float value between the start_percent and end_percent, ensuring a smooth transition in the scaling process.

end_percent

This parameter indicates the ending percentage of the sigma range where the downscaling effect stops. It is a float value between 0 and 1, marking the final point in the sigma range for the shrink.

downscale_after_skip

A boolean parameter that determines whether the downscaling should be applied after a skip connection in the model. If set to True, the downscaling occurs post-skip; otherwise, it happens before.

downscale_method

The downscale_method specifies the algorithm used for downscaling the latent space. Options include "bicubic", "nearest-exact", "bilinear", "area", and "bislerp". Each method offers different trade-offs between quality and computational efficiency.

upscale_method

This parameter defines the algorithm used for upscaling the latent space back to its original resolution. Options include "bicubic" and "bilinear", which are known for their balance between quality and performance.

antialias_downscale

A boolean parameter that, when set to True, applies antialiasing during the downscaling process. This is particularly useful for reducing artifacts and preserving details in the downscaled latent space.

antialias_upscale

A boolean parameter that, when set to True, applies antialiasing during the upscaling process. This helps in maintaining the quality of the latent space when it is scaled back to its original resolution.

Kohya Deep Shrink (bleh) Output Parameters:

MODEL

The output parameter is the modified model with the applied deep shrink patches. This model has its latent space dynamically adjusted based on the specified parameters, resulting in refined and high-quality generated images.

Kohya Deep Shrink (bleh) Usage Tips:

  • To achieve optimal results, carefully select the block numbers that are most critical to your model's performance. This ensures that the deep shrink process targets the most impactful areas.
  • Experiment with different downscale and upscale methods to find the best balance between quality and computational efficiency for your specific use case.
  • Use antialiasing options to minimize artifacts and preserve details, especially when working with high-resolution images.

Kohya Deep Shrink (bleh) Common Errors and Solutions:

Kohya Deep Shrink (bleh): Bad value for block numbers: must be comma-separated list of numbers between 1-32

  • Explanation: This error occurs when the block numbers provided are not within the valid range of 1 to 32 or are not properly formatted as a comma-separated list.
  • Solution: Ensure that the block numbers are correctly formatted and fall within the range of 1 to 32.

ValueError: downscale_factor must be a positive float

  • Explanation: This error is raised when the downscale_factor is not a positive float value.
  • Solution: Verify that the downscale_factor is a positive float, typically less than 1.0, to indicate downscaling.

start_fadeout_percent must be between start_percent and end_percent

  • Explanation: This error occurs when the start_fadeout_percent is not within the range defined by start_percent and end_percent.
  • Solution: Adjust the start_fadeout_percent to ensure it falls between the start_percent and end_percent values.

Invalid downscale_method or upscale_method

  • Explanation: This error is raised when an unsupported method is specified for downscaling or upscaling.
  • Solution: Choose a valid method from the provided options: "bicubic", "nearest-exact", "bilinear", "area", or "bislerp" for downscaling, and "bicubic" or "bilinear" for upscaling.

Kohya Deep Shrink (bleh) Related Nodes

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