ComfyUI Node: OCS ModelSetMaxSigma

Class Name

OCS ModelSetMaxSigma

Category
hacks
Author
blepping (Account age: 271days)
Extension
comfyui_overly_complicated_sampling
Latest Updated
2024-09-18
Github Stars
0.02K

How to Install comfyui_overly_complicated_sampling

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

OCS ModelSetMaxSigma Description

Modify model's sigma values for AI sampling, enhancing output quality and control in AI-generated art.

OCS ModelSetMaxSigma:

The OCS ModelSetMaxSigma node is designed to modify a model's maximum and minimum sigma values, which are crucial parameters in the sampling process of AI models. This node allows you to set these sigma values to specific targets, either by recalculating them for accuracy or by simply multiplying the original values. By adjusting these parameters, you can influence the behavior of the model during the sampling phase, potentially improving the quality and characteristics of the generated outputs. This node is particularly useful for fine-tuning models to achieve desired effects in AI-generated art, providing greater control over the sampling process. It is important to note that this node should be connected to a scheduler node, such as BasicScheduler, rather than directly to a sampler node.

OCS ModelSetMaxSigma Input Parameters:

model

This parameter represents the model to be patched with the new minimum and maximum sigma values. It is essential to provide the correct model that you intend to modify, as the changes will directly affect its sampling behavior. The tooltip for this parameter is "Model to patch with the min/max sigmas."

mode

The mode parameter determines the method used for setting the sigma values in the patched model. It can be set to either "recalculate" or "simple_multiply." The "recalculate" mode is generally more accurate as it recalculates the sigma values based on the original settings, while "simple_multiply" simply multiplies the original sigma values by a specified factor. The tooltip for this parameter is "Mode use for setting sigmas in the patched model. Recalculate should generally be more accurate."

sigma_max

This parameter allows you to set the maximum sigma value. If you use a negative value, it will be interpreted as the absolute value for the max sigma. If you use a positive value, it will be interpreted as a percentage (where 1.0 signifies 100%). The default value is -1.0, with a minimum of -10000.0 and a maximum of 10000.0. The tooltip for this parameter is "You can set the maximum sigma here. If you use a negative value, it will be interpreted as the absolute value for the max sigma. If you use a positive value it will be interpreted as a percentage (where 1.0 signified 100%). Schedules generated with the patched model should start from sigma_max (or close to it)."

fake_sigma_min

This parameter allows you to set the minimum sigma value. If set to 0, it is disabled. If you use a negative value, it will be interpreted as the absolute value for the max sigma. If you use a positive value, it will be interpreted as a percentage (where 1.0 signifies 100%). The default value is 0.0, with a minimum of 0.0 and a maximum of 1000.0. The tooltip for this parameter is "You can set the minimum sigma here. Disabled if set to 0. If you use a negative value, it will be interpreted as the absolute value for the max sigma. If you use a positive value it will be interpreted as a percentage (where 1.0 signified 100%). Schedules generated with the patched model should end with [sigma_min, 0]. NOTE: May not work with some schedulers. I recommend leaving this at 0 unless you know you need it (and even then it may not work)."

OCS ModelSetMaxSigma Output Parameters:

MODEL

The output of this node is a patched model with the new sigma values applied. This patched model can be connected to a scheduler node, such as BasicScheduler, to influence the sampling process. It is generally not recommended to connect this output directly to a sampler node. The tooltip for this output is "Patched model. Can be connected to a scheduler node (i.e. BasicScheduler). Generally NOT recommended to connect to an actual sampler."

OCS ModelSetMaxSigma Usage Tips:

  • When using the "recalculate" mode, ensure that the original model's sigma values are suitable for recalculation to achieve more accurate results.
  • Use the "simple_multiply" mode for a quick adjustment of sigma values when precision is less critical.
  • Connect the output of this node to a scheduler node like BasicScheduler to properly utilize the patched sigma values during the sampling process.
  • Avoid setting extreme values for sigma_max and fake_sigma_min unless you have a specific reason, as this may lead to unexpected behavior or errors.

OCS ModelSetMaxSigma Common Errors and Solutions:

ModelSetMaxSigma: Invalid sigma_max value

  • Explanation: This error occurs when the sigma_max value is set to 0, which is not a valid input.
  • Solution: Ensure that the sigma_max value is set to a non-zero value, either positive or negative, within the allowed range.

ModelSetMaxSigma: Invalid mode value

  • Explanation: This error occurs when the mode parameter is set to a value other than "recalculate" or "simple_multiply."
  • Solution: Set the mode parameter to either "recalculate" or "simple_multiply" to resolve this error.

ModelSetMaxSigma: Can only handle linear beta schedules in reschedule mode

  • Explanation: This error occurs when the model's beta schedule is not linear, which is required for the "recalculate" mode.
  • Solution: Ensure that the model's beta schedule is linear or switch to the "simple_multiply" mode.

ModelSetMaxSigma: Invalid fake_min_sigma value, result max <= min

  • Explanation: This error occurs when the new minimum sigma value is greater than or equal to the new maximum sigma value.
  • Solution: Adjust the fake_sigma_min parameter to ensure that the new minimum sigma value is less than the new maximum sigma value.

OCS ModelSetMaxSigma Related Nodes

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