Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-PhotoDeblur > HI-Diff Model Loader · Photo Deblur

ComfyUI Node: HI-Diff Model Loader · Photo Deblur

Class Name

PhotoDeblurHILoader

Category
Photo Deblur/loaders
Author
porfeng (Account age: 756days)
Extension
ComfyUI-PhotoDeblur
Latest Updated
2026-11-11
Github Stars
0.09K

How to Install ComfyUI-PhotoDeblur

Install this extension via the ComfyUI Manager by searching for ComfyUI-PhotoDeblur
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-PhotoDeblur in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

HI-Diff Model Loader · Photo Deblur Description

Loads HI-Diff deblurring checkpoints and prepares the model for compatible restoration nodes.

HI-Diff Model Loader · Photo Deblur:

PhotoDeblurHILoader prepares the HI-Diff image-deblurring model for use in a Photo Deblur workflow. Rather than sharpening edges with a conventional filter, it loads a trained restoration system that can be used to reduce photographic blur. The supplied architecture combines image features at multiple scales with learned guidance to support restoration of both broader structures and finer details. This node handles model preparation only; it does not process an image or produce a restored photograph by itself. It loads the required checkpoint files and packages the model for a compatible restoration node. HI-Diff also supports CPU execution, making it an option when an NVIDIA CUDA GPU is unavailable, although processing speed depends on your hardware.

HI-Diff Model Loader · Photo Deblur Input Parameters:

variant

This required dropdown selects the HI-Diff model variant to load, determining which trained checkpoint files the node uses. Its default is RealBlur_J. The choices are supplied by the shared VARIANTS definition, whose complete contents are not included in the provided source; the accompanying tooltip references RealBlur-J, RealBlur-R, and GoPro model families. Use the exact choices available in your installed dropdown rather than typing a dataset name manually. This setting also identifies which model files must be available locally or through the optional download connection. Selecting a different variant loads a different trained model, so it can affect restoration results; however, the supplied code does not establish which variant will work best for a particular photograph. Minimum and maximum values do not apply to this dropdown.

steps

This required integer controls the step setting passed to the HI-Diff model when it is constructed. The minimum is 0, the maximum is 64, and the default is 0. Zero is a special automatic setting, not a request to skip restoration: according to the node tooltip, it selects the official default of 16 steps for RealBlur-J and RealBlur-R, or 8 steps for GoPro. A nonzero value supplies an explicit step count instead. This setting affects the model’s restoration process and can change both processing time and image results; more steps are not necessarily better, as the tooltip explicitly warns. Start with 0 and compare a few controlled alternatives only if you need to tune the result.

download_ready

This optional connection accepts a PHOTO_DEBLUR_READY value that provides access to prepared model files. When connected, the loader looks up files for the HI-Diff family and the selected variant, specifically net_g.pth, net_le_dm.pth, and net_d.pth. This is useful for linking model preparation through the companion downloader into your workflow. When left unconnected, the loader instead resolves the selected variant’s files from its normal local model locations. It does not accept an image, a model filename entered as text, or an already loaded deblurring model. No numeric range or dropdown options apply, and its default is unconnected, represented internally as None.

HI-Diff Model Loader · Photo Deblur Output Parameters:

deblur_model

This output has the type PHOTO_DEBLUR_MODEL and contains the prepared HI-Diff model, wrapped with its model-family and variant information for use by compatible Photo Deblur processing nodes. It represents the loaded restoration capability, not a restored image, image preview, or checkpoint file path. Connect it to the deblur_model input of the Deblur Image (Tiled) · Photo Deblur node to apply restoration to your photographs. Successful output means the required checkpoint files were loaded and the model was constructed; the actual image restoration and its associated processing requirements occur downstream.

HI-Diff Model Loader · Photo Deblur Usage Tips:

  • Start with variant = RealBlur_J and steps = 0 for a baseline using the loader’s defaults. Keep the same photograph and downstream settings when comparing changes so you can judge their effect clearly.
  • Use steps = 0 when you want the official step count for the selected variant. You do not need to enter 16 manually for RealBlur-J/R or 8 for GoPro.
  • Avoid treating steps as a quality slider. Higher values can increase processing time without improving the result; compare the restored image at full size before keeping a change.
  • Connect the companion downloader’s compatible readiness output to download_ready when you want the loader to use files prepared through that connection. Ensure the downloaded family is HI-Diff and the variant matches your selection.
  • If you leave download_ready unconnected, make sure all three HI-Diff checkpoint files for the chosen variant are installed where the extension expects them. A single checkpoint is not sufficient for this loader.
  • Connect deblur_model to Deblur Image (Tiled) · Photo Deblur to perform restoration. Image selection, tiling, overlap, and related processing settings belong to that downstream node, not this loader.
  • If restoration runs out of GPU memory downstream, reduce that node’s tile_size to 512, as recommended by the supplied processing code. Changing the loader’s step count is not the documented remedy for tile-related memory exhaustion.
  • If a restored image needs broad tone correction, consider the separate Match Input Tone (Optional) · Photo Deblur node. It requires matching original and restored image dimensions and an OpenCV installation.

HI-Diff Model Loader · Photo Deblur Common Errors and Solutions:

FileNotFoundError or a missing-checkpoint error

  • Explanation: The loader cannot find one or more files required for the selected HI-Diff variant. The exact error text depends on the file-resolution helper, which is not included in the supplied source. The internal change check can return missing, but that is a cache-status value rather than the complete loading error.
  • Solution: Prepare or download the selected variant’s complete HI-Diff checkpoint set. Confirm that net_g.pth, net_le_dm.pth, and net_d.pth are available through the extension’s expected local locations or a compatible download_ready connection.

Missing or incompatible download_ready data

  • Explanation: A connected readiness value must provide files for the HI-Diff family and the selected variant. Data for a different family or variant may fail validation or file lookup. The exact validation message is not shown in the supplied code.
  • Solution: Configure the downloader for HI-Diff and the same variant selected in this loader, then run the workflow again. Alternatively, disconnect download_ready if the correct files are already installed locally.

Checkpoint loading failure, such as EOFError or a file-reading RuntimeError

  • Explanation: The checkpoint reader may fail if a model file is incomplete, damaged, or not a valid supported checkpoint. These are possible underlying loading errors, not custom messages defined by this node.
  • Solution: Download the affected checkpoint again from the extension’s intended model source. Verify that the download completed and that you have actual model files rather than an HTML download page saved with a .pth extension.

Missing keys, unexpected keys, or size mismatch when constructing the model

  • Explanation: Such model-loading errors can indicate that the checkpoint contents do not match the expected HI-Diff architecture or selected variant. Exact wording depends on the model implementation, which is not included in full.
  • Solution: Replace mixed or manually substituted checkpoints with a matching HI-Diff checkpoint set for your selected variant. If the problem follows an extension update, check that your installed model files match that version’s requirements.

Invalid input type or incompatible connection

  • Explanation: The loader accepts PHOTO_DEBLUR_READY on download_ready and produces PHOTO_DEBLUR_MODEL on deblur_model. Connecting an image, filename, or unrelated model type can cause workflow validation to fail before loading begins.
  • Solution: Connect only a compatible downloader readiness output to download_ready, and route deblur_model to a compatible Photo Deblur processing input. Leave the optional readiness connection empty when using locally installed models.

PhotoDeblur ran out of GPU memory. Reduce tile_size to 512; the node keeps your chosen settings and does not silently shrink tiles.

  • Explanation: This exact message comes from the downstream tiled restoration node, not PhotoDeblurHILoader. It means image processing exceeded available GPU memory after model preparation.
  • Solution: Reduce tile_size to 512 in Deblur Image (Tiled) · Photo Deblur and try again. Free GPU memory used by other workloads if necessary; the processing node will not automatically reduce your chosen tile size.

HI-Diff Model Loader · Photo Deblur Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-PhotoDeblur
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

HI-Diff Model Loader · Photo Deblur