LogoWonderful Launcher
  • Home
  • Pricing
  • Docs
  • Download

ModuleNotFoundError: No module named 'safetensors' in ComfyUI

Partially verifiedLow riskLast verified 2026-07-09

Fix ComfyUI No module named safetensors errors by installing the Python safetensors package in the environment that starts ComfyUI.

If ComfyUI logs ModuleNotFoundError: No module named 'safetensors', the Python package safetensors is missing from the environment that launched ComfyUI.

This is different from a missing .safetensors model file. A model-placement problem says a checkpoint, LoRA, VAE, or diffusion model file cannot be found. A No module named 'safetensors' traceback means Python cannot import the library that reads the file format.

In the SEO Lab portable repair chain, this error appeared after CUDA Torch was repaired. Installing safetensors moved startup forward to the next missing dependency.

Fast answer

For the GitHub Windows portable package:

.\python_embeded\python.exe -s -m pip show safetensors
.\python_embeded\python.exe -s -m pip install "safetensors>=0.4.2"
.\python_embeded\python.exe -s -c "import safetensors; print('import ok')"
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build

If the next log names another package, continue one missing module at a time.

What The Log Looks Like

ModuleNotFoundError: No module named 'safetensors'

The traceback may appear during startup, model loading, custom-node import, or a dependency repair chain after Torch starts importing successfully.

Quick Diagnosis

What You SeeMeaningFirst Action
No module named 'safetensors'Python package missingInstall safetensors in the active ComfyUI Python
.safetensors file not listed in dropdownModel path problemUse the model placement guide instead
Error changes after installingThe first blocker is fixedContinue with the next missing module
Torch was just repairedNormal sequence in broken portable environmentsVerify CUDA Torch before stacking more packages

Step 1: Confirm It Is Not A Model File Error

Use this page when the log says:

No module named 'safetensors'

Use Where to Put Safetensors in ComfyUI when the problem is:

  • a checkpoint does not appear in the dropdown
  • a LoRA file is in the wrong folder
  • ComfyUI cannot find a named .safetensors file

Step 2: Install The Python Package

Windows portable:

.\python_embeded\python.exe -s -m pip install "safetensors>=0.4.2"

Manual venv:

python -m pip install "safetensors>=0.4.2"

Step 3: Restart And Read The Next Log

.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build

If the error changes to No module named 'packaging', numpy, or another dependency, that is progress in a damaged portable environment. Repair the new first blocker rather than pasting a long requirements command.

What Not To Do

  • do not move model files for a Python import error
  • do not install into system Python when ComfyUI uses python_embeded
  • do not reinstall Torch just because safetensors is missing
  • do not treat this as the same intent as where to put safetensors

Related Guides

  • Where to Put Safetensors in ComfyUI
  • Repair ComfyUI Portable Dependencies One Missing Module At A Time
  • Fix No module named errors in ComfyUI
  • No module named 'einops' in ComfyUI
  • ComfyUI Dependency Conflicts

Source References

  • Windows portable SEO Lab repair, May 18, 2026: ModuleNotFoundError: No module named 'safetensors' appeared after CUDA Torch repair
  • Same lab ComfyUI\requirements.txt: safetensors>=0.4.2
  • safetensors on PyPI

Start free with Wonderful Launcher if this affects your real ComfyUI environment. It keeps launcher-native repair, task logs, and runtime checks in one place; credits are only for image generation and metered tools.

Download Wonderful LauncherSee credit packages

Did this fix your issue?

Your answer helps prioritize verified ComfyUI repairs.

Table of Contents

What The Log Looks Like
Quick Diagnosis
Step 1: Confirm It Is Not A Model File Error
Step 2: Install The Python Package
Step 3: Restart And Read The Next Log
What Not To Do
Related Guides
Source References