-
Notifications
You must be signed in to change notification settings - Fork 82
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
Support for Passing Dynamic Prompts via Command-Line Arguments #39
Comments
I have created a system that dynamically generates command-line arguments based on the inputs that are not fulfilled for any node in the ComfyUI workflow (i.e., any input [including widget inputs converted to piped inputs] that is required but not connected to a node will be interpreted as a command-line input). Unfortunately, this repo has not been active in some time. My fork is here which implements this system. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello! Thanks so much for your work on this!
I'm working with a script generated by the comfyui_to_python.py and am trying to modify the outputted script's functionality to accept dynamic prompts through command-line arguments. The goal is to make the script more flexible by allowing users to specify prompts at runtime, instead of having them hardcoded or predefined within the script (Actually trying to get it to work with LLM agent workflows).
Currently, the script either uses the hard coded prompt or (I assume) requires modification in the source code to change the prompt used in its operations.
Ideally, I would like the ability to pass a prompt directly when executing the script, something like this:
python script_name.py "Custom prompt text here"
This would set the script to use the provided text as the prompt for its execution cycle.
Questions:
Attempts:
I've tried modifying the script to parse command-line arguments using the sys.argv list, setting the first argument as the prompt variable. Here's a snippet of my current unsuccessful approach:
I appreciate any guidance or suggestions you can provide. Thank you for your time and assistance.
The text was updated successfully, but these errors were encountered: