Skip to content

Power Conductor, Dynamic Context, and Dynamic Context Switch nodes don't load when clicked #654

@Cordux

Description

@Cordux

Bug Description

Several nodes appear in the rgthree-comfy right-click menu but nothing happens when clicking on them. The nodes don't appear on the canvas.

Affected nodes:

  • Power Conductor
  • Dynamic Context
  • Dynamic Context Switch

Screenshots

Right-Click Menu (nodes visible but don't work):
Image

Node List (nodes missing):
Image

Image

Expected Behavior

Clicking on a node in the menu should add it to the canvas.

Actual Behavior

Clicking on these nodes does nothing. No node appears, no error in terminal.

Investigation

I did some debugging and found:

  1. The JS files exist in web/comfyui/:

    • power_conductor.js
    • dynamic_context.js
    • dynamic_context_switch.js
  2. The menu entries exist in constants.js:

DYNAMIC_CONTEXT: addRgthree("Dynamic Context"),
DYNAMIC_CONTEXT_SWITCH: addRgthree("Dynamic Context Switch"),
POWER_CONDUCTOR: addRgthree("Power Conductor"),
  1. Powershell check:

    Get-ChildItem -Path "C:\AI\ComfyUI\custom_nodes\rgthree-comfy\web" -Recurse -Filter "*.js" | Select-String -Pattern "power_conductor|dynamic_context" -List

    Expected Output:

    Shows files exist but only reference themselves and constants.js — no imports in rgthree.js:

    web\comfyui\constants.js:          POWER_CONDUCTOR: addRgthree("Power Conductor"),
    web\comfyui\constants.js:          DYNAMIC_CONTEXT: addRgthree("Dynamic Context"),
    web\comfyui\power_conductor.js:    this.comfyClass = NodeTypesString.POWER_CONDUCTOR;
    web\comfyui\dynamic_context.js:    ...
    web\comfyui\dynamic_context_switch.js: ...
    

    This proves the files exist but aren't imported anywhere!

  2. Browser Network tab confirms these files are not loaded

    Browser console check:

    LiteGraph.registered_node_types["Power Conductor (rgthree)"]
    // Returns: undefined
    LiteGraph.registered_node_types["Dynamic Context (rgthree)"]
    // Returns: undefined
    LiteGraph.registered_node_types["Dynamic Context Switch (rgthree)"]
    // Returns: undefined
    Image
  3. Direct URL works:

    http://127.0.0.1:8188/extensions/rgthree-comfy/power_conductor.js
    // Shows JS code
    http://127.0.0.1:8188/extensions/rgthree-comfy/dynamic_context_switch.js
    // Shows JS code
    http://127.0.0.1:8188/extensions/rgthree-comfy/dynamic_context.js
    // Shows JS code
    

Environment

  • ComfyUI version: 0.6.0
  • ComfyUI Frontend: 1.35.9 ** Latest (git pulled 2024-12-24)
  • rgthree-comfy: Latest (git pulled 2024-12-24) - rgthree-comfy v1.0.2512112053
  • OS: Windows
  • Python: 3.10.11
  • Nodes 2.0: Disabled

Possible Cause

The node files exist but aren't imported anywhere, so they never get registered with LiteGraph despite appearing in the menu.

Possible Fix

Import the virtual node files in rgthree.js:

import './power_conductor.js';
import './dynamic_context.js';
import './dynamic_context_switch.js';

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions