Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat: Add ComfyUI V3 node compatibility support #145
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
Uh oh!
There was an error while loading. Please reload this page.
feat: Add ComfyUI V3 node compatibility support #145
Changes from all commits
e3631beFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
ComfyUI-to-Python-Extension
The
ComfyUI-to-Python-Extensionis a powerful tool that translates ComfyUI workflows into executable Python code. Designed to bridge the gap between ComfyUI's visual interface and Python's programming environment, this script facilitates the seamless transition from design to code execution. Whether you're a data scientist, a software developer, or an AI enthusiast, this tool streamlines the process of implementing ComfyUI workflows in Python.Convert this:
To this:
Potential Use Cases
V1.3.1 Release Notes
V1.3.0 Release Notes
V1.2.1 Release Notes
comfyui_to_python.pyparameters with CLI argumentsV1.2.0 Release Notes
ComfyUIV1.0.0 Release Notes
Installation
Navigate to your
ComfyUI/custom_nodesdirectoryClone this repo
After cloning the repo, your
ComfyUIdirectory should look like this:Web App Use
Launch ComfyUI
Load your favorite workflow and click
Save As ScriptType your desired file name into the pop up screen.
Move .py file from your downloads folder to your
ComfyUIdirectory.Now you can execute the newly created .py file to generate images without launching a server.
CLI Usage
Navigate to the
ComfyUI-to-Python-Extensionfolder and install requirementsLaunch ComfyUI, click the gear icon over
Queue Prompt, then checkEnable Dev mode Options. THE SCRIPT WILL NOT WORK IF YOU DO NOT ENABLE THIS OPTION!Load up your favorite workflows, then click the newly enabled
Save (API Format)button under Queue PromptMove the downloaded .json workflow file to your
ComfyUI/ComfyUI-to-Python-ExtensionfolderIf needed, add arguments when executing
comfyui_to_python.pyto update the defaultinput_fileandoutput_fileto match your .json workflow file and desired .py file name. By default, the script will look for a file calledworkflow_api.json. You can also update thequeue_sizevariable to your desired number of images that you want to generate in a single script execution. By default, the scripts will generate 10 images. Runpython comfyui_to_python.py --helpfor more details.6a. Run the script with default arguments:
6b. Run the script with optional arguments:
python comfyui_to_python.py --input_file "workflow_api (2).json" --output_file my_workflow.py --queue_size 100After running
comfyui_to_python.py, a new .py file will be created in the current working directory. If you made no changes, look forworkflow_api.py.Now you can execute the newly created .py file to generate images without launching a server.