You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Silent custom node import failures in real mode #93
It seems that custom nodes need to follow some strict relative imports to be parsed / stubbed properly into the nodes.piy files.
However auto imports generated by pycharm ( and presumably vscode ) don't always follow this convention and as a result sometimes nodes get silently not added to the stubs.
Is there a way to force any missed imports to throw an error - ideally with the full original error and its stack trade included - when importing comfy_script nodes in real mode ?
Sorry, I don't understand what exactly you mean. If you want to throw import errors at the start, you can use from comfy_script.runtime.real.nodes import ExampleNode instead of the wildcard import. Imports don't affect the generation of type stubs.
Now sometimes, one of the custom nodes I am working on fails to be loaded ( usually due to what I am 99% sure is an import error) but it doesn't show what the issue is, the only way I will notice is that the corresponding node will not be present in the nodes.piy filem, and the above will show (e.g. ):
The nodes count is how many nodes ConfyUI loaded, not how many nodes loaded into the runtime (which hasn't happened when the count is printed), so the problem happens inside ComfyUI. Normally ConfyUI should print any exceptions during load. I'm not sure about your case.
Activity
Chaoses-Ib commentedon Feb 2, 2025
Sorry, I don't understand what exactly you mean. If you want to throw import errors at the start, you can use
from comfy_script.runtime.real.nodes import ExampleNodeinstead of the wildcard import. Imports don't affect the generation of type stubs.JTriggerFish commentedon Feb 2, 2025
So at the beginning of my script / notebook I have
This updates the nodes.piy based on what gets collected from the custom_nodes subfolder and the output I get is:
Now sometimes, one of the custom nodes I am working on fails to be loaded ( usually due to what I am 99% sure is an import error) but it doesn't show what the issue is, the only way I will notice is that the corresponding node will not be present in the nodes.piy filem, and the above will show (e.g. ):
instead of 308
I was wondering if there was a way to see what caused the node to fail to be loaded ?
Chaoses-Ib commentedon Feb 2, 2025
The nodes count is how many nodes ConfyUI loaded, not how many nodes loaded into the runtime (which hasn't happened when the count is printed), so the problem happens inside ComfyUI. Normally ConfyUI should print any exceptions during load. I'm not sure about your case.