模型是必不可少的
模型是媒体生成工作流程的基本构建块。它们可以组合和混合以实现不同的创意效果。 模型 这个词有许多不同的含义。在这里,它指的是一个数据文件,携带节点图执行其工作所需的信息。具体来说,它是一个数据结构,模型 某种功能。作为动词,建模某物意味着表示它或提供一个示例。 在ComfyUI中,模型数据文件的主要示例是AI 扩散模型。这是一组大型数据,表示文本字符串和图像之间复杂的关系,使得将单词翻译成图片或反之成为可能。其他用于图像生成的常见模型示例包括语言模型,如CLIP,以及图像放大模型,如RealESRGAN。模型文件
模型文件对于生成媒体制作是绝对必要的。如果找不到模型文件,工作流程中将无法进行任何操作。模型不包含在ComfyUI安装中,但ComfyUI通常可以自动下载和安装缺失的模型文件。许多模型可以从ComfyUI管理器窗口下载和安装。模型也可以在以下网站找到:huggingface.co、civitai.green和github.com。在ComfyUI中使用模型
- 下载并将其放置在ComfyUI程序目录中
- 在models文件夹中,您会找到各种类型模型的子文件夹,例如checkpoints
- ComfyUI管理器帮助自动化搜索、下载和安装的过程
- 如果ComfyUI正在运行,请重启它
- 在您的工作流程中,创建适合模型类型的节点,例如Load Checkpoints、Load LoRA、Load VAE
- 在加载节点中,选择您希望使用的模型
- 将加载节点连接到工作流程中的其他节点
Adding External Model Paths
If you downloaded a model but ComfyUI cannot find it, you may need to add an additional model search path to the yaml file.Example scenario
You need to add a motion LoRA and your model is located inC:\Users\YourUsername\models\animatediff_motion_lora.
Solution
- Add the below configuration to the
extra_model_paths.yamlfile using the correct model type property name - Restart ComfyUI
loras- for LoRA modelscheckpoints- for checkpoint modelsvae- for VAE modelscontrolnet- for ControlNet modelsclip- for CLIP modelsupscale_models- for upscaling modelsembeddings- for textual inversion embeddingsconfigs- for configuration files
YAML config file location
For standard ComfyUI installations, create theextra_model_paths.yaml file directly in your ComfyUI folder (where main.py is located).
Desktop Application Instructions
If you’re using the ComfyUI Desktop application, the config file has a different name and location:- On Windows:
C:\Users\YourUsername\AppData\Roaming\ComfyUI\extra_models_config.yaml- You can quickly navigate to this by typing
%APPDATA%\ComfyUIin File Explorer address bar
- You can quickly navigate to this by typing
- On macOS:
~/Library/Application Support/ComfyUI/extra_models_config.yaml- Open Finder, press
Cmd+Shift+Gand enter~/Library/Application Support/ComfyUI
- Open Finder, press
- On Linux:
~/.config/ComfyUI/extra_models_config.yaml- Open your file manager and navigate to the hidden folder
~/.config/ComfyUI
- Open your file manager and navigate to the hidden folder