Flux.1 Dev Installation Error Fix: Missing Weights and Hash Mismatch
You download the Flux.1 dev checkpoint, drop it into your ComfyUI models folder, load the workflow, and get either RuntimeError: PosixPath('flux1-dev.safetensors') does not seem to be a safetensors file or a hash verification warning that says your model file doesn't match the expected SHA256. Or worse: the model loads but silently produces gray output because a VAE or CLIP weight file is absent. Setting up Flux.1 dev locally is messier than it should be, and the error messages are rarely specific enough to tell you exactly what's wrong on the first read.
What this error actually means
Flux.1 dev is not a single model file. It's a collection of components that must all be present and correctly versioned: the main transformer weights (flux1-dev.safetensors, roughly 23 GB), a VAE (ae.safetensors, about 335 MB), and two CLIP text encoders (clip_l.safetensors from OpenCLIP and t5xxl_fp16.safetensors or t5xxl_fp8_e4m3fn.safetensors from the T5-XXL family).
A hash mismatch error means the file you downloaded doesn't match the SHA256 hash that Black Forest Labs published for that model version. This most often happens when a download was interrupted and resumed incorrectly, producing a corrupted file that is still the right size (or close to it) but has corrupted byte sequences. Some download managers and browser download tools silently corrupt large files this way.
A "missing weights" error usually means one of the three supporting components (VAE, CLIP, or T5) isn't in the right subdirectory for your runner (ComfyUI or Diffusers).
Quick fix (when you need it working in 60 seconds)
- Verify file size:
flux1-dev.safetensorsshould be exactly 23,803,887,004 bytes. Runls -la flux1-dev.safetensorsto check. - If the file size is wrong, delete and re-download. Use
wgetwith resume:wget -c https://huggingface.co/black-forest-labs/FLUX.1-dev/resolve/main/flux1-dev.safetensors - Confirm
ae.safetensorsis inComfyUI/models/vae/ - Confirm
clip_l.safetensorsis inComfyUI/models/clip/ - Confirm
t5xxl_fp16.safetensorsort5xxl_fp8_e4m3fn.safetensorsis inComfyUI/models/clip/ - Restart ComfyUI and reload the workflow.
Why this happens
Flux.1 dev installation fails for a handful of specific reasons, each with a distinct signature.
Interrupted large file downloads. The main weights file is 23 GB. Browser downloads over hours-long sessions get interrupted by sleep, network drops, or browser throttling. The file appears complete in Finder or Explorer but has zero bytes or garbage in the final segments. Always use wget or aria2c for files over 5 GB.
Hugging Face authentication failures. Flux.1 dev is a gated model requiring acceptance of Black Forest Labs' license on Hugging Face. If you're downloading with huggingface_hub or via the CLI and your token isn't set, the download silently completes as an HTML error page saved to a .safetensors filename. The file will be a few kilobytes. Running file flux1-dev.safetensors will show "HTML document" if this is the problem.
Wrong directory structure. ComfyUI expects specific subdirectories based on model type. The transformer goes in ComfyUI/models/diffusion_models/ (not models/checkpoints/ which is for SDXL-style unified checkpoints). Many tutorials use outdated paths from before ComfyUI standardized the Flux directory layout.
Incompatible workflow CLIP loader. ComfyUI workflows for Flux.1 use a DualCLIPLoader node that expects both clip_l and a T5 model. If your workflow was saved with specific hardcoded model names and your files are named differently (for example, t5-v1_1-xxl-encoder-fp16.safetensors instead of t5xxl_fp16.safetensors), ComfyUI will report a missing model even though the file exists.
fp8 vs fp16 T5 mismatch. The fp8 quantized T5 (t5xxl_fp8_e4m3fn.safetensors) runs faster and uses less VRAM but requires a recent version of ComfyUI (post-October 2024). If you're on an older ComfyUI version, it will fail to load the fp8 file without a useful error.
Permanent fix
Work through these steps in order to get a clean installation.
-
Accept the Flux.1 dev license on Hugging Face. Go to huggingface.co/black-forest-labs/FLUX.1-dev and click "Agree and access repository." Then create an access token at huggingface.co/settings/tokens with "Read" scope.
-
Set your Hugging Face token as an environment variable:
export HF_TOKEN=hf_yourTokenHereOr on Windows:
set HF_TOKEN=hf_yourTokenHere -
Download the main weights with the HF CLI:
pip install huggingface_hub huggingface-cli download black-forest-labs/FLUX.1-dev \ flux1-dev.safetensors \ --local-dir ./flux_weights \ --local-dir-use-symlinks FalseThis handles authentication and resumes interrupted downloads correctly.
-
Download the VAE:
huggingface-cli download black-forest-labs/FLUX.1-dev \ ae.safetensors \ --local-dir ./flux_weights -
Download the T5 and CLIP models from ComfyUI's recommended sources. The ComfyUI team maintains pre-tested copies at the URLs listed in their
flux_readme.md. As of ComfyUI 0.3.x:# CLIP L wget https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/clip_l.safetensors \ -P ComfyUI/models/clip/ # T5 fp8 (recommended for 16-24 GB VRAM) wget https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/t5xxl_fp8_e4m3fn.safetensors \ -P ComfyUI/models/clip/ -
Move the main weights to the correct ComfyUI path:
mv ./flux_weights/flux1-dev.safetensors ComfyUI/models/diffusion_models/ mv ./flux_weights/ae.safetensors ComfyUI/models/vae/ -
Verify SHA256 hashes against Black Forest Labs' published values. The expected SHA256 for
flux1-dev.safetensorsas of the v1 release isebce9be12e29bf9c3b4a8867e73f31aafea4d3eab22a6ebf5b625b7fbe8437b7. Check with:sha256sum flux1-dev.safetensors -
Update ComfyUI to 0.3.x before loading Flux workflows. Older versions lack the
DualCLIPLoaderandFluxGuidancenodes required by current Flux workflows:cd ComfyUI && git pull && pip install -r requirements.txt
Prevention
The best prevention for Flux installation issues is doing the download correctly the first time. Use huggingface-cli with your token set, and let it handle retries and verification. Never use a browser to download model files above 5 GB.
Keep a model_manifest.txt file in your models directory that records the SHA256, source URL, and download date for each model. This takes 30 seconds to create and saves hours when you need to debug or re-download after a system migration.
When updating ComfyUI, read the changelog before loading a Flux workflow. ComfyUI updates occasionally rename or restructure nodes, which breaks saved workflows. Keep a known-working workflow file backed up and only update it after verifying the new node names.
If you're setting up Flux.1 on a new machine, consider using Stability Matrix (a GUI installer for local SD) which automates the multi-file download process for Flux.1 dev and places files in the correct directories automatically.
When the fix doesn't work
If you've verified file sizes and SHA256 hashes, set up the correct directory structure, and updated ComfyUI but still see load failures, open an issue on the ComfyUI GitHub at github.com/comfyanonymous/ComfyUI with the exact error from your terminal log. Include your ComfyUI version (git log --oneline -1) and PyTorch version (python -c "import torch; print(torch.__version__)").
For urgent needs, fal.ai and Replicate both host Flux.1 dev as an API endpoint that requires no local installation.