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
IMAGEtensor.
Installation
ComfyUI-manager
TBD
Manual Installation
- Navigate to your ComfyUI installation directory.
- Go into the
custom_nodesfolder. - Open a terminal and run
git clone https://github.com/wakattac/ComfyUI-AbstractImaGen - 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:Windows:cd ../.. source venv/bin/activate cd path/to/comfyui/custom_nodes/ComfyUI-AbstractImaGen pip install -r requirements.txtcd ..\.. venv\Scripts\activate cd path\to\comfyui\custom_nodes\ComfyUI-AbstractImaGen pip install -r requirements.txt - 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/bsliders whencolor_modeis set totoned-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!
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.