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

Pass prompt argument to nodes that define it in their inputs #41

Open
niqodea opened this issue Feb 19, 2024 · 1 comment
Open

Pass prompt argument to nodes that define it in their inputs #41

niqodea opened this issue Feb 19, 2024 · 1 comment

Comments

@niqodea
Copy link

niqodea commented Feb 19, 2024

Hello! Thank you for the useful script.

I noticed that, when converting workflows containing efficiency nodes, the obtained script fails, unlike the original workflow on ComfyUI. The reason seems to be caused by the fact that these nodes take as input a prompt parameter in their API (ref), which in Comfy seems to be a special type of parameter containing the entire JSON workflow as a python dictionary. The efficiency nodes then use such information to perform optimizations and prune unused tensors.

When not passing prompt to these nodes, the default value None always causes a crash down the line. While it might be argued that the behavior is not a problem of this extension, it's also true that not passing prompt to nodes that accept it might lead to undesirable behavior. In this case, even when handling the lack of prompt gracefully, the efficiency nodes would probably not be able to carry out performance optimizations.

It would be great to update this extension to send prompt as input to the nodes that support it in the generated code.

@pydn
Copy link
Owner

pydn commented Sep 13, 2024

I would need the workflow .json you are generating and the .py file created by the extension to better understand the issue. I've made some updates in the last couple of days to make the extension more flexible at accepting additional arguments from nodes, which may already address this issue.

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

No branches or pull requests

2 participants