Skip to content

Commit 9860039

Browse files
update the style of readme
1 parent b151f24 commit 9860039

1 file changed

Lines changed: 160 additions & 125 deletions

File tree

README.md

Lines changed: 160 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -1,169 +1,204 @@
1-
# 🔥OpenVINO Node for ComfyUI🔥
1+
<div align="center">
22

3-
This node is designed for optimizing the performance of model inference in ComfyUI by leveraging [Intel OpenVINO toolkits](https://github.com/openvinotoolkit/openvino).
3+
# 🔥 OpenVINO Node for ComfyUI 🔥
4+
5+
**Optimize model inference in ComfyUI with [Intel OpenVINO toolkits](https://github.com/openvinotoolkit/openvino)**
46

57
![comfyui](https://github.com/user-attachments/assets/875384d2-f737-40ae-86ac-8d75ba1ae224)
68

9+
---
710

8-
---
11+
[Supported Hardware](#-supported-hardware) &bull; [Install](#-install) &bull; [Instruction](#-instruction) &bull; [Q&A](#-qa)
912

10-
- [OpenVINO Node for ComfyUI](#openvino-node-for-comfyui)
11-
- [Supported Hardware](#supported-hardware)
12-
- [Install](#install)
13-
- [Comfy Registry](#comfy-registry)
14-
- [ComfyUI-Manager](#comfyui-manager)
15-
- [Manual](#manual)
16-
- [Instruction](#instruction)
17-
- [Q&A](#qa)
13+
</div>
1814

19-
## 💻Supported Hardware
15+
<br/>
2016

21-
This node can support running model on Intel CPU, GPU and NPU device.You can find more detailed informantion in [OpenVINO System Requirements](https://docs.openvino.ai/2025/about-openvino/release-notes-openvino/system-requirements.html).
17+
## 💻 Supported Hardware
2218

19+
This node can support running model on Intel CPU, GPU and NPU device. You can find more detailed informantion in [OpenVINO System Requirements](https://docs.openvino.ai/2025/about-openvino/release-notes-openvino/system-requirements.html).
2320

24-
## 🚗Install
21+
<br/>
2522

26-
**Prererquisites**
23+
## 🚗 Install
2724

28-
- Install [comfy-cli](https://docs.comfy.org/comfy-cli/getting-started)
25+
> **Prererquisites** &mdash; Install [comfy-cli](https://docs.comfy.org/comfy-cli/getting-started)
2926
3027
The recommended installation method is to use the Comfy Registry.
3128

3229
### Comfy Registry
3330

3431
These nodes can be installed via the [Comfy Registry](https://registry.comfy.org/nodes/comfyui-openvino).
3532

36-
```
33+
```bash
3734
comfy node registry-install comfyui-openvino
3835
```
3936

4037
### ComfyUI-Manager
4138

4239
This node can be installed via ComfyUI-Manager in the UI or via the CLI:
4340

44-
```
41+
```bash
4542
comfy node install comfyui-openvino
4643
```
4744

4845
### Manual
4946

5047
This node can also be installed manually by copying them into your `custom_nodes` folder and then installing dependencies:
5148

52-
```
49+
```bash
5350
cd ComfyUI/custom_nodes
54-
git clone https://github.com/openvino-dev-samples/comfyui_openvino
51+
git clone https://github.com/openvino-dev-samples/comfyui_openvino
5552
cd comfyui_openvino
5653
pip install -r requirements.txt
5754
```
5855

59-
## 🚀Instruction
56+
<br/>
57+
58+
## 🚀 Instruction
59+
6060
To trigger OpenVINO Node for ComfyUI, you can follow the example as reference:
61-
1. Start a ComfyUI server.
61+
62+
**1. Start a ComfyUI server.**
6263

6364
- lanuch from source:
64-
```
65-
cd ComfyUI
66-
python3 main.py --cpu --use-pytorch-cross-attention
67-
```
65+
```bash
66+
cd ComfyUI
67+
python3 main.py --cpu --use-pytorch-cross-attention
68+
```
6869

6970
- lanuch from comfy-cli:
70-
```
71-
comfy launch -- --cpu --use-pytorch-cross-attention
72-
```
73-
74-
3. Prepare a standard workflow in ComfyUI.
75-
76-
![Step 1](https://github.com/user-attachments/assets/b2f7af47-08c3-4734-beca-ee4af596a6d1)
77-
78-
4. Add OpenVINO Node.
79-
80-
![Step 2](https://github.com/user-attachments/assets/6f485fcb-af62-4c3c-8486-88937eef218b)
81-
82-
5. Connect `TorchCompileDiffusionOpenVINO` with Diffusion model and `TorchCompileVAEOpenVINO` with VAE model
83-
84-
![Step 3](https://github.com/user-attachments/assets/3414811a-13c0-4643-805b-86e9694e09e6)
85-
86-
6. Run workflow. Please notice it may need an additional warm-up inference after switching new model.
87-
88-
![Step 3](https://github.com/user-attachments/assets/b8f40c64-47b4-48a8-9c8a-87ccba4650b6)
89-
90-
## 🤔Q&A
91-
92-
1. **Does it support LoRA loader ?**
93-
94-
Yes, and you can refer the following picture to add it into a workflow of OpenVINO node.
95-
96-
<img width="2000" height="805" alt="image" src="https://github.com/user-attachments/assets/ea1f7c6b-bbbc-4ee9-b5fd-62675d6aaa4e" />
97-
98-
2. **How to install ComfyUI-OpenVINO via ComfyUI-Manager in the Portable version of ComfyUI?**
99-
100-
ComfyUI-Manager is **not enabled by default** in the Portable version. Follow the [official guide](https://docs.comfy.org/manager/install#portable-users) to enable it first.
101-
102-
Portable ComfyUI builds may not include Git, which is required for ComfyUI-Manager to work. It is recommended to download [Portable Git](https://git-scm.com/downloads/win) and explicitly set its path in your `.bat` launcher before starting ComfyUI:
103-
```bat
104-
set GIT_PYTHON_GIT_EXECUTABLE=C:\path\to\portable-git\bin\git.exe
105-
```
106-
107-
After installing the extension via the Manager, make sure that the installed dependencies match the versions specified in:
108-
```
109-
ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-openvino\requirements.txt
110-
```
111-
If newer versions were installed automatically, downgrade them to match. Note that the extension currently requires **torch <=2.6.0 and torchaudio <=2.6.0** specifically; if newer versions are already installed, downgrade them.
112-
113-
3. **`RuntimeError: Compiler: 'cl' is not found` at higher resolutions — how to fix?**
114-
115-
At low resolutions (e.g. 512×512) the extension works fine. At higher resolutions, PyTorch's inductor triggers a JIT C++ compilation step that requires MSVC (`cl.exe`).
116-
117-
**Fix:** Install [Visual Studio](https://visualstudio.microsoft.com/) (Community edition is sufficient) or the standalone [MSVC Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/). During installation, make sure to select the **"Desktop development with C++"** workload — this is what actually installs `cl.exe` and the required C++ components.
118-
Then activate the MSVC environment in your `.bat` launcher **before** starting ComfyUI:
119-
```bat
120-
call "C:\Program Files\Microsoft Visual Studio\18\Community\VC\Auxiliary\Build\vcvars64.bat"
121-
```
122-
Adjust the path to match your Visual Studio version and edition.
123-
124-
5. **C++ compile error due to a space in the `torchinductor` cache folder name — how to fix?**
125-
126-
If your Windows display name (Full Name) contains a space (e.g. `John Doe`), PyTorch will create a temp folder like:
127-
```
128-
C:\Users\John\AppData\Local\Temp\torchinductor_John Doe
129-
```
130-
The space in the path breaks the MSVC compiler.
131-
132-
**Fix:** Override `USERNAME` in your `.bat` launcher before starting ComfyUI:
133-
```bat
134-
set USERNAME=User
135-
```
136-
This only affects the current session and does not change your Windows account. After this, PyTorch will create the temp folder as:
137-
```
138-
C:\Users\John\AppData\Local\Temp\torchinductor_User
139-
```
140-
141-
If your **Windows account folder name** (e.g. `C:\Users\John Doe\`) also contains a space, overriding `USERNAME` alone is not enough — the temp path will still be broken. In that case, redirect the temp directory to a path without spaces:
142-
```bat
143-
set TEMP=C:\tmp
144-
set TMP=C:\tmp
145-
```
146-
Make sure the folder `C:\tmp` exists before launching ComfyUI.
147-
148-
6. **`python_embeded` is missing Python headers/libraries for C++ compilation — how to fix?**
149-
150-
Portable ComfyUI uses a stripped-down embedded Python that is missing the `include` and `libs` directories required for C++ compilation.
151-
152-
**Fix:**
153-
1. Download the full Python installer for the **same version** as your `python_embeded`.
154-
2. Copy the `include` and `libs` folders from the full Python installation into your `ComfyUI_windows_portable\python_embeded\` directory.
155-
156-
After this, `cl.exe` will be able to compile successfully.
157-
158-
<details>
159-
<summary>📄 Example <code>run_cpu.bat</code> with all fixes applied</summary>
160-
161-
```bat
162-
call "C:\Program Files\Microsoft Visual Studio\18\Community\VC\Auxiliary\Build\vcvars64.bat"
163-
set USERNAME=User
164-
set GIT_PYTHON_GIT_EXECUTABLE=C:\Users\John\ComfyUI_windows_portable\git\bin\git.exe
165-
.\python_embeded\python.exe -s ComfyUI\main.py --cpu --windows-standalone-build --enable-manager --use-pytorch-cross-attention
166-
pause
167-
```
168-
</details>
71+
```bash
72+
comfy launch -- --cpu --use-pytorch-cross-attention
73+
```
74+
75+
**2. Prepare a standard workflow in ComfyUI.**
76+
77+
![Step 1](https://github.com/user-attachments/assets/b2f7af47-08c3-4734-beca-ee4af596a6d1)
78+
79+
**3. Add OpenVINO Node.**
80+
81+
![Step 2](https://github.com/user-attachments/assets/6f485fcb-af62-4c3c-8486-88937eef218b)
82+
83+
**4. Connect `TorchCompileDiffusionOpenVINO` with Diffusion model and `TorchCompileVAEOpenVINO` with VAE model**
84+
85+
![Step 3](https://github.com/user-attachments/assets/3414811a-13c0-4643-805b-86e9694e09e6)
86+
87+
**5. Run workflow.** Please notice it may need an additional warm-up inference after switching new model.
88+
89+
![Step 4](https://github.com/user-attachments/assets/b8f40c64-47b4-48a8-9c8a-87ccba4650b6)
90+
91+
<br/>
92+
93+
## 🤔 Q&A
94+
95+
<details open>
96+
<summary><b>1. Does it support LoRA loader ?</b></summary>
97+
98+
<br/>
99+
100+
Yes, and you can refer the following picture to add it into a workflow of OpenVINO node.
101+
102+
<img width="2000" height="805" alt="image" src="https://github.com/user-attachments/assets/ea1f7c6b-bbbc-4ee9-b5fd-62675d6aaa4e" />
103+
104+
</details>
105+
106+
---
107+
108+
<details>
109+
<summary><b>2. How to install ComfyUI-OpenVINO via ComfyUI-Manager in the Portable version of ComfyUI?</b></summary>
110+
111+
<br/>
112+
113+
ComfyUI-Manager is **not enabled by default** in the Portable version. Follow the [official guide](https://docs.comfy.org/manager/install#portable-users) to enable it first.
114+
115+
Portable ComfyUI builds may not include Git, which is required for ComfyUI-Manager to work. It is recommended to download [Portable Git](https://git-scm.com/downloads/win) and explicitly set its path in your `.bat` launcher before starting ComfyUI:
116+
```bat
117+
set GIT_PYTHON_GIT_EXECUTABLE=C:\path\to\portable-git\bin\git.exe
118+
```
119+
120+
After installing the extension via the Manager, make sure that the installed dependencies match the versions specified in:
121+
```
122+
ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-openvino\requirements.txt
123+
```
124+
If newer versions were installed automatically, downgrade them to match. Note that the extension currently requires **torch <=2.6.0 and torchaudio <=2.6.0** specifically; if newer versions are already installed, downgrade them.
125+
126+
</details>
127+
128+
---
129+
130+
<details>
131+
<summary><b>3. <code>RuntimeError: Compiler: 'cl' is not found</code> at higher resolutions — how to fix?</b></summary>
132+
133+
<br/>
134+
135+
At low resolutions (e.g. 512x512) the extension works fine. At higher resolutions, PyTorch's inductor triggers a JIT C++ compilation step that requires MSVC (`cl.exe`).
136+
137+
**Fix:** Install [Visual Studio](https://visualstudio.microsoft.com/) (Community edition is sufficient) or the standalone [MSVC Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/). During installation, make sure to select the **"Desktop development with C++"** workload — this is what actually installs `cl.exe` and the required C++ components.
138+
Then activate the MSVC environment in your `.bat` launcher **before** starting ComfyUI:
139+
```bat
140+
call "C:\Program Files\Microsoft Visual Studio\18\Community\VC\Auxiliary\Build\vcvars64.bat"
141+
```
142+
Adjust the path to match your Visual Studio version and edition.
143+
144+
</details>
145+
146+
---
147+
148+
<details>
149+
<summary><b>4. C++ compile error due to a space in the <code>torchinductor</code> cache folder name — how to fix?</b></summary>
150+
151+
<br/>
152+
153+
If your Windows display name (Full Name) contains a space (e.g. `John Doe`), PyTorch will create a temp folder like:
154+
```
155+
C:\Users\John\AppData\Local\Temp\torchinductor_John Doe
156+
```
157+
The space in the path breaks the MSVC compiler.
158+
159+
**Fix:** Override `USERNAME` in your `.bat` launcher before starting ComfyUI:
160+
```bat
161+
set USERNAME=User
162+
```
163+
This only affects the current session and does not change your Windows account. After this, PyTorch will create the temp folder as:
164+
```
165+
C:\Users\John\AppData\Local\Temp\torchinductor_User
166+
```
167+
168+
If your **Windows account folder name** (e.g. `C:\Users\John Doe\`) also contains a space, overriding `USERNAME` alone is not enough — the temp path will still be broken. In that case, redirect the temp directory to a path without spaces:
169+
```bat
170+
set TEMP=C:\tmp
171+
set TMP=C:\tmp
172+
```
173+
Make sure the folder `C:\tmp` exists before launching ComfyUI.
174+
175+
</details>
176+
177+
---
178+
179+
<details>
180+
<summary><b>5. <code>python_embeded</code> is missing Python headers/libraries for C++ compilation — how to fix?</b></summary>
181+
182+
<br/>
183+
184+
Portable ComfyUI uses a stripped-down embedded Python that is missing the `include` and `libs` directories required for C++ compilation.
185+
186+
**Fix:**
187+
1. Download the full Python installer for the **same version** as your `python_embeded`.
188+
2. Copy the `include` and `libs` folders from the full Python installation into your `ComfyUI_windows_portable\python_embeded\` directory.
189+
190+
After this, `cl.exe` will be able to compile successfully.
191+
192+
<details>
193+
<summary>📄 Example <code>run_cpu.bat</code> with all fixes applied</summary>
194+
195+
```bat
196+
call "C:\Program Files\Microsoft Visual Studio\18\Community\VC\Auxiliary\Build\vcvars64.bat"
197+
set USERNAME=User
198+
set GIT_PYTHON_GIT_EXECUTABLE=C:\Users\John\ComfyUI_windows_portable\git\bin\git.exe
199+
.\python_embeded\python.exe -s ComfyUI\main.py --cpu --windows-standalone-build --enable-manager --use-pytorch-cross-attention
200+
pause
201+
```
202+
</details>
169203
204+
</details>

0 commit comments

Comments
 (0)