ComfyUI Extension: comfyui-egregora-regional

Authored by lucasgattas

Created

Updated

0 stars

Run ComfyUI workflows without the setup

No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.

Image Tile Split with Region-Aware Prompting for ComfyUI

Looking for a different extension?

Custom Nodes (0)

    README

    comfyui-egregora-regional 🧩🌾

    ✨ Image Tile Split with Region-Aware Prompting for ComfyUI


    🚀 Features

    🧱 Egregora Tile Splitter

    • Flexible grid with overlap (aligned with Tiled Diffusion).
    • Emits a shared grid_json used by the other nodes so everything stays in sync.
    • Edge-safe alignment for SDXL/SD1.5 latent grids.

    🗺️ Egregora Regional Conditioning (Unified)

    • Per‑tile positive/negative prompts from lists or text.
    • ✅ Accepts Primitive → String (multiline) directly (e.g., output pasted from Florence‑2).
    • Blends tile‑specific text with optional global base prompts.
    • Smooth feathered masks to reduce seams across tiles.
    • Validates and snaps each region to the latent grid to avoid artifacts.

    🤝 ControlNet Compatibility

    • Combine with Apply ControlNet or Apply Advanced ControlNet.
    • Use Conditioning (Average) to mix global ControlNet guidance with regional prompts.
    • Prevents blurry results by blending instead of stacking conditionings.

    📦 Installation

    1) Via ComfyUI Manager (recommended)

    1. Open ComfyUI → Manager.
    2. Select Install from URL and paste this repo URL:
    https://github.com/lucasgattas/comfyui-egregora-regional
    
    1. Click Install and then Reload ComfyUI.

    2) Manual Installation

    cd ComfyUI/custom_nodes
    git clone https://github.com/lucasgattas/comfyui-egregora-regional.git
    # restart ComfyUI
    

    🧩 Nodes

    🖼️ Egregora Tile Splitter

    Splits an IMAGE (B,H,W,C) into overlapping tiles and returns:

    • tiles_batch – concatenated tiles
    • grid_json – grid metadata for downstream nodes

    ✍️ Egregora Regional Conditioning (Unified)

    Builds per‑tile CONDITIONING (positive & negative) from lists or text. Supports:

    • tile_prompts_json – one prompt per tile (list or newline text)
    • base_positive, base_negative with adjustable strengths
    • CLIP text‑encode cache for speed
    • Feathered tile masks to minimize seams
    • Primitive → String (multiline) input (ideal for Florence‑2 output)

    Inputs: clip, grid_json, tile_prompts_json Outputs: conditioning_pos, conditioning_neg


    ⚡ Quick Start

    1. Resize your input image to target resolution.
    2. Egregora Tile Splitter → set tile_w, tile_h, overlap.
    3. Florence‑2 (or other captioner) → produce per‑tile text → Primitive:String(multiline) → wire into Egregora Regional Conditioning.
    4. Egregora Regional Conditioning → connect the same grid_json and clip.
    5. CLIP Text Encode (base prompt, optional).
    6. Apply ControlNet (Tile, Canny, Depth, etc.) on the base conditioning.
    7. Conditioning (Average) → blend Regional Conditioning with ControlNet‑augmented conditioning.
    8. Tiled Diffusion → set the same tile_width, tile_height, tile_overlap.
    9. Sampler → LCM or other sampler of your choice.
    10. VAE Decode (Tiled) → decode as usual.

    Upscaler example (high‑level):

    IMAGE ➜ Tile Splitter ➜ Florence‑2 ➜ Primitive:String(multiline) ➜
    Regional Conditioning ➜ CLIP Text Encode ➜ Apply ControlNet ➜
    Conditioning (Average) ➜ Tiled Diffusion ➜ KSampler ➜ VAE Decode
    

    💡 Tips

    • Bigger tiles + smaller overlap = faster; more overlap = smoother transitions.
    • Match Tile Splitter and Tiled Diffusion overlap for seam‑free blending.
    • Start with Conditioning (Average) strength ~0.3–0.5 for regional prompts.
    • Keep ControlNet strength moderate (0.3–0.6) to avoid over‑constraint.

    ✅ Compatibility

    • ComfyUI (latest stable)
    • Works with SDXL and SD1.5
    • No additional Python packages required

    📝 License

    MIT


    🙌 Credits

    Inspired by the ComfyUI community, Tiled Diffusion, and ControlNet workflows. Special thanks to those pushing regional prompting and advanced upscalers forward.

    Run ComfyUI workflows without the setup

    No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.

    Learn more