ComfyUI  >  Nodes  >  ComfyUI_Mira >  Even or Odd List

ComfyUI Node: Even or Odd List

Class Name

EvenOrOddList

Category
Mira/Logic
Author
mirabarukaso (Account age: 1261 days)
Extension
ComfyUI_Mira
Latest Updated
7/25/2024
Github Stars
0.0K

How to Install ComfyUI_Mira

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

Even or Odd List Description

Analyze integer digits for even/odd, generate Boolean list, useful for patterns, flexible digit handling.

Even or Odd List:

The EvenOrOddList node is designed to analyze a given integer and determine whether each digit is even or odd. It generates a Boolean list where each element corresponds to a digit of the integer, with True indicating an odd digit and False indicating an even digit. This node is particularly useful for creating patterns or sequences based on the parity of digits. Additionally, it provides a string output that details the results of the analysis, making it easy to understand the composition of the integer in terms of even and odd digits. The node can handle a specified quantity of digits and offers a flexible filling algorithm to manage cases where the number of digits in the integer is insufficient.

Even or Odd List Input Parameters:

integer

This parameter represents the integer to be analyzed. It is recommended to connect this to a Seed Generator to ensure a dynamic and varied input. The integer is broken down into its individual digits, and each digit is checked for parity (even or odd).

quantity

This parameter specifies the length of the Boolean list to be generated. It determines how many digits of the integer will be analyzed. If the integer has fewer digits than the specified quantity, the node will loop back to the lowest digit to complete the list. The default value is 16, which is generally sufficient for most use cases.

NOT_filling

This parameter controls the filling algorithm used when the integer has fewer digits than the specified quantity. When enabled (True), the node will switch between the original and the negated Boolean values in future loops. When disabled (False), the node will use the original Boolean values consistently in every loop. This allows for flexibility in how the Boolean list is completed.

Even or Odd List Output Parameters:

bool_list

This output is a list of Boolean values where each element corresponds to a digit of the input integer. True indicates an odd digit, and False indicates an even digit. This list can be used for further processing or pattern generation.

result

This output is a string that provides a detailed breakdown of the analysis. It includes the input integer, the number of times each digit was analyzed, and the results for each digit. This string is useful for understanding the composition of the integer and verifying the results of the analysis.

Even or Odd List Usage Tips:

  • To generate dynamic and varied Boolean lists, connect the integer input to a Seed Generator.
  • Adjust the quantity parameter based on the length of the Boolean list you need. For most applications, a length of 16 is sufficient.
  • Use the NOT_filling parameter to control how the list is completed when the integer has fewer digits than required. Enable it for alternating patterns and disable it for consistent patterns.

Even or Odd List Common Errors and Solutions:

"Input integer is too small"

  • Explanation: The input integer has fewer digits than the specified quantity, and the filling algorithm is not enabled.
  • Solution: Enable the NOT_filling parameter to allow the node to switch between original and negated Boolean values, or provide a larger integer.

"Invalid quantity value"

  • Explanation: The quantity parameter is set to a non-positive value.
  • Solution: Ensure that the quantity parameter is set to a positive integer.

"Unexpected error in processing"

  • Explanation: An unknown error occurred during the execution of the node.
  • Solution: Check the input values for correctness and ensure that all required parameters are provided. If the issue persists, consult the documentation or seek support.

Even or Odd List Related Nodes

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