ComfyUI > Nodes > DJZ-Nodes > String Painter

ComfyUI Node: String Painter

Class Name

StringPainter

Category
painting
Author
DriftJohnson (Account age: 4052days)
Extension
DJZ-Nodes
Latest Updated
2025-04-25
Github Stars
0.04K

How to Install DJZ-Nodes

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

String Painter Description

Versatile node for generating hexadecimal strings with seed value, supporting 16-bit and 32-bit modes (increment/random).

String Painter:

StringPainter is a versatile node designed to generate hexadecimal strings based on a given seed value. It supports both 16-bit and 32-bit hex string generation, offering two modes: increment and random. This node is particularly useful for artists and developers who need to create unique identifiers or color codes in a structured manner. By leveraging the seed value, StringPainter can produce consistent outputs, which is beneficial for reproducibility in creative projects. The node's ability to switch between increment and random modes provides flexibility, allowing users to either follow a predictable sequence or introduce randomness into their work. Additionally, StringPainter outputs the seed used for each generation, ensuring transparency and traceability in the creative process.

String Painter Input Parameters:

seed

The seed parameter is an integer that serves as the starting point for hex string generation. It influences the initial value from which the hex string is derived. The seed can range from 0 to 4,294,967,295 (0xFFFFFFFF), with a default value of 0. Using different seed values allows for the creation of unique hex strings, which is particularly useful when generating identifiers or color codes that need to be distinct.

bits

The bits parameter determines the bit size of the hex string, with options of "16" or "32". This choice affects the length and range of the generated hex string. A 16-bit hex string will be shorter and have a smaller range compared to a 32-bit hex string. The default setting is "16", which is suitable for most applications, but selecting "32" can be beneficial when a larger range or longer hex string is required.

mode

The mode parameter specifies the method of hex string generation, offering "increment" and "random" as options. In "increment" mode, the seed value is incremented with each generation, producing a predictable sequence of hex strings. In "random" mode, a random seed is selected within a specified range, resulting in a more varied and unpredictable output. The default mode is "increment", which is ideal for sequential tasks, while "random" is useful for introducing variability.

count

The count parameter is an integer that indicates the number of hex strings to generate. It allows users to produce multiple hex strings in a single operation, ranging from 1 to 100, with a default value of 1. This parameter is particularly useful when batch processing is required, enabling the generation of multiple unique identifiers or color codes efficiently.

random_min

The random_min parameter sets the minimum value for the random seed range when the mode is set to "random". It defines the lower bound of the range from which random seeds are selected, with a default value of 0. Adjusting this parameter allows users to control the starting point of the random range, which can be useful for specific applications requiring a certain level of randomness.

random_max

The random_max parameter sets the maximum value for the random seed range when the mode is set to "random". It defines the upper bound of the range from which random seeds are selected, with a default value of 4,294,967,295 (0xFFFFFFFF). By adjusting this parameter, users can limit the extent of randomness, which can be beneficial for applications that require a controlled level of variability.

String Painter Output Parameters:

hex_string

The hex_string output is a string representing the generated hexadecimal value. This output is the primary result of the node's operation, providing a unique identifier or color code based on the input parameters. The hex string's length and format depend on the selected bit size, with 16-bit strings being shorter than 32-bit strings. This output is essential for applications requiring unique and reproducible identifiers.

used_seed

The used_seed output is an integer that indicates the seed value used for generating the hex string. This output provides transparency and traceability, allowing users to understand the basis of the generated hex string. It is particularly useful for debugging or reproducing specific results, as it reveals the exact seed value that led to the current output.

String Painter Usage Tips:

  • To generate a series of predictable hex strings, use the "increment" mode with a specific starting seed and adjust the count parameter to the desired number of outputs.
  • For more varied outputs, switch to "random" mode and set a custom range using random_min and random_max to control the randomness level.
  • When working with color codes, consider using 32-bit mode for a broader range of colors, especially if you need to ensure uniqueness across a large dataset.

String Painter Common Errors and Solutions:

Unsupported bit size

  • Explanation: This error occurs when an invalid bit size is provided, as the node only supports "16" and "32" bit sizes.
  • Solution: Ensure that the bits parameter is set to either "16" or "32" to avoid this error.

Invalid mode: must be one of increment, random

  • Explanation: This error arises when an unsupported mode is specified for hex string generation.
  • Solution: Verify that the mode parameter is set to either "increment" or "random" to ensure proper operation.

Seed must be between 0 and 4294967295

  • Explanation: This error indicates that the provided seed value is outside the acceptable range.
  • Solution: Adjust the seed parameter to fall within the range of 0 to 4,294,967,295 (0xFFFFFFFF) to resolve this issue.

String Painter Related Nodes

Go back to the extension to check out more related nodes.
DJZ-Nodes
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 Playground, enabling artists to harness the latest AI tools to create incredible art.