Skip to content

Commit fa57d09

Browse files
committed
Update readme to show latest changes for the last few releases.
1 parent af9a0df commit fa57d09

File tree

1 file changed

+38
-12
lines changed

1 file changed

+38
-12
lines changed

README.md

Lines changed: 38 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,27 @@ if __name__ == "__main__":
116116
- Creating large queues for image generation (For example, you could adjust the script to generate 1000 images without clicking ctrl+enter 1000 times)
117117
- Easily expanding or iterating on your architecture in Python once a foundational workflow is in place in the GUI
118118

119+
## V1.3.0 Release Notes
120+
- Generate .py file directly from the ComfyUI Web App
121+
122+
![Save As Script](images/save_as_script.png)
123+
124+
## V1.2.1 Release Notes
125+
- Dynamically change `comfyui_to_python.py` parameters with CLI arguments
126+
- Hotfix to handle nodes that accept kwargs.
127+
128+
## V1.2.0 Release Notes
129+
- Updates to adhere to latest changes from `ComfyUI`
130+
119131
## V1.0.0 Release Notes
120132
- **Use all the custom nodes!**
121133
- Custom nodes are now supported. If you run into any issues with code execution, first ensure that the each node works as expected in the GUI. If it works in the GUI, but not in the generated script, please submit an issue.
122134

123135

124-
## Usage
136+
## Installation
125137

126138

127-
1. Navigate to your `ComfyUI` directory
139+
1. Navigate to your `ComfyUI/custom_nodes` directory
128140

129141
2. Clone this repo
130142
```bash
@@ -135,8 +147,8 @@ if __name__ == "__main__":
135147
```
136148
/comfy
137149
/comfy_extras
138-
/ComfyUI-to-Python-Extension
139150
/custom_nodes
151+
--/ComfyUI-to-Python-Extension
140152
/input
141153
/models
142154
/output
@@ -157,30 +169,44 @@ if __name__ == "__main__":
157169
server.py
158170
```
159171

160-
3. Navigate to the `ComfyUI-to-Python-Extension` folder and install requirements
172+
## Web App Use
173+
1. Launch ComfyUI
174+
175+
2. Load your favorite workflow and click `Save As Script`
176+
177+
![Save As Script](images/save_as_script.png)
178+
179+
3. Type your desired file name into the pop up screen.
180+
181+
4. Move .py file from your downloads folder to your `ComfyUI` directory.
182+
183+
5. Now you can execute the newly created .py file to generate images without launching a server.
184+
185+
## CLI Usage
186+
1. Navigate to the `ComfyUI-to-Python-Extension` folder and install requirements
161187
```bash
162188
pip install -r requirements.txt
163189
```
164190

165-
4. Launch ComfyUI, click the gear icon over `Queue Prompt`, then check `Enable Dev mode Options`. **THE SCRIPT WILL NOT WORK IF YOU DO NOT ENABLE THIS OPTION!**
191+
2. Launch ComfyUI, click the gear icon over `Queue Prompt`, then check `Enable Dev mode Options`. **THE SCRIPT WILL NOT WORK IF YOU DO NOT ENABLE THIS OPTION!**
166192

167193
![Enable Dev Mode Options](images/dev_mode_options.jpg)
168194

169-
5. Load up your favorite workflows, then click the newly enabled `Save (API Format)` button under Queue Prompt
195+
3. Load up your favorite workflows, then click the newly enabled `Save (API Format)` button under Queue Prompt
170196

171-
6. Move the downloaded .json workflow file to your `ComfyUI/ComfyUI-to-Python-Extension` folder
197+
4. Move the downloaded .json workflow file to your `ComfyUI/ComfyUI-to-Python-Extension` folder
172198

173-
7. If needed, add arguments when executing `comfyui_to_python.py` to update the default `input_file` and `output_file` to match 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. Run `python comfyui_to_python.py --help` for more details.
199+
5. If needed, add arguments when executing `comfyui_to_python.py` to update the default `input_file` and `output_file` to match 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. Run `python comfyui_to_python.py --help` for more details.
174200

175-
8a. Run the script with default arguments:
201+
6a. Run the script with default arguments:
176202
```bash
177203
python comfyui_to_python.py
178204
```
179-
8b. Run the script with optional arguments:
205+
6b. Run the script with optional arguments:
180206
```bash
181207
python comfyui_to_python.py --input_file "workflow_api (2).json" --output_file my_workflow.py --queue_size 100
182208
```
183209

184-
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`.
210+
7. 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`.
185211

186-
10. Now you can execute the newly created .py file to generate images without launching a server.
212+
8. Now you can execute the newly created .py file to generate images without launching a server.

0 commit comments

Comments
 (0)