Nodes/ComfyUI-mnemic-nodes/🎨 Colorful Starting Image
ComfyUI Node

🎨 Colorful Starting Image

Build a shape collage and diffuse that

By MNeMoNiCuZΒ·Created 3 years agoΒ·Updated a day agoΒ· 105
🎨 Colorful Starting Image
    • image
    • mask
    β—„width1024β–Ί
    β—„height1024β–Ί
    β—„components20β–Ί
    β—„component_scale0.50β–Ί
    β—„shape_stringrectangle, ellipse, circle, line, spline, dot, stripes, triangle, polygon, arc, concentric_circlesβ–Ί
    β—„color_paletteβ–Ύβ–Ί
    β—„color_harmonyβ–Ύβ–Ί
    β—„fill_modeβ–Ύβ–Ί
    β—„shape_opacity1.00β–Ί
    β—„background_colorblackβ–Ί
    β—„positioning_biasβ–Ύβ–Ί
    β—„arrangementβ–Ύβ–Ί
    β—„size_distributionβ–Ύβ–Ί
    β—„allow_rotationtrueβ–Ί
    β—„noise_level0.00β–Ί
    β—„noise_scale1β–Ί
    β—„noise_colorβ–Ύβ–Ί
    β—„warp_typeβ–Ύβ–Ί
    β—„warp_intensity0.5β–Ί
    β—„blur_radius0.0β–Ί
    β—„seed0β–Ί

    Every txt2img run starts from the same thing: a field of gaussian noise. Which means the big shapes in your image are decided by the sampler, and you influence them with words. The 🎨 Colorful Starting Image node gives you a different door - it draws an abstract composition of random shapes with numpy, hands you the image and a matching mask, and lets the sampler refine it. Push it through VAE Encode and a KSampler at moderate denoise and you get abstract wallpaper that still has legible structure, because the structure was there before the model touched it.

    The author's own framing is "use it as a starting latent for fun and varying shapes, great for abstract wallpaper creation." That's accurate and refreshingly un-hyped. It's not a ControlNet replacement and it won't make your portraits better.

    What it draws

    Shape generation is a comma-separated whitelist in shape_string - rectangle, ellipse, circle, line, spline, dot, stripes, triangle, polygon, arc, concentric_circles - with components deciding how many get drawn and component_scale capping how big the largest one can be (a shape's max width is width Γ— component_scale, so 0.5 on a 1024px canvas means roughly 512px across).

    Colour comes from three places that layer on each other:

    • color_palette - random, random_color, muted, grayscale, binary, neon, pastel or colorized (grayscale tinted with a single hue across every shape, which is the one that looks most intentional).
    • color_harmony - complementary, analogous, triadic, tetradic, or none. Genuinely useful, and it does nothing at all when you pick the binary palette, because black and white have no hue to harmonize.
    • fill_mode - none for flat shapes, gradient for a two-colour vertical blend, blocks for vertical strips. blocks plus colorized is where it stops looking like a test pattern.

    Then the composition knobs: positioning_bias (scattered, center_weighted, edge_weighted, grid_aligned, random_weighted, or a compass corner), arrangement (spiral, burst, grid or none), and size_distribution (uniform, prefer_small, prefer_large). All three take random if you'd rather let it choose. shape_opacity (0.1-1.0) is what turns a collage into a layered one, and background_color accepts colour names, hex codes, random, or one of the noise variants (noise, noise_large, noise_color, noise_color_large) - those last ones are surprisingly good as a texture base.

    For finishing there's a global grain pass (noise_level, noise_scale, noise_color), a warp (wave, noise_field, swirl) with warp_intensity, and a final blur_radius. seed makes the whole thing exactly reproducible, which matters more than you'd think - you'll want to go back to the composition that worked.

    Outputs

    Two: image (the render) and mask (white where shapes were drawn, black where the background shows through). The mask is the sleeper feature. It's a free region mask for inpainting or compositing without running a segmentation model.

    Using it

    The practical loop is: image β†’ VAE Encode β†’ KSampler with denoise around 0.6-0.85 β†’ VAE Decode β†’ whatever. Low denoise keeps the geometry and just textures it; high denoise lets the model eat the shapes and you're basically back to txt2img with an unusual push. Set components low (3-8) and component_scale high for big blocks of colour; go the other way for a busy confetti field.

    Install

    ComfyUI Manager β†’ ComfyUI-mnemic-nodes, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/MNeMoNiCuZ/ComfyUI-mnemic-nodes
    

    Restart. Nothing to download - this node is pure Python/Pillow. Note the pack as a whole installs transformers, opencv-python, tiktoken and a stack of other requirements you don't need for this node, which is the price of a grab-bag utility pack (it's currently v3.0.0, converted to the newer V3 node API with automatic workflow migration and a ? help page on every node).

    Where it goes wrong

    Nothing renders, canvas is empty. components is at 0, or shape_string got emptied out. Both fail quietly.

    Everything looks like mud. shape_opacity well below 1 combined with noise_level turned up. Start with opacity at 1 and noise at 0, get a composition you like, then season it.

    The image is a single flat colour. color_palette: binary with shape_opacity: 1 and a small component_scale - you've got white shapes on black doing very little. Turn on fill_mode or switch the harmony rule.

    Category⚑ MNeMiC Nodes

    Inputs (21)

    NameTypeDefaultDescription
    widthINT1024The width of the generated image in pixels.
    heightINT1024The height of the generated image in pixels.
    componentsINT20The total number of components (shapes) to draw on the image. More components create a more complex image.
    component_scaleFLOAT0.50Controls the maximum potential size of shapes. A shape's max width is `image_width * component_scale`. Example: With a 1024px wide image and 0.5 scale, the largest shapes will be around 512px wide.
    shape_stringSTRINGrectangle, ellipse, circle, line, spline, dot, stripes, triangle, polygon, arc, concentric_circlesA comma-separated list of shapes to draw from. Available shapes: - rectangle, ellipse, circle, line, spline, dot, stripes, triangle, polygon, arc, concentric_circles
    color_paletteCOMBOThe color palette for the shapes. Options: - random: Picks one of the other palette options at random. - random_color: Any RGB color. - muted: Less saturated, softer colors. - grayscale: Shades of gray. - binary: Pure black and white. - neon: Bright, highly saturated colors. - pastel: Soft, low-saturation colors. - colorized: Grayscale tinted with a single random hue across all shapes.
    color_harmonyCOMBOApply a color harmony rule to the generated colors. Options: - none: No harmony. - complementary: Two colors from opposite sides. - analogous: Three colors next to each other. - triadic: Three colors evenly spaced. - tetradic: Four colors in square harmony. Note: Color harmony has no effect when the 'binary' color palette is selected.
    fill_modeCOMBOFill shapes with multiple colors. Options: - none: Shapes are filled with a single color. - gradient: Blends two colors in a vertical gradient across each shape. - blocks: Divides each shape into vertical strips of solid, related colors.
    shape_opacityFLOAT1.000.1–1The alpha value (0.0 to 1.0) for the drawn shapes. 1.0 is fully opaque.
    background_colorSTRINGblackThe background color of the image. Supported options: β€’ Color names: black, white, red, blue, etc. β€’ Hex codes: #FF0000, #00FF00, etc. β€’ Special values: - random (random color) - noise (monochrome Gaussian noise) - noise_large (large monochrome noise) - noise_color (colored Gaussian noise) - noise_color_large (large colored noise) For full color name list, see: https://www.w3.org/TR/css-color-3/#svg-color
    positioning_biasCOMBOControls where shapes are likely to appear. Options: - scattered: Anywhere on the canvas. - center_weighted: Clustered in the center. - edge_weighted: Clustered along the edges. - grid_aligned: Aligned to a grid. - random_weighted: Clustered around two random points. - north/south/east/west: Clustered on that edge. - nw/ne/sw/se: Clustered in that corner.
    arrangementCOMBOArrange shapes in a structured, less random pattern. Options: - none: Random placement. - spiral: Shapes are arranged in a spiral. - burst: Shapes burst outwards from the center. - grid: Shapes are aligned to a grid.
    size_distributionCOMBOControls the distribution of shape sizes. Options: - uniform: All sizes are equally likely. - prefer_small: Favors smaller shapes. - prefer_large: Favors larger shapes.
    allow_rotationBOOLEANtrueAllow random rotation of shapes like rectangles and lines.
    noise_levelFLOAT0.000–5Controls the amount of Gaussian noise added to shape fills. It acts as a multiplier for the noise intensity, where 0 is no noise and 1 is maximum intensity.
    noise_scaleFLOAT11–100Scale of the noise pattern. A scale of 1 creates fine, per-pixel noise. Higher values create larger, more coherent noise patterns.
    noise_colorCOMBOWhether the noise should be colored or monochrome.
    warp_typeCOMBOType of distortion to apply to the final image. Options: - none: No distortion. - wave: Sine wave distortion. - noise_field: Random, noisy distortion. - swirl: Swirls the image around the center.
    warp_intensityFLOAT0.5Multiplier for the warp effect. For wave/turbulence, it scales pixel displacement. For swirl, it scales the rotation angle.
    blur_radiusFLOAT0.0The radius in pixels for the final Gaussian blur filter.
    seedINT00–18446744073709550000The seed for the random number generator. Using the same seed and parameters will produce the same image.

    Outputs (2)

    NameTypeDescription
    imageIMAGEThe generated image.
    maskMASKWhite where shapes were drawn, black where the background shows through.