Global declaration of variables #733
Replies: 1 comment 1 reply
-
Figured it out by using regular text boxes of any kind, one for the variable declarations and the other for the prompt using those variables. I use a "string concatenate node" first with the variable box loaded in first and the prompt afterwards to avoid conflicts. Then I feed the concatenated string into the text input of a "random prompts" node, so the code gets evaluated in one piece, working without any problems. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a way of declaring and specifying variables in ComfyUI in a separate node to avoid cluttering the main prompt node? Basically declaring the variables as global someplace before the prompt, like an __ init __ node.
Beta Was this translation helpful? Give feedback.
All reactions