2025-05-06 11:30:41 +03:00
2025-05-06 11:30:41 +03:00
2025-05-05 23:14:03 +03:00
2025-05-05 22:58:33 +03:00
2025-05-06 10:40:03 +03:00
2025-05-05 22:52:18 +03:00
2025-05-06 10:49:46 +03:00
2025-05-06 11:30:15 +03:00
2025-05-06 10:55:27 +03:00

ComfyUI Abstract Image Generator

A custom node for ComfyUI that generates abstract images with comprehensive seed-based control over layers, shapes, patterns, noise, colors, and post-processing effects.

This node is designed to create unique abstract base images on the fly within your ComfyUI workflows, which can then be used as input for VAE encoding, image-to-image generation, or other creative processes.

Features

  • Seed-Based Generation: A main seed controls the overall randomness, ensuring reproducibility.
  • Component Salts: Individual salts for different generation components (background, shapes, patterns, noise, post-processing, blending, color generation, shape type bias) allow for targeted variations while keeping the main seed consistent.
  • Layer Control: Define the minimum and maximum number of layers and their probabilities (shapes, patterns, noise).
  • Shape Customization: Control the number of shapes per layer, line widths for lines/zig-zags, and color modes for filled shapes and lines/zig-zags (random, specific colors).
  • Color Modes: Choose from various color modes including RGB, Grayscale, and several Toned options (Random, Green-Yellow, Red-Magenta, Blue-Cyan), plus a custom Toned RGB mode with sliders.
  • Post-Processing Effects: Probabilistically apply and control parameters for gradient background, layer feathering, grain (noise), contrast, brightness, grayscale conversion, and final blur.
  • ComfyUI Integration: Seamlessly integrates into your ComfyUI workflow, outputting a standard IMAGE tensor.

Usage Examples

Generated with denoise of 0.80

Example 1 Example 2

Installation

ComfyUI-manager

TBD

Manual Installation

  1. Navigate to your ComfyUI installation directory.
  2. Go into the custom_nodes folder.
  3. Open a terminal and run
    git clone https://github.com/wakattac/ComfyUI-AbstractImaGen
    
  4. If you have a Python environment set up for ComfyUI, you can install the dependencies listed in requirements.txt (though most are likely already installed with ComfyUI). Linux:
    cd ../..
    source venv/bin/activate
    cd path/to/comfyui/custom_nodes/ComfyUI-AbstractImaGen
    pip install -r requirements.txt
    
    Windows:
    cd ..\..
    venv\Scripts\activate
    cd path\to\comfyui\custom_nodes\ComfyUI-AbstractImaGen
    pip install -r requirements.txt
    
  5. Restart ComfyUI.

You should now find the node under the "AbstractImage" category in the add node menu.

Usage

Add the "Abstract Image Generator (Seeded)" node to your workflow. Connect its IMAGE output to any node that accepts an image input (e.g., VAE Encode, Save Image).

Adjust the various input parameters to control the generated image:

  • width, height: Dimensions of the output image.
  • seed: The main seed for overall randomness. Changing this will produce a completely different image structure and appearance.
  • color_mode: Select the general color style. Use the toned_rgb_r/g/b sliders when color_mode is set to toned-rgb.
  • layer_*_prob: Probabilities for including different types of layers (shapes, pattern, noise). These are automatically normalized.
  • num_layers_min/max: Range for the total number of feature layers.
  • shapes_per_layer_min/max: Range for the number of shapes drawn on a shapes layer.
  • line_width_min/max: Range for the width of line and zigzag shapes.
  • filled_shape_color_mode, line_zigzag_color_mode: Choose between random colors (based on the main color_mode) or specific predefined colors for different shape types.
  • bg_type_gradient_prob: Probability of the background being a gradient instead of a solid color.
  • feather_layer_prob: Probability of applying a feathering effect (alpha blur) to individual layers.
  • add_grain_prob: Probability of adding photographic grain to the final image.
  • adjust_contrast_prob, adjust_brightness_prob: Probabilities for applying contrast and brightness adjustments.
  • grayscale_final_prob: Probability of converting the final image to grayscale.
  • final_blur_prob: Probability of applying a final overall blur.
  • *_amount/sigma/contrast/brightness_min/max: Ranges for the parameters of the post-processing effects when they are applied.
  • *_salt: Individual salts for each component. Modifying a component's salt will change the randomness only within that component's operations, allowing for fine-tuning variations without altering other parts of the image structure controlled by different components or the main seed.

Experiment with the parameters and salts to discover a wide range of abstract visuals.

Parameter table

Parameter Description
width Width of the generated image.
height Height of the generated image.
seed Main seed controlling overall randomness.
color_mode Overall color scheme for the image.
toned_rgb_r Red component for Toned RGB color mode.
toned_rgb_g Green component for Toned RGB color mode.
toned_rgb_b Blue component for Toned RGB color mode.
layer_shapes_prob Probability of adding a layer of shapes.
layer_pattern_prob Probability of adding a tiled pattern layer.
layer_noise_prob Probability of adding a noise pattern layer.
num_layers_min Minimum number of feature layers.
num_layers_max Maximum number of feature layers.
shapes_per_layer_min Minimum number of shapes to draw per shapes layer.
shapes_per_layer_max Maximum number of shapes to draw per shapes layer.
line_width_min Minimum width for lines and zig-zags in shapes layers.
line_width_max Maximum width for lines and zig-zags in shapes layers.
filled_shape_color_mode Color selection mode for filled shapes.
line_zigzag_color_mode Color selection mode for lines and zig-zags.
bg_type_gradient_prob Probability of using a gradient background instead of a solid color.
feather_layer_prob Probability of feathering (blurring the alpha of) each feature layer.
add_grain_prob Probability of adding photographic grain (noise) to the final image.
adjust_contrast_prob Probability of adjusting the contrast of the final image.
adjust_brightness_prob Probability of adjusting the brightness of the final image.
grayscale_final_prob Probability of converting the final image to grayscale (if not already).
final_blur_prob Probability of applying a final overall blur to the image.
grain_amount_min Minimum amount of grain to add (if applied).
grain_amount_max Maximum amount of grain to add (if applied).
contrast_min Minimum contrast adjustment factor (if applied).
contrast_max Maximum contrast adjustment factor (if applied).
brightness_min Minimum brightness adjustment amount (if applied).
brightness_max Maximum brightness adjustment amount (if applied).
final_blur_sigma_min Minimum sigma for the final blur (if applied).
final_blur_sigma_max Maximum sigma for the final blur (if applied).
feather_sigma_min Minimum sigma for feathering layers (if applied).
feather_sigma_max Maximum sigma for feathering layers (if applied).
bg_salt Salt for background generation randomness.
shapes_salt Salt for shapes generation randomness.
pattern_salt Salt for pattern generation randomness.
noise_salt Salt for noise layer generation randomness.
post_processing_salt Salt for post-processing randomness (e.g., applying features, parameters).
blending_salt Salt for blending mode selection randomness.
color_generation_salt Salt for random color generation randomness.
shape_type_bias_salt Salt for random shape type selection randomness (filled vs line/zigzag).

Contributing

If you find issues or have suggestions, please open an issue or submit a pull request on the GitHub repository.

License

This project is licensed under the MIT License - see the LICENSE file for details.

S
Description
No description provided
Readme MIT
4.5 MiB
Languages
Python 100%