Skip to content

Commit a6102a7

Browse files
committed
Update the extra_model_path config docs
1 parent 313fe6e commit a6102a7

File tree

12 files changed

+151
-165
lines changed

12 files changed

+151
-165
lines changed
124 KB
Loading
128 KB
Loading

installation/comfyui_portable_windows.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ sidebarTitle: "Portable(Windows)"
66
---
77

88
import FirstGeneration from "/snippets/install/first-generation.mdx"
9+
import AddExternalModels from "/snippets/install/add-external-models.mdx"
910

1011
**ComfyUI Portable** is a standalone packaged complete ComfyUI Windows version that has integrated an independent **Python (python_embeded)** required for ComfyUI to run. You only need to extract it to use it. Currently, the portable version supports running through **Nvidia GPU** or **CPU**.
1112

@@ -168,3 +169,4 @@ To see the GUI go to: http://[::]:8188
168169
169170
You can press `WIN + R` and type `cmd` to open the command prompt, then enter `ipconfig` to view your local IP address. Other devices can then access ComfyUI by entering `http://your-local-IP:8188` in their browser.
170171
172+
<AddExternalModels/>

installation/desktop/macos.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import TroubleshootingGpt from "/snippets/install/troubleshooting-gpt.mdx"
1313
import TroubleshootingFeedback from "/snippets/install/troubleshooting-feedback.mdx"
1414
import ExternalModelsDesktop from "/snippets/install/external-models-desktop.mdx"
1515
import DesktopVenv from "/snippets/install/desktop-venv.mdx"
16+
import AddExternalModels from "/snippets/install/add-external-models.mdx"
1617

1718
**ComfyUI Desktop** is a standalone installation version that can be installed like regular software.
1819
It supports quick installation and automatic configuration of the **Python environment and dependencies**, and supports one-click import of existing ComfyUI settings, models, workflows, and files.
@@ -127,7 +128,7 @@ Then find the **ComfyUI icon** in **Launchpad** and click it to enter ComfyUI in
127128

128129
<FirstGeneration/>
129130
<UpdateComfyui/>
130-
<ExternalModelsDesktop/>
131+
<AddExternalModels/>
131132
<DesktopVenv/>
132133

133134
## How to Uninstall ComfyUI Desktop

installation/desktop/windows.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import TroubleshootingGpt from "/snippets/install/troubleshooting-gpt.mdx"
1313
import TroubleshootingFeedback from "/snippets/install/troubleshooting-feedback.mdx"
1414
import ExternalModelsDesktop from "/snippets/install/external-models-desktop.mdx"
1515
import DesktopVenv from "/snippets/install/desktop-venv.mdx"
16+
import AddExternalModels from "/snippets/install/add-external-models.mdx"
1617

1718
**ComfyUI Desktop** is a standalone installation version that can be installed like regular software. It supports quick installation and automatic configuration of the **Python environment and dependencies**, and supports one-click import of existing ComfyUI settings, models, workflows, and files. You can quickly migrate from an existing [ComfyUI Portable version](/installation/comfyui_portable_windows) to the Desktop version.
1819

@@ -118,7 +119,7 @@ Double-click the corresponding shortcut to enter ComfyUI initialization settings
118119

119120
<FirstGeneration/>
120121
<UpdateComfyui/>
121-
<ExternalModelsDesktop/>
122+
<AddExternalModels/>
122123
<DesktopVenv/>
123124

124125
## How to Uninstall ComfyUI Desktop

installation/manual_install.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import Conda from "/snippets/conda.mdx";
1010
import PipInstall from "/snippets/pip-install.mdx";
1111
import InstallGpuDependencies from "/snippets/install-gpu-dependencies.mdx";
1212
import RunComfy from "/snippets/run-comfy.mdx";
13+
import AddExternalModels from "/snippets/install/add-external-models.mdx"
1314

1415
For the installation of ComfyUI, it is mainly divided into several steps:
1516
1. Create a virtual environment(avoid polluting the system-level Python environment)
@@ -80,3 +81,5 @@ git clone git@github.com:comfyanonymous/ComfyUI.git
8081
```
8182
</Step>
8283
</Steps>
84+
85+
<AddExternalModels/>
Lines changed: 67 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,76 @@
1-
### Adding External Model Paths
1+
## Adding External Model Paths
22

3-
If you downloaded a model but ComfyUI cannot find it, you may need to add an additional model search path to the yaml file.
3+
If you want to manage your model files outside of `ComfyUI/models`, you may have the following reasons:
44

5-
#### Example scenario
6-
You need to add a motion LoRA and your model is located in `C:\Users\YourUsername\models\animatediff_motion_lora`.
5+
- You have multiple ComfyUI instances and want them to share model files to save disk space
6+
- You have different types of GUI programs (such as WebUI) and want them to use the same model files
7+
- Model files cannot be recognized or found
78

8-
#### Solution
9-
1. Add the below configuration to the `extra_model_paths.yaml` file using the correct model type property name
10-
2. Restart ComfyUI
9+
We provide a way to add extra model search paths via the `extra_model_paths.yaml` configuration file.
1110

12-
```yaml
13-
my_custom_config:
14-
loras: C:\Users\YourUsername\models\animatediff_motion_lora/
15-
```
11+
### Open Config File
1612

17-
**Important:** Use the correct property names for different model types:
18-
- `loras` - for LoRA models
19-
- `checkpoints` - for checkpoint models
20-
- `vae` - for VAE models
21-
- `controlnet` - for ControlNet models
22-
- `clip` - for CLIP models
23-
- `upscale_models` - for upscaling models
24-
- `embeddings` - for textual inversion embeddings
25-
- `configs` - for configuration files
26-
27-
For example, to add checkpoint models:
28-
```yaml
29-
my_custom_config:
30-
checkpoints: C:\Users\YourUsername\models\checkpoints/
31-
```
13+
<Tabs>
14+
<Tab title="Portable/Manual Install">
15+
For portable and manual installations, you can find an example file named `extra_model_paths.yaml.example` in the root directory of ComfyUI:
16+
``
17+
ComfyUI/extra_model_paths.yaml.example
18+
``
19+
Please copy and rename it to `extra_model_paths.yaml` to use it.
20+
21+
You can also find the config example file [here](https://github.com/comfyanonymous/ComfyUI/blob/master/extra_model_paths.yaml.example)
22+
23+
</Tab>
24+
<Tab title="Desktop Application">
25+
If you are using the ComfyUI Desktop application, you can follow the image below to open the extra model config file:
26+
27+
![Open Config File](/images/desktop/extra_model_paths.jpg)
28+
29+
Or open it directly at:
30+
31+
<Tabs>
32+
<Tab title="Windows">
33+
```
34+
C:\Users\YourUsername\AppData\Roaming\ComfyUI\extra_models_config.yaml
35+
```
36+
</Tab>
37+
<Tab title="macOS">
38+
```
39+
~/Library/Application Support/ComfyUI/extra_models_config.yaml
40+
```
41+
</Tab>
42+
</Tabs>
43+
</Tab>
44+
</Tabs>
3245

33-
#### YAML config file location
34-
For standard ComfyUI installations, create the `extra_model_paths.yaml` file directly in your ComfyUI folder (where `main.py` is located).
46+
If the file does not exist, you can create it yourself with any text editor.
3547

36-
#### Desktop Application Instructions
37-
If you're using the ComfyUI Desktop application, the config file has a different name and location:
48+
### Example Structure
3849

39-
- On Windows: `C:\Users\YourUsername\AppData\Roaming\ComfyUI\extra_models_config.yaml`
40-
- You can quickly navigate to this by typing `%APPDATA%\ComfyUI` in File Explorer address bar
41-
- On macOS: `~/Library/Application Support/ComfyUI/extra_models_config.yaml`
42-
- Open Finder, press `Cmd+Shift+G` and enter `~/Library/Application Support/ComfyUI`
43-
- On Linux: `~/.config/ComfyUI/extra_models_config.yaml`
44-
- Open your file manager and navigate to the hidden folder `~/.config/ComfyUI`
50+
Suppose your model file structure is as follows:
51+
52+
```
53+
📁 your_path/
54+
├── 📁models/
55+
| ├── 📁 lora/
56+
| │ └── xxxxx.safetensors
57+
| ├── 📁 checkpoints/
58+
| │ └── xxxxx.safetensors
59+
| ├── 📁 vae/
60+
| │ └── xxxxx.safetensors
61+
| └── 📁 controlnet/
62+
| └── xxxxx.safetensors
63+
```
64+
65+
### YAML Configuration Example
66+
67+
```
68+
my_custom_config:
69+
base_path: your_path
70+
loras: models/lora/
71+
checkpoints: models/checkpoints/
72+
vae: models/vae/
73+
controlnet: models/controlnet/
74+
```
4575

46-
If the file doesn't exist yet, you can create it yourself with any text editor.
76+
Or you can refer to the default [extra_model_paths.yaml.example](https://github.com/comfyanonymous/ComfyUI/blob/master/extra_model_paths.yaml.example) for more configuration options. After saving, you need to **restart ComfyUI** for the changes to take effect.
Lines changed: 63 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,72 @@
1-
### 添加外部模型路径
1+
## 添加外部模型路径
22

3-
如果你下载了模型但 ComfyUI 无法找到它,你可能需要在 yaml 文件中添加额外的模型搜索路径。
3+
如果你想要在 `ComfyUI/models` 之外管理你的模型文件,可能出于以下原因:
44

5-
#### 示例场景
6-
你需要添加一个动态 LoRA,你的模型位于 `C:\Users\YourUsername\models\animatediff_motion_lora`
5+
- 你有多个 ComfyUI 实例,你想要让这些实例共享模型文件,从而减少磁盘占用
6+
- 你有多个不同的类型的 GUI 程序,如:WebUI, 你想要他们共用模型文件
7+
- 模型文件无法被识别或读取到
78

8-
#### 解决方案
9-
1. 使用正确的模型类型属性名称在 `extra_model_paths.yaml` 文件中添加以下配置
10-
2. 重启 ComfyUI
9+
我们提供了通过 `extra_model_paths.yaml` 配置文件来添加额外模型搜索路径的方法。
1110

12-
```yaml
13-
my_custom_config:
14-
loras: C:\Users\YourUsername\models\animatediff_motion_lora/
15-
```
11+
### 不同 ComfyUI 版本配置文件位置
1612

17-
**重要提示:** 针对不同模型类型使用正确的属性名称:
18-
- `loras` - 用于 LoRA 模型
19-
- `checkpoints` - 用于 Checkpoints 模型
20-
- `vae` - 用于 VAE 模型
21-
- `controlnet` - 用于 ControlNet 模型
22-
- `clip` - 用于 CLIP 模型
23-
- `upscale_models` - 用于放大模型
24-
- `embeddings` - 用于文本反转嵌入
25-
- `configs` - 用于配置文件
26-
27-
例如,添加检查点模型:
28-
```yaml
29-
my_custom_config:
30-
checkpoints: C:\Users\YourUsername\models\checkpoints/
31-
```
13+
<Tabs>
14+
<Tab title="Portable便携版">
15+
对于便携版和手动安装,你可以在 ComfyUI 的根目录下找到 `extra_model_paths.yaml.example` 的示例文件
16+
``
17+
ComfyUI/extra_model_paths.yaml.example
18+
``
19+
请把它复制一份并重命名为 `extra_model_paths.yaml` 来使用
20+
21+
你也可以在 [这里](https://github.com/comfyanonymous/ComfyUI/blob/master/extra_model_paths.yaml.example) 找到配置示例文件
22+
23+
</Tab>
24+
<Tab title="Desktop桌面版">
25+
如果你使用的是 ComfyUI 桌面应用程序,你可以参考下图打开额外模型的配置文件:
26+
27+
![Open Config File](/images/zh/desktop/extra_model_paths.jpg)
28+
29+
或者通过下面的位置打开:
3230

33-
#### YAML 配置文件位置
34-
对于标准 ComfyUI 安装,请直接在 ComfyUI 文件夹(`main.py` 所在的位置)中创建 `extra_model_paths.yaml` 文件。
31+
<Tabs>
32+
<Tab title="Windows">
33+
```
34+
C:\Users\YourUsername\AppData\Roaming\ComfyUI\extra_models_config.yaml
35+
```
36+
</Tab>
37+
<Tab title="macOS">
38+
```
39+
~/Library/Application Support/ComfyUI/extra_models_config.yaml
40+
```
41+
</Tab>
42+
</Tabs>
43+
</Tab>
44+
</Tabs>
3545

36-
#### 桌面应用程序说明
37-
如果你使用的是 ComfyUI 桌面应用程序,配置文件的名称和位置都不同:
46+
### 配置示例
3847

39-
- Windows:`C:\Users\YourUsername\AppData\Roaming\ComfyUI\extra_models_config.yaml`
40-
- 你可以在文件资源管理器地址栏中输入 `%APPDATA%\ComfyUI` 快速导航到此位置
41-
- macOS:`~/Library/Application Support/ComfyUI/extra_models_config.yaml`
42-
- 打开 Finder,按 `Cmd+Shift+G` 并输入 `~/Library/Application Support/ComfyUI`
43-
- Linux:`~/.config/ComfyUI/extra_models_config.yaml`
44-
- 打开文件管理器并导航到隐藏文件夹 `~/.config/ComfyUI`
48+
比如,你现在的模型文件结构如下
49+
50+
```
51+
📁 your_path/
52+
├── 📁models/
53+
| ├── 📁 lora/
54+
| │ └── xxxxx.safetensors
55+
| ├── 📁 checkpoints/
56+
| │ └── xxxxx.safetensors
57+
| ├── 📁 vae/
58+
| │ └── xxxxx.safetensors
59+
| └── 📁 controlnet/
60+
| └── xxxxx.safetensors
61+
```
62+
63+
```
64+
a111:
65+
base_path: your_path
66+
embeddings: models/lora/
67+
loras: models/checkpoints/
68+
loras: models/vae/
69+
loras: models/controlnet/
70+
```
4571

46-
如果该文件尚不存在,你可以使用任何文本编辑器自己创建它
72+
或者你也可以参考默认的 `extra_model_paths.yaml.example` 来配置,保存之后, 需要 **重启 ComfyUI** 才能生效

0 commit comments

Comments
 (0)