HYPIR-ComfyUI
Comfyui node for using the HYPIR image restoration and upscaling tool
Paketprofil
- Status
- Überprüft
- Verleger
- @EricRollei
- Quelle
- GitHub
- Sterne
- 16
README
Hyper-ComfyUI: HYPIR Image Restoration Node
Custom ComfyUI nodes that embed the HYPIR image restoration method for Stable Diffusion 2.1. The upstream research was created by Xinqi Lin, Fanghua Yu, Jinfan Hu, Zhiyuan You, Wu Shi, Jimmy S. Ren, Jinjin Gu, and collaborators. Source: https://github.com/XPixelGroup/HYPIR.
License notice The HYPIR project is released for non-commercial use only. This repository adopts Eric Hiss's dual-license model (see
LICENSE.md) and redistributes upstream assets under their respective terms. Review all license files before using the node in production.
Installation
Method 1: Via ComfyUI Manager (Recommended)
- Install ComfyUI Manager if you haven't already
- Open ComfyUI Manager in ComfyUI
- Search for "HYPIR" in the Custom Nodes section
- Click Install
- Restart ComfyUI
Method 2: Manual Installation
- Clone this repository into
ComfyUI/custom_nodes/:cd ComfyUI/custom_nodes git clone https://github.com/EricRollei/HYPIR-ComfyUI.git - Restart ComfyUI
Quick Start
- After installation, the node will appear in ComfyUI under
Hyper Image Restoration/HYPIR. - Download HYPIR weights
- Grab
HYPIR_sd2.pthfrom https://huggingface.co/lxq007/HYPIR/tree/main. - Place it (and any other LoRA variants) in
HYPIR-ComfyUI/models/.
- Grab
- Provide Stable Diffusion 2.1 diffusers weights
- The node defaults to
stabilityai/stable-diffusion-2-1-base(512px). - For sharper results you can use the 768px repo
stabilityai/stable-diffusion-2-1. - Example offline download:
huggingface-cli download stabilityai/stable-diffusion-2-1 --local-dir "<your path>" --local-dir-use-symlinks False - Point the base_model_path input at the chosen folder or keep the repo id to download on demand.
- The node defaults to
- Ensure the following Python packages are available (present in recent
ComfyUI builds):
torch,diffusers,transformers,peft,accelerate,numpy,Pillow,tqdm,requests(requests is only required if you enable LM Studio integration). - Restart ComfyUI so the node is discovered.
Node Overview
| Node | Category | Description |
|---|---|---|
HYPIR Image Restore | Hyper Image Restoration/HYPIR | Restores an input image using the HYPIR LoRA on SD2.1. |
Core Inputs
- image – Tensor from any upstream ComfyUI image node.
- prompt – Optional guidance text. Leave empty for prompt-free restoration.
- base_model_path – Diffusers-format path or repo id.
- weight_name – LoRA filename located in
models/(dropdown). - upscale – Integer factor applied before restoration (1–8).
- patch_size / stride – Tile size and overlap for latent processing.
- scale_by – Dropdown with
factor(default) orlongest_side. When usinglongest_side, set target_longest_side. - seed – Use
-1for random each run.
Prompt Enhancement (LM Studio)
- enhance_prompt – Toggle to pass the prompt through an OpenAI-compatible LM Studio instance.
- lm_endpoint – Base URL of LM Studio (e.g.
http://127.0.0.1:1234). - lm_model – Model identifier shown in LM Studio.
- lm_system_prompt – Defaulted to a conservator-focused template tuned for HYPIR; editable.
- lm_temperature / lm_max_tokens – Standard OpenAI parameters for response creativity and length.
When the toggle is on, the node sends your prompt to /v1/chat/completions. The LLM is instructed to preserve every subject and cue you provide and only refine wording. The enhanced prompt is returned as a third output and echoed in the console. If the prompt is empty, a short general restoration prompt is generated instead.
Restoration Controls
- enhancement_strength – Blends the HYPIR output with the original image (1 = full restoration, 0.5 = 50/50 mix).
- detail_boost – Adds an optional unsharp-mask style detail layer (0–1
Knoten in diesem Paket
1 Knoten
Knoten in diesem Paket
1 Knoten- HyperComfyUIHYPIRRestore
Quellen
3 Quellen
Quellen
3 QuellenVerifiziert 14. Okt.
Verifiziert 14. Okt.
Quellenauszüge
1 Auszug
Quellenauszüge
1 AuszugSource context: Repo EricRollei/HYPIR-ComfyUI
