In the codebase at C:\ComfyUI_frontend, search for any code that calls computeSize on…
- User
In the codebase at C:\ComfyUI_frontend, search for any code that calls
computeSizeon nodes during or after workflow loading. I need to know:- Does
computeSizeget called afternode.configure()returns? Look in LGraph.configure, LGraphNode.configure, app.ts loadGraphData, and any extensions. - Does
computeSizeor any similar size calculation modify the node'spos(position)? - Are there any callbacks like
onNodeAdded,onConfigure,nodeCreated(in ComfyUI extensions) that modify node position after loading?
Also look in C:\ComfyUI\ for any Python node definitions or extension code that might register JavaScript callbacks affecting node positions.
Search thoroughly and return all relevant findings with file paths and line numbers.
- Does
Assistant
I'll conduct a thorough search across the codebase for all the requested patterns. Let me start with multiple parallel searches.
Assistant
Now let me read the key files in detail to understand the flow:
Assistant
Now let me dig deeper into the critical code paths. Let me read LGraph.configure's node creation and the full LGraphNode.configure method:
Assistant
Now let me look at the
computeSizemethod to check if it ever modifiespos, and look at theLGraphNode.configuremethod from the beginning, along withLGraph.addand thesetSize/snapToGridmethods:Assistant
Now let me look at
snapToGridon the node,setSize, thenodeCreatedextensions that modify position, and theonNodeAddedcallback chain in the graph manager:Assistant
Now let me look at the
nodeCreatedin the main registerNodeDef (the non-subgraph version), and look at extensions that might modify position:Assistant
This is a critical find. Let me read the
ensureCorrectLayoutScalefunction anduseLayoutSync:Assistant
Let me now check the extensions that have
nodeCreatedcallbacks for any position modifications, and look atonGraphConfigured/onAfterGraphConfigured:Assistant
Let me check the key extensions for position modifications in their callbacks:
Assistant
Now let me check for the Python backend at
C:\ComfyUI\:Assistant
Now let me check the
LGraph.addflow to see exactly whenonNodeAddedis called relative toconfigure, and look at theonNodeCreatedcallback on nodes:Assistant
Let me also check if the
LGraphNode.configuremethod copiesposfrom the serialized data (and the flow of node creation inLGraph.configure):Assistant
Now let me look at the
nodeCreatedextensions that could modify position, specifically the ones that modifysizeviacomputeSize:Assistant
Now let me check the
errorNodeWidgets.tsto see theonConfigurechain:Assistant
Let me now look at
dynamicWidgets.tsmore closely since it callscomputeSize:Assistant
Now let me check the
customWidgets.tsextension since it callscomputeSize:Assistant
Now let me check the
LiteGraph.createNode-> constructor ->onNodeCreatedflow more carefully, plus theensureCorrectLayoutScalecall timing inloadGraphData:Assistant