MAJOR NEW FEATURES: =================== 🌟 NEW NODES (RECOMMENDED for all users): - RegionalPrompterSimple (SD/SDXL) - Type prompts directly! - RegionalPrompterFlux (Flux/Chroma) - Optimized for modern models! ✅ NO MORE external CLIP Text Encode nodes needed ✅ Simple workflow: Checkpoint → CLIP → Regional Prompter → Sampler ✅ Same visual box-drawing interface ✅ Up to 4 regions + background prompt ✅ Multiline text inputs for prompts FLUX OPTIMIZATIONS: =================== - Softened mask strength (0.8 vs 1.0) based on research - Gentle feathering at region edges (40-60px equivalent) - Automatic region count warning (>4 regions) - flux_optimize toggle for easy control IMPROVEMENTS TO EXISTING NODES: ================================ - Add mask_strength parameter to MultiAreaConditioningMask (allows 0.7-0.85 for Flux, 1.0 for SD/SDXL) - Add tooltips explaining Flux optimization - Improve documentation with clear model recommendations TECHNICAL DETAILS: ================== Python Changes: - RegionalPrompting.py - New enhanced nodes with CLIP encoding - Uses clip.tokenize() and clip.encode_from_tokens() internally - Proper pooled_output handling for all models - Comprehensive error handling and validation JavaScript Changes: - RegionalPrompting.js - Visual canvas UI for new nodes - Reuses canvas drawing code from original nodes - Widget positioning adjusted for prompt inputs Documentation: - Prominent "NEW!" section highlighting enhanced nodes - Easy mode vs Advanced mode comparison - Flux-specific tips and optimization details - Updated quick start with both methods BACKWARD COMPATIBILITY: ======================= - All original nodes unchanged and fully functional - Original nodes renamed to "Advanced" in UI - Enhanced nodes marked as "RECOMMENDED" - Users can choose based on preference USER EXPERIENCE: ================ Before (Advanced): Checkpoint → CLIP → CLIPTextEncode → MultiAreaConditioning → Sampler (repeat CLIPTextEncode for each region) After (Easy): Checkpoint → CLIP → Regional Prompter → Sampler (type all prompts in one node!) COMPATIBILITY: ============== ✅ ComfyUI 0.3.71+ ✅ SD1.5, SD2.x, SDXL (area-based) ✅ Flux, Chroma, SD3, SD3.5 (mask-based with optimizations) ✅ V3 schema ready (uses standard INPUT_TYPES, will migrate later) This makes regional conditioning DRAMATICALLY easier to use!
56 lines
2.2 KiB
Python
56 lines
2.2 KiB
Python
# Made by Davemane42#0042 for ComfyUI
|
|
# Modernized for ComfyUI 0.3.71+ compatibility
|
|
# Enhanced version with inline prompts - November 2025
|
|
|
|
from .MultiAreaConditioning import (
|
|
MultiAreaConditioning,
|
|
MultiAreaConditioningMask,
|
|
ConditioningUpscale,
|
|
ConditioningStretch,
|
|
ConditioningDebug
|
|
)
|
|
from .MultiLatentComposite import MultiLatentComposite
|
|
from .RegionalPrompting import (
|
|
RegionalPrompterSimple,
|
|
RegionalPrompterFlux
|
|
)
|
|
|
|
NODE_CLASS_MAPPINGS = {
|
|
# Original nodes (require external CLIP Text Encode)
|
|
"MultiLatentComposite": MultiLatentComposite,
|
|
"MultiAreaConditioning": MultiAreaConditioning,
|
|
"MultiAreaConditioningMask": MultiAreaConditioningMask,
|
|
"ConditioningUpscale": ConditioningUpscale,
|
|
"ConditioningStretch": ConditioningStretch,
|
|
|
|
# Enhanced all-in-one nodes (inline prompts - RECOMMENDED)
|
|
"RegionalPrompterSimple": RegionalPrompterSimple,
|
|
"RegionalPrompterFlux": RegionalPrompterFlux,
|
|
}
|
|
|
|
# Display names for the UI
|
|
NODE_DISPLAY_NAME_MAPPINGS = {
|
|
# Original nodes
|
|
"MultiLatentComposite": "Multi Latent Composite (Visual)",
|
|
"MultiAreaConditioning": "Multi Area Conditioning (SD/SDXL - Advanced)",
|
|
"MultiAreaConditioningMask": "Multi Area Conditioning (Flux/Chroma - Advanced)",
|
|
"ConditioningUpscale": "Conditioning Upscale",
|
|
"ConditioningStretch": "Conditioning Stretch",
|
|
|
|
# Enhanced nodes
|
|
"RegionalPrompterSimple": "🎨 Regional Prompter (SD/SDXL - Easy!)",
|
|
"RegionalPrompterFlux": "🎨 Regional Prompter (Flux/Chroma - Easy!)",
|
|
}
|
|
|
|
__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS']
|
|
|
|
print('\033[34mDavemane42 Custom Nodes (Modernized): \033[92mLoaded\033[0m')
|
|
print('\033[90m 📦 Original Nodes (Advanced):\033[0m')
|
|
print('\033[90m - Multi Area Conditioning: SD1.5, SD2.x, SDXL\033[0m')
|
|
print('\033[90m - Multi Area Conditioning Mask: Flux, Chroma, SD3+\033[0m')
|
|
print('\033[90m - Multi Latent Composite with feathering\033[0m')
|
|
print('\033[90m - Conditioning utilities (Upscale, Stretch)\033[0m')
|
|
print('\033[92m ✨ RECOMMENDED - Enhanced Easy Nodes:\033[0m')
|
|
print('\033[92m - Regional Prompter (SD/SDXL) - Type prompts directly!\033[0m')
|
|
print('\033[92m - Regional Prompter (Flux/Chroma) - Optimized for modern models!\033[0m')
|