ComfyUI Extension: comfyui-egregora-regional
Image Tile Split with Region-Aware Prompting for ComfyUI
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)
- Open ComfyUI → Manager.
- Select Install from URL and paste this repo URL:
https://github.com/lucasgattas/comfyui-egregora-regional
- 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
- Resize your input image to target resolution.
- Egregora Tile Splitter → set
tile_w
,tile_h
,overlap
. - Florence‑2 (or other captioner) → produce per‑tile text → Primitive:String(multiline) → wire into Egregora Regional Conditioning.
- Egregora Regional Conditioning → connect the same
grid_json
andclip
. - CLIP Text Encode (base prompt, optional).
- Apply ControlNet (Tile, Canny, Depth, etc.) on the base conditioning.
- Conditioning (Average) → blend Regional Conditioning with ControlNet‑augmented conditioning.
- Tiled Diffusion → set the same
tile_width
,tile_height
,tile_overlap
. - Sampler → LCM or other sampler of your choice.
- 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.