ComfyUI Node
HYPIR Image Restore
A ComfyUI node in Hyper Image Restoration/HYPIR with 19 inputs and 3 outputs.
HYPIR Image Restore
- image
- image
- seed
- prompt
◄prompt►
◄base_model_pathstabilityai/stable-diffusion-2-1-base►
◄weight_nameHYPIR_sd2.pth►
◄upscale4.0►
◄patch_size512►
◄stride256►
◄scale_byfactor►
◄target_longest_side2048►
◄seed-1►
◄enhance_promptfalse►
◄lm_endpointhttp://127.0.0.1:1234►
◄lm_modellmstudio►
◄lm_system_promptYou are an expert photographic conservator working with Stable Diffusion 2.1 and the HYPIR restoration LoRA. Rewrite the provided notes into a concise 1-2 sentence restoration prompt that keeps subjects, era, and mood intact. Emphasise realistic fine detail, natural lighting, gentle noise reduction, and faithful colour recovery. Do not invent new elements, props, or camera changes unless explicitly requested. Return only the final prompt text without quotes. If the user supplies no notes, respond with: 'Restored vintage photograph, faithful colours, natural film grain preserved, realistic detail and gentle contrast.'
Example: Restored 1950s family portrait, smiling couple on front porch, warm evening light, crisp yet natural detail, subtle grain preserved.►
◄lm_temperature0.60►
◄lm_max_tokens120►
◄enhancement_strength1.00►
◄detail_boost0.00►
◄detail_sigma1.0►
CategoryHyper Image Restoration/HYPIR
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| prompt | STRING | — | |
| base_model_path | STRING | stabilityai/stable-diffusion-2-1-base | Diffusers-format directory or Hugging Face repo id (e.g. stabilityai/stable-diffusion-2-1-base). |
| weight_name | STRING | HYPIR_sd2.pth | Name of the HYPIR LoRA weight file placed in the node's models folder. |
| upscale | FLOAT | 4.01–8 | Upscale factor applied before restoration (matches HYPIR defaults). |
| patch_size | INT | 512256–1024 | Tile size used for latent processing and VAE tiling. |
| stride | INT | 256128–1024 | Stride between tiles. Lower values improve seam quality at the cost of time. |
| scale_by | STRING | factor | Choose between fixed upscale factor or fitting to a target longest side. |
| target_longest_sideopt | INT | 2048256–8192 | Used when scale_by=longest_side. Final longest edge after upscaling. |
| seedopt | INT | -1 | Random seed for deterministic noise sampling. Use -1 for random seed each run. |
| enhance_promptopt | BOOLEAN | false | Toggle to rewrite the prompt using an LM Studio chat completion before restoration. |
| lm_endpointopt | STRING | http://127.0.0.1:1234 | LM Studio base URL (without /v1/chat/completions). |
| lm_modelopt | STRING | lmstudio | Model identifier exposed by LM Studio (see the UI > Provider > Model). |
| lm_system_promptopt | STRING | You are an expert photographic conservator working with Stable Diffusion 2.1 and the HYPIR restoration LoRA. Rewrite the provided notes into a concise 1-2 sentence restoration prompt that keeps subjects, era, and mood intact. Emphasise realistic fine detail, natural lighting, gentle noise reduction, and faithful colour recovery. Do not invent new elements, props, or camera changes unless explicitly requested. Return only the final prompt text without quotes. If the user supplies no notes, respond with: 'Restored vintage photograph, faithful colours, natural film grain preserved, realistic detail and gentle contrast.' Example: Restored 1950s family portrait, smiling couple on front porch, warm evening light, crisp yet natural detail, subtle grain preserved. | System prompt fed to LM Studio when enhancing text prompts. |
| lm_temperatureopt | FLOAT | 0.600–2 | Sampling temperature passed to LM Studio. |
| lm_max_tokensopt | INT | 12016–512 | Maximum number of tokens generated by LM Studio for the enhanced prompt. |
| enhancement_strengthopt | FLOAT | 1.000–1 | Blend between the original image (0) and the full HYPIR result (1). |
| detail_boostopt | FLOAT | 0.000–1 | Add extra high-frequency detail on top of the restored image. |
| detail_sigmaopt | FLOAT | 1.00.1–5 | Controls the radius of the detail boost blur (higher = broader). |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| seed | INT | — |
| prompt | STRING | — |