THREE CRITICAL FIXES: 1. 🔧 CANVAS NOT SHOWING - Added missing WEB_DIRECTORY export - ROOT CAUSE: __init__.py had no WEB_DIRECTORY export - ComfyUI couldn't find JavaScript files in /js/ folder - Canvas widget completely invisible/broken - FIX: Export WEB_DIRECTORY = os.path.join(os.path.dirname(__file__), "js") - All JavaScript extensions now load correctly 2. 🐛 INDEXERROR CRASH - Fixed variable shadowing in feathering loop - ROOT CAUSE: Inner loop variable 'i' shadowed outer loop variable 'i' - Line 397 feathering loop used 'i', corrupting outer iteration index - When accessing encoded_conditionings[i] at line 413, index was wrong - CRASH: IndexError: list index out of range - FIX: Renamed inner loop variable to 'edge_idx' (RegionalPrompting.py:397-410) - Feathering now works without crashing 3. 🎨 NODE NAMING - Removed "EASY!" and made names model-agnostic - BEFORE: "Regional Prompter (Flux/Chroma - Easy!)" - AFTER: "Regional Prompter (Mask-Based)" - Describes conditioning technique, not specific models - Mask-based works for: Flux, Chroma, SD3, SD3.5, Qwen-Image, etc. - Also: "SD/SDXL - Easy!" → "Area-Based" (clearer description) - Also: Simplified startup message to single line IMPACT: - Canvas now actually appears and works - No more crashes during execution with feathering - Professional naming that describes functionality - Clean console output during startup Documented all fixes in CONTEXT.md with detailed explanations.
52 lines
1.8 KiB
Python
52 lines
1.8 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 (SD1.5/SDXL)",
|
|
"MultiAreaConditioningMask": "Multi Area Conditioning (Mask-Based)",
|
|
"ConditioningUpscale": "Conditioning Upscale",
|
|
"ConditioningStretch": "Conditioning Stretch",
|
|
|
|
# Enhanced nodes with inline prompts
|
|
"RegionalPrompterSimple": "Regional Prompter (Area-Based)",
|
|
"RegionalPrompterFlux": "Regional Prompter (Mask-Based)",
|
|
}
|
|
|
|
# Export web directory for JavaScript files
|
|
import os
|
|
WEB_DIRECTORY = os.path.join(os.path.dirname(__file__), "js")
|
|
|
|
__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS', 'WEB_DIRECTORY']
|
|
|
|
print('\033[34mComfyUI_RegionalConditioning: \033[92mLoaded successfully\033[0m')
|