Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case: Unknown output node: lead the following error ----> v = G.nodes[node]['v'] KeyError: 'v' #77

Open
cihangoksu opened this issue Oct 27, 2024 · 7 comments

Comments

@cihangoksu
Copy link

Hi,

I am trying to transpile a complex ComfyUI workflow. For some nodes in my workflow "node_pos_sum" function in init.py returns to 0 with a warning message. But that leads an error later on in the "visit" function in init.py

image

Is there a way to work around this KeyError caused by an empty node {} in ComfyScript?

Thank you in advance :-)

Cheers,
Cihan

@Chaoses-Ib
Copy link
Owner

Is the workflow you are transpiling in web UI format? If so, you can try to convert it to API format, i.e. load it in web UI and Save (API format) (enable dev mode in settings first), and then transpile again.

@cihangoksu
Copy link
Author

cihangoksu commented Oct 27, 2024

Hmm sorry how does it work with API format actually? I ran python main.py in ComfyUI folder, and then developed the workflow in my browser at http://127.0.0.1:8188/ , and then Clicked save to 'Save workflow as' Json. Then I transpiled as explained in Comfyscript tutorials:
python -m comfy_script.transpile PathToWorkflow.json

@Chaoses-Ib
Copy link
Owner

Enable Dev Mode in settings:

image

Then Save (API format):

image

@cihangoksu
Copy link
Author

cihangoksu commented Oct 27, 2024

Oh cool! I did not know that... Thx a lot :-) It solved the problem, but led another (as it' irrelevant, I am opening a new issue).

@cihangoksu
Copy link
Author

After saving a workflow in API format, I cannot run KSampler (Advanced) nodes without Model, +, - inputs? But it is not problematic in UI mode. Why is that? How can that be fixed?

image

@Chaoses-Ib
Copy link
Owner

Maybe some nodes break API format again. Are you using any UE Nodes?

@cihangoksu
Copy link
Author

yes you are right sorry, anything anywhere and Prompts Everywhere nodes lose their connections, that is the problem.. Thanks for guiding through!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants