Files
2025-11-25 09:29:54 +00:00

3.9 KiB

Node Loading Fixed - Final Summary ✅

Problem

After the modular refactoring, all 19 nodes stopped loading in ComfyUI despite showing success in the startup log.

Root Cause

The over-complicated refactoring introduced:

  1. Lazy loading with properties - caused issues during ComfyUI's node registration
  2. Singleton pattern attempt - added unnecessary complexity
  3. Missing __init__ methods - broke ComfyUI's node instantiation

Solution Applied

Restored the working pattern from the original files while keeping the modular organization:

Changes Made

  1. core/orchestrator.py - Changed to eager loading

    • ✅ Loads all modifiers in __init__() immediately
    • ✅ No more lazy loading properties
    • ✅ Simple instance variables
  2. All 19 Node Files - Restored __init__ pattern

    • ✅ Each node has def __init__(self): self.orchestrator = PromptOrchestrator()
    • ✅ Matches the old working structure exactly
  3. __init__.py - Simplified imports

    • ✅ Direct import from nodes module
    • ✅ No singleton complexity

Files Updated

  • core/orchestrator.py (eager loading)
  • nodes/lighting_node.py
  • nodes/seasonal_node.py
  • nodes/location_node.py
  • nodes/weather_node.py
  • nodes/mood_node.py
  • nodes/camera_node.py
  • nodes/color_grading_node.py
  • nodes/action_node.py
  • nodes/era_node.py
  • nodes/detail_node.py
  • nodes/composition_node.py
  • nodes/style_node.py (2 classes)
  • nodes/batch_node.py (2 classes)
  • nodes/utility_nodes.py (4 classes)
  • __init__.py

Test Results

✓ All imports successful
✓ 19 nodes found
✓ Node instantiation works
✓ Node functionality tested: "test car" → "test car, golden hour, warm low-angle side-light, clear sky"

Next Step - USER ACTION REQUIRED

YOU MUST RESTART COMFYUI for the fix to take effect:

  1. Completely close ComfyUI
  2. Restart ComfyUI
  3. Check the startup log for:
    ================================================================================
    Prompt Orchestration Nodes v2.0.0 loaded successfully!
      - 19 custom nodes available
      - 11 variation dimensions:
        • Lighting (20 modifiers)
        • Seasonal (20 modifiers)
        ...
    ================================================================================
    
  4. Open the node browser (right-click or double-click in workflow)
  5. Verify "Prompt Orchestration" category appears
  6. Test adding a node like "Lighting Modifier (Single)"

Available Nodes (19 Total)

Single Modifier Nodes (11)

  1. Lighting Modifier (Single)
  2. Seasonal Modifier (Single)
  3. Location Modifier (Single)
  4. Weather Modifier (Single)
  5. Mood Modifier (Single)
  6. Camera Modifier (Single)
  7. Color Grading (Single)
  8. Action Modifier (Single)
  9. Era Modifier (Single)
  10. Detail Modifier (Single)
  11. Composition (Single)

Style Nodes (2)

  1. Style Transform
  2. Multi-Style Layer

Batch Nodes (2)

  1. Batch Variation Generator
  2. Preset Collection

Utility Nodes (4)

  1. Modifier Info
  2. Prompt Combiner
  3. Random Modifier
  4. Smart Variation (NLP)

What Was Kept

✅ Modular modifier organization (220 modifiers in separate files) ✅ Clean code structure ✅ All 11 variation dimensions

What Was Fixed

✅ Removed over-engineering (singleton, lazy loading) ✅ Restored working __init__ pattern ✅ Simplified orchestrator initialization ✅ Direct, simple imports

Architecture Now

ComfyUI loads → __init__.py → nodes/__init__.py → 19 node classes
                                                    ↓
                              Each node creates: PromptOrchestrator()
                                                    ↓
                              Orchestrator eagerly loads all 220 modifiers

Status: ✅ FIXED AND TESTED Action Required: Restart ComfyUI to see the nodes!