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
- Update the “ComfyUI Impact Subpack” through the ComfyUI Manager – according to the thread, the weights_only error was fixed there with a pull request.
- 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.
- 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.txtinstead of justpip. - 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. - Put YOLO models in the intended folders
models/ultralytics/bboxormodels/ultralytics/segmand 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:
- Set up and maintain ComfyUI on Windows
Desktop or Portable, where the models belong, sharing models with other programs, safely installing custom nodes, updates, startup options … - Your First Image with ComfyUI
Install Comfy Desktop, learn the interface, and create your first AI image with FLUX.2 [small] 4B or Z-Image Turbo. - Your First AI Video with LTX in ComfyUI
Use LTX-2.3 in ComfyUI to create short videos with sound from text or an image. Template, files, settings, and license.
Terms for this
Similar errors
- IPAdapter model not found / ClipVision model not found (IPAdapter files are missing or named incorrectly)
- lora key not loaded (LoRA does not match the model or the loader)
- Unexpected architecture type in GGUF file (ComfyUI-GGUF doesn’t know the model yet)
- clip missing: ['text_projection.weight'] (usually a harmless warning)
- ControlNet: Error(s) in loading state_dict … size mismatch (ControlNet does not match the base model)
Sources
- https://github.com/ltdrdata/ComfyUI-Impact-Pack/issues/1120
- https://github.com/ltdrdata/ComfyUI-Impact-Subpack
Checked on Oct 28, 2026. Didn't help? Ask in the forum and name the graphics card, program, and the full message.