ComfyUI Node

HYPIR Image Restore

A ComfyUI node in Hyper Image Restoration/HYPIR with 19 inputs and 3 outputs.

By EricRollei·Created 10 months ago·Updated 9 months ago· 14
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)

NameTypeDefaultDescription
imageIMAGE
promptSTRING
base_model_pathSTRINGstabilityai/stable-diffusion-2-1-baseDiffusers-format directory or Hugging Face repo id (e.g. stabilityai/stable-diffusion-2-1-base).
weight_nameSTRINGHYPIR_sd2.pthName of the HYPIR LoRA weight file placed in the node's models folder.
upscaleFLOAT4.01–8Upscale factor applied before restoration (matches HYPIR defaults).
patch_sizeINT512256–1024Tile size used for latent processing and VAE tiling.
strideINT256128–1024Stride between tiles. Lower values improve seam quality at the cost of time.
scale_bySTRINGfactorChoose between fixed upscale factor or fitting to a target longest side.
target_longest_sideoptINT2048256–8192Used when scale_by=longest_side. Final longest edge after upscaling.
seedoptINT-1Random seed for deterministic noise sampling. Use -1 for random seed each run.
enhance_promptoptBOOLEANfalseToggle to rewrite the prompt using an LM Studio chat completion before restoration.
lm_endpointoptSTRINGhttp://127.0.0.1:1234LM Studio base URL (without /v1/chat/completions).
lm_modeloptSTRINGlmstudioModel identifier exposed by LM Studio (see the UI > Provider > Model).
lm_system_promptoptSTRINGYou 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_temperatureoptFLOAT0.600–2Sampling temperature passed to LM Studio.
lm_max_tokensoptINT12016–512Maximum number of tokens generated by LM Studio for the enhanced prompt.
enhancement_strengthoptFLOAT1.000–1Blend between the original image (0) and the full HYPIR result (1).
detail_boostoptFLOAT0.000–1Add extra high-frequency detail on top of the restored image.
detail_sigmaoptFLOAT1.00.1–5Controls the radius of the detail boost blur (higher = broader).

Outputs (3)

NameTypeDescription
imageIMAGE
seedINT
promptSTRING