MISCFilter Model Loader · Photo Deblur:
PhotoDeblurMISCLoader prepares a pretrained MISCFilter image-deblurring model for use in a ComfyUI photo-restoration workflow. Its purpose is to make the trained restoration model available to compatible processing nodes, allowing you to build a workflow that reduces blur in photographs. This is a model-loading step rather than an image-editing operation: it prepares the restoration engine but does not itself sharpen or restore a photograph. The loader reads saved model weights and constructs the MISCFilter model using the extension’s adapter. This implementation requires an NVIDIA CUDA GPU; it cannot run in CPU-only mode. If you need a CPU-compatible alternative within the same extension, the provided context identifies HI-Diff as supporting CPU execution.
MISCFilter Model Loader · Photo Deblur Input Parameters:
variant
A required selection field of type COMBO[STRING] that determines which pretrained MISCFilter checkpoint the node loads. The default is RealBlur_J. The available choices come from the extension’s VARIANTS list, but the supplied source does not show that list’s complete contents, so the exact options should be checked in your installed node’s dropdown. Minimum and maximum values do not apply because this is a named selection rather than a numerical setting. Changing the variant selects a different set of trained model weights, which can affect the restoration behavior when the model is used downstream; it is not a blur-strength control. When using the optional download-ready connection, the loader expects that connection to provide a MISCFilter checkpoint matching the selected variant, named according to the pattern variant.pth, such as RealBlur_J.pth.
download_ready
An optional connection of type PHOTO_DEBLUR_READY that lets the loader obtain the checkpoint location from a prepared-file reference rather than through its normal model-file lookup. No explicit interface default, numerical range, or selectable options are defined; leaving it disconnected causes the loading method to use its default value of None and resolve the selected MISCFilter checkpoint normally. When connected, the node requests files for the MISCFilter model family and the selected variant, then retrieves the matching checkpoint filename. This connection is useful for coordinating model preparation with model loading, but it does not adjust restoration quality or change the selected model’s weights. The supplied class does not perform a download itself, so the reference must point to files that are available when loading occurs.
MISCFilter Model Loader · Photo Deblur Output Parameters:
deblur_model
An output of type PHOTO_DEBLUR_MODEL containing the initialized MISCFilter model packaged with its model-family label, MISCFilter, and selected variant. Connect it to a compatible downstream node that accepts PHOTO_DEBLUR_MODEL to perform photo deblurring. This value represents the prepared restoration model, not a restored image, image preview, or generic ComfyUI diffusion model. Its importance is that it provides the trained restoration engine needed for subsequent image processing while retaining information about which restoration method and variant were loaded.
MISCFilter Model Loader · Photo Deblur Usage Tips:
- Confirm that ComfyUI recognizes an NVIDIA CUDA GPU before using this loader. Having an NVIDIA GPU installed is not sufficient if ComfyUI is running with a CPU-only PyTorch installation or is configured to use a non-CUDA device.
- Start with the default
RealBlur_Jvariant if you do not already have a specific checkpoint requirement. If you compare variants, keep the image and downstream processing settings unchanged so you can judge the effect of the model selection itself. - Leave
download_readydisconnected when the extension’s normal checkpoint lookup already finds your model. Connect it when your workflow provides a prepared-file reference for the same MISCFilter variant. - Keep the selected variant consistent with the prepared checkpoint. For example, selecting
RealBlur_Jrequires the correspondingRealBlur_J.pthentry when usingdownload_ready; an unrelated model or differently named checkpoint is not interchangeable. - Connect
deblur_modelto a compatible photo-deblurring processor, not directly to an image preview or save node. This loader has no image input and does not produce restored pixels by itself. - Do not look for restoration strength, sampling steps, or image-size controls on this loader; its only model-selection setting is
variant. Any additional processing controls must be configured on the downstream nodes that expose them. - If you need to run without CUDA, use the extension’s HI-Diff loader and compatible processing workflow instead. Connecting a different checkpoint to this MISCFilter loader does not remove its CUDA requirement.
MISCFilter Model Loader · Photo Deblur Common Errors and Solutions:
This MISCFilter adapter requires an NVIDIA CUDA GPU. HI-Diff also supports CPU.
- Explanation: This is the exact error raised when ComfyUI’s selected PyTorch device is not CUDA. The loader stops before attempting to read the checkpoint.
- Solution: Check that your NVIDIA driver and ComfyUI’s PyTorch installation support CUDA, and confirm that ComfyUI is not being launched in CPU-only mode. Restart ComfyUI after fixing the environment. If CUDA is unavailable, switch to the extension’s HI-Diff workflow.
FileNotFoundError: checkpoint file could not be found
- Explanation: This is a possible file-resolution or loading error; its exact wording depends on the helper functions and operating system. The selected checkpoint may be absent, moved, or referenced by an outdated prepared-file connection. The
missingvalue used internally for change detection is not a successful model load. - Solution: Verify that the selected MISCFilter checkpoint is installed in the location expected by the extension. If you use
download_ready, run the model-preparation step again and check that its referenced file still exists. Use the extension’s installation guidance rather than guessing a model directory.
KeyError: 'RealBlur_J.pth' or another selected variant filename
- Explanation: This is a possible error when the prepared-file mapping does not contain the filename requested for the selected variant. The loader explicitly looks up that variant’s
.pthentry, although the file-reference helper may reject an incompatible connection before this lookup occurs. - Solution: Make sure
download_readyrefers to MISCFilter files for the same variant selected on this node. Prepare the correct checkpoint again, or disconnectdownload_readyif the normal model-file lookup is already configured correctly.
Checkpoint loading failed: unreadable, incomplete, or invalid model file
- Explanation: The checkpoint is loaded through ComfyUI’s PyTorch file loader with
safe_load=True. A damaged download, an incomplete file, or a file that is not actually a supported PyTorch checkpoint can cause this step to fail. The exact error message depends on the file and installed PyTorch version. - Solution: Download the checkpoint again from the extension’s documented source and confirm that the download completed. Do not substitute an HTML download page, compressed archive, or unrelated model file for the expected checkpoint.
Model initialization failed: incompatible checkpoint contents
- Explanation: A checkpoint may be readable but still contain weights that do not match the MISCFilter model expected by this adapter. Depending on how model initialization validates the checkpoint, the underlying error may mention missing keys, unexpected keys, or mismatched tensor sizes.
- Solution: Use a checkpoint specifically intended for this extension’s MISCFilter implementation. Check that you have not supplied an HI-Diff checkpoint or another model family’s weights. If you updated the extension, verify that the checkpoint version is still supported.
PermissionError: access denied when reading the checkpoint
- Explanation: This is a possible operating-system error when the account running ComfyUI cannot read the checkpoint or access its containing directory.
- Solution: Give the ComfyUI process read access to the model file and directory, or place the checkpoint in an accessible location supported by the extension. If you use
download_ready, update or regenerate that reference after moving files.
