Free | No tracking | Every fact with a source|German and English

Error / Models and files

Weights only load failed / Unsupported global (PyTorch blocks old .pt models starting in 2.6, e.g. YOLO in the Impact Pack)

An older model in Pickle format (.pt), such as a YOLO detection model for the FaceDetailer from the Impact Pack, can no longer be loaded. The reason is the stricter load check starting with PyTorch 2.6.

The message

_pickle.UnpicklingError: Weights only load failed. … WeightsUnpickler error: Unsupported global: GLOBAL ultralytics.nn.tasks.DetectionModel was not an allowed global by default.

Affects: ComfyUI

Why is this happening?

Model files can run code when loaded. Since version 2.6, PyTorch loads them more securely (“weights only”) and blocks unknown classes like ultralytics.nn.tasks.DetectionModel. Older models that were created without this restriction fail because of that. In ComfyUI, this mainly affects the UltralyticsDetectorProvider node from the ComfyUI Impact Subpack.

How to fix it

  1. Update the “ComfyUI Impact Subpack” through the ComfyUI Manager – according to the thread, the weights_only error was fixed there with a pull request.
  2. If the error remains after a ComfyUI update, uninstall the Impact Subpack and install it again (search for “ComfyUI Impact Subpack” in the Manager and click Install). This has helped several users.
  3. For a manual installation, you need to install the dependencies in ComfyUI's Python; for the portable version, use <Installationsordner>\python_embeded\python.exe -m pip install -r requirements.txt instead of just pip.
  4. For models you trust, you can add an exception: write the path of the model file into ComfyUI/user/default/ComfyUI-Impact-Subpack/model-whitelist.txt. For these files, weights_only is disabled.
  5. Put YOLO models in the intended folders models/ultralytics/bbox or models/ultralytics/segm and restart ComfyUI.

Better not: Do not add models from unknown sources to the whitelist, and do not disable weights_only globally – this exact check prevents a tampered model file from running malicious code on your PC.

Set up from scratch again

If it still doesn’t work after that, a fresh setup step by step often helps:

Terms for this

Similar errors

Sources

Checked on Oct 28, 2026. Didn't help? Ask in the forum and name the graphics card, program, and the full message.