Skip to content

Commit 5e0d1dd

Browse files
author
Peyton
committed
Finished first pass at the README
1 parent b2ce42c commit 5e0d1dd

File tree

3 files changed

+25
-13
lines changed

3 files changed

+25
-13
lines changed

README.md

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -110,19 +110,15 @@ if __name__ == "__main__":
110110

111111
## Usage
112112

113-
1. **Clone this repo**
114-
```bash
115-
git clone https://github.com/pydn/ComfyUI-to-Python-Extension.git
116-
```
117113

118-
2. **Install requirements**
114+
1. Navigate to your `ComfyUI` directory
115+
116+
2. Clone this repo
119117
```bash
120-
pip install -r requirements.txt
118+
git clone https://github.com/pydn/ComfyUI-to-Python-Extension.git
121119
```
122120

123-
3. **Copy files into ComfyUI**: Copy [`ComfyUI-to-Python-Extension/`](https://github.com/pydn/ComfyUI-to-Python-Extension/tree/main/ComfyUI-to-Python-Extension) into the parent folder of your cloned version of ComfyUI.
124-
125-
After copying `ComfyUI-to-Python-Extension/` your local `ComfyUI` directory should look like this:
121+
After cloning the repo, your `ComfyUI` directory should look like this:
126122
```
127123
/comfy
128124
/comfy_extras
@@ -148,10 +144,26 @@ if __name__ == "__main__":
148144
server.py
149145
```
150146

151-
4. **Navigate to the `ComfyUI-to-Python-Extension` folder in your local `ComfyUI` directory.**
147+
3. Navigate to the `ComfyUI-to-Python-Extension` folder and install requirements
148+
```bash
149+
pip install -r requirements.txt
150+
```
151+
152+
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!**
153+
154+
![Enable Dev Mode Options](images/dev_mode_options.jpg)
152155

153-
5. **Run the Script**: Use the following command to run the script with a specific JSON file:
156+
5. Load up your favorite workflows, then click the newly enabled `Save (API Format)` button under Queue Prompt
154157

158+
6. Move the downloaded .json workflow file to your `ComfyUI/ComfyUI-to-Python-Extension` folder
159+
160+
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.
161+
162+
8. Run the script:
155163
```bash
156-
python generate_python_code.py
157-
```
164+
python comfyui_to_python.py
165+
```
166+
167+
9. After truning the `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`.
168+
169+
10. Now you can execute the newly created .py file to generate images without launching a server.

images/dev_mode_options.PNG

88.6 KB
Loading

images/dev_mode_options.jpg

51.5 KB
Loading

0 commit comments

Comments
 (0)