Skip to content

Commit 48248e0

Browse files
authored
Merge pull request #7 from pydn/pydn-patch-1
Update README.md
2 parents 18fea66 + f4050b2 commit 48248e0

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## ComfyUI-to-Python-Extension
22

3-
The `ComfyUI-to-Python-Extension` is a powerful tool that translates [ComfyUI](https://github.com/comfyanonymous/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. The output makes it easy to queue a large amount of images for generation and provides a base script to easily modify for experimination.
3+
The `ComfyUI-to-Python-Extension` is a powerful tool that translates [ComfyUI](https://github.com/comfyanonymous/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.
44

55
**Convert this:**
66

@@ -109,6 +109,11 @@ def main():
109109
if __name__ == "__main__":
110110
main()
111111
```
112+
## Potential Use Cases
113+
- Streamlining the process for creating a lean app or pipeline deployment that uses a ComfyUI workflow
114+
- Creating programmatic experiments for various prompt/parameter values
115+
- Creating large queues for image generation (For example, you could adjust the script to generate 1000 images without clicking ctrl+enter 1000 times)
116+
- Easily expanding or iterating on your architecture in Python once a foundational workflow is in place in the GUI
112117

113118
## V1.0.0 Release Notes
114119
- **Use all the custom nodes!**
@@ -164,13 +169,13 @@ if __name__ == "__main__":
164169

165170
6. Move the downloaded .json workflow file to your `ComfyUI/ComfyUI-to-Python-Extension` folder
166171

167-
7. If needed, update the `input` variable at the bottom of `comfyui_to_python.py` to match the name of your .json workflow file. By default, the script will look for a file called `workflow_api.json`. You can also update the `queue_size` variable to your desired number of images that you want to generate in a single script execution. By default, the scripts will generate 10 images.
172+
7. If needed, update the `input_file` and `output_file` variables at the bottom of `comfyui_to_python.py` to match the name of your .json workflow file and desired .py file name. By default, the script will look for a file called `workflow_api.json`. You can also update the `queue_size` variable to your desired number of images that you want to generate in a single script execution. By default, the scripts will generate 10 images.
168173

169174
8. Run the script:
170175
```bash
171176
python comfyui_to_python.py
172177
```
173178

174-
9. After running `comfyui_to_python.py`, a new .py file will be created in the current working directory that contains the same name as the `input` variable. If you made no changes, look for `workflow_api.py`.
179+
9. After running `comfyui_to_python.py`, a new .py file will be created in the current working directory. If you made no changes, look for `workflow_api.py`.
175180

176181
10. Now you can execute the newly created .py file to generate images without launching a server.

0 commit comments

Comments
 (0)