ComfyUI > Nodes > ComfyUI-LogicUtils > Probability Gate

ComfyUI Node: Probability Gate

Class Name

ProbabilityGate

Category
Logic Gates
Author
aria1th (Account age: 3016days)
Extension
ComfyUI-LogicUtils
Latest Updated
2026-01-21
Github Stars
0.1K

How to Install ComfyUI-LogicUtils

Install this extension via the ComfyUI Manager by searching for ComfyUI-LogicUtils
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-LogicUtils 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
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Probability Gate Description

ProbabilityGate node introduces randomness by returning TRUE/FALSE based on a set probability.

Probability Gate:

The ProbabilityGate node is designed to introduce an element of randomness into your AI art projects by returning a boolean value based on a specified probability. This node is particularly useful when you want to incorporate stochastic behavior or decision-making processes into your creative workflows. By leveraging a probability value, the node determines whether to return TRUE or FALSE, effectively simulating a probabilistic event. This can be beneficial in scenarios where you want to add variability or unpredictability to your art generation process, such as deciding whether to apply a certain effect or choose between different artistic paths. The node operates by generating a random number and comparing it to the given probability, thus providing a simple yet powerful tool for introducing randomness into your projects.

Probability Gate Input Parameters:

probability

The probability parameter is a floating-point value that determines the likelihood of the node returning TRUE. It ranges from 0.0 to 1.0, where 0.0 means the node will always return FALSE, and 1.0 means it will always return TRUE. The default value is set to 0.5, indicating a 50% chance of returning TRUE. Adjusting this parameter allows you to control the degree of randomness in your decision-making process, with higher values increasing the likelihood of a TRUE outcome.

seed

The seed parameter is an integer that initializes the random number generator used by the node. It ensures that the sequence of random numbers generated is reproducible, which is useful for achieving consistent results across multiple runs. The seed value can range from 0 to 2^63-1, with a default value of 0. By setting a specific seed, you can ensure that the randomness introduced by the node is consistent, allowing for predictable variations in your art generation process.

Probability Gate Output Parameters:

BOOLEAN

The output of the ProbabilityGate node is a boolean value, either TRUE or FALSE. This output represents the result of the probabilistic decision-making process based on the specified probability. A TRUE output indicates that the random event occurred, while a FALSE output means it did not. This boolean value can be used to control subsequent nodes or processes in your workflow, enabling dynamic and varied outcomes in your AI art projects.

Probability Gate Usage Tips:

  • To achieve consistent randomness across different runs, use the same seed value. This will ensure that the random decisions made by the node are reproducible.
  • Experiment with different probability values to fine-tune the level of randomness in your project. A higher probability will result in more frequent TRUE outcomes, while a lower probability will favor FALSE.

Probability Gate Common Errors and Solutions:

Invalid probability value

  • Explanation: The probability value must be between 0.0 and 1.0. If a value outside this range is provided, the node may not function correctly.
  • Solution: Ensure that the probability parameter is set within the valid range of 0.0 to 1.0.

Invalid seed value

  • Explanation: The seed value must be a non-negative integer within the specified range. Providing a negative or excessively large value may cause errors.
  • Solution: Verify that the seed parameter is a valid integer between 0 and 2^63-1. Adjust the value if necessary to fall within this range.

Probability Gate Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-LogicUtils
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

Probability Gate