You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-12
Original file line number
Diff line number
Diff line change
@@ -116,15 +116,27 @@ if __name__ == "__main__":
116
116
- Creating large queues for image generation (For example, you could adjust the script to generate 1000 images without clicking ctrl+enter 1000 times)
117
117
- Easily expanding or iterating on your architecture in Python once a foundational workflow is in place in the GUI
118
118
119
+
## V1.3.0 Release Notes
120
+
- Generate .py file directly from the ComfyUI Web App
121
+
122
+

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
+
119
131
## V1.0.0 Release Notes
120
132
-**Use all the custom nodes!**
121
133
- 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.
122
134
123
135
124
-
## Usage
136
+
## Installation
125
137
126
138
127
-
1. Navigate to your `ComfyUI` directory
139
+
1. Navigate to your `ComfyUI/custom_nodes` directory
128
140
129
141
2. Clone this repo
130
142
```bash
@@ -135,8 +147,8 @@ if __name__ == "__main__":
135
147
```
136
148
/comfy
137
149
/comfy_extras
138
-
/ComfyUI-to-Python-Extension
139
150
/custom_nodes
151
+
--/ComfyUI-to-Python-Extension
140
152
/input
141
153
/models
142
154
/output
@@ -157,30 +169,44 @@ if __name__ == "__main__":
157
169
server.py
158
170
```
159
171
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
+

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
161
187
```bash
162
188
pip install -r requirements.txt
163
189
```
164
190
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!**
166
192
167
193

168
194
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
170
196
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
172
198
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 fora file called `workflow_api.json`. You can also update the `queue_size` variable to your desired number of images that you want to generatein 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 fora file called `workflow_api.json`. You can also update the `queue_size` variable to your desired number of images that you want to generatein a single script execution. By default, the scripts will generate 10 images. Run `python comfyui_to_python.py --help`for more details.
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`.
185
211
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