# HYPIR ComfyUI Plugin Dependencies # These are additional dependencies beyond what ComfyUI already provides # Core dependencies (should already be available in ComfyUI) torch>=2.0.0 torchvision>=0.15.0 numpy>=1.21.0 Pillow>=8.0.0 # HYPIR specific dependencies omegaconf>=2.3.0 accelerate>=0.20.0 transformers>=4.30.0 diffusers>=0.21.0 peft>=0.4.0 # Model downloader dependencies requests>=2.25.0 tqdm>=4.60.0 # Optional dependencies for advanced features polars>=0.19.0 # For data loading (if using training features)
原项目地址https://github.com/XPixelGroup/HYPIR?tab=readme-ov-file
This is a ComfyUI plugin for HYPIR (Harnessing Diffusion-Yielded Score Priors for Image Restoration), a state-of-the-art image restoration model based on Stable Diffusion 2.1.
这是一个用于 HYPIR(利用扩散得分先验进行图像修复) 的 ComfyUI 插件,HYPIR 是基于 Stable Diffusion 2.1 的先进图像修复模型。
Place this folder in your ComfyUI custom_nodes directory:
将本文件夹放入 ComfyUI 的 custom_nodes 目录下:
ComfyUI/custom_nodes/Comfyui-HYPIR/
Navigate to the HYPIR folder and install the required dependencies:
进入 HYPIR 文件夹并安装所需依赖:
cd ComfyUI/custom_nodes/Comfyui-HYPIR/HYPIR
pip install -r requirements.txt
The plugin will automatically download the required models on first use:
插件首次使用时会自动下载所需模型:
The HYPIR restoration model will be downloaded to:
HYPIR 修复模型将下载到:
ComfyUI/models/HYPIR/HYPIR_sd2.pth
The base Stable Diffusion 2.1 model will be automatically downloaded when needed to:
基础 Stable Diffusion 2.1 模型将在需要时自动下载到:
ComfyUI/models/HYPIR/stable-diffusion-2-1-base/
Manual Download (Optional):
手动下载(可选):
HYPIR Model:
HYPIR 模型:
If you prefer to download manually, you can get the HYPIR model from:
如果你希望手动下载,可以从以下地址获取 HYPIR 模型:
Place the HYPIR_sd2.pth file in:
请将 HYPIR_sd2.pth 文件放在以下任一位置:
ComfyUI/custom_nodes/Comfyui-HYPIR/ComfyUI/custom_nodes/Comfyui-HYPIR/ComfyUI/models/checkpoints/ComfyUI/models/checkpoints/ComfyUI/models/HYPIR/ComfyUI/models/HYPIR/Base Model:
基础模型:
The base Stable Diffusion 2.1 model can be downloaded manually from:
基础 Stable Diffusion 2.1 模型可从以下地址手动下载:
Place the base model in:
请将基础模型放在:
ComfyUI/models/HYPIR/stable-diffusion-2-1-base/
Note: The plugin will automatically check for the base model in the HYPIR directory first. If not found, it will automatically download it from HuggingFace.
注意: 插件会优先在 HYPIR 目录下查找基础模型,如未找到会自动从 HuggingFace 下载。
model_t: Model timestep (default: 200)model_t:模型步数(默认200)coeff_t: Coefficient timestep (default: 200)coeff_t:系数步数(默认200)lora_rank: LoRA rank (default: 256)lora_rank:LoRA 阶数(默认256)patch_size: Processing patch size (default: 512)patch_size:处理块大小(默认512)You can modify the default settings in hypir_config.py:
你可以在 hypir_config.py 中修改默认设置:
HYPIR_CONFIG = {
"default_weight_path": "HYPIR_sd2.pth",
"default_base_model_path": "stable-diffusion-2-1-base",
"available_base_models": ["stable-diffusion-2-1-base"],
"model_t": 200,
"coeff_t": 200,
"lora_rank": 256,
# ... more settings
}
The plugin includes intelligent model path management:
插件包含智能模型路径管理:
ComfyUI/models/HYPIR/HYPIR_sd2.pthComfyUI/models/HYPIR/HYPIR_sd2.pthComfyUI/models/HYPIR/stable-diffusion-2-1-base/ when neededComfyUI/models/HYPIR/stable-diffusion-2-1-base/model_t values (200-500) for stronger restorationmodel_t 越高(200-500)修复越强coeff_t values (200-500) for more aggressive enhancementcoeff_t 越高(200-500)增强越明显lora_rank (256-512) for better quality (uses more memory)lora_rank 越高(256-512)质量越好(占用更多内存)patch_size (256-512) if you encounter memory issuespatch_size(256-512)“`bash
cd HYPIR
pip install -r requirements.txt
“`
HYPIR_sd2.pth in plugin directory or ComfyUI models directoryHYPIR_sd2.pth 放在插件目录或 ComfyUI 模型目录stable-diffusion-2-1-base folder in ComfyUI/models/HYPIR/stable-diffusion-2-1-base 文件夹放在 ComfyUI/models/HYPIR/patch_size to 256patch_size 降至 256This plugin is provided under the same license as the original HYPIR project. Please refer to the HYPIR repository for license details.
本插件遵循原 HYPIR 项目的相同许可证。详情请参见 HYPIR 仓库。
For issues related to this ComfyUI plugin, please check:
如遇本插件相关问题,请参考: