{"slug": "question-on-how-to-use-hugging-face-to-download-a-safetensors-file", "title": "Question on how to use Hugging Face to download a .safetensors file", "summary": "A Hugging Face community response advises ComfyUI users not to manually concatenate sharded .safetensors files such as part1of4.safetensors and part2of4.safetensors, and instead to start from the ComfyUI guide, workflow, or template that names the exact file needed. The response points to the Diffusers documentation on model formats, which distinguishes Diffusers format from single-file format while noting safetensors is only the serialization file type, and cites the official ComfyUI Qwen Image example files qwen_image_fp8_e4m3fn.safetensors, qwen_2.5_vl_7b_fp8_scaled.safetensors, and qwen_image_vae.safetensors as well as the Comfy-Org/Qwen-Image_ComfyUI repository, whose model card describes its contents as \"Repackaged model files for ComfyUI.\" The guidance says users should confirm the exact filename ComfyUI requires, the loader node consuming it, and the target models/ directory — for example diffusion_models/, text_encoders/, and vae/ versus checkpoints/ — and should check for a *.safetensors.index.json file before treating shards as pieces to merge.", "body_md": "Hugging Face hosts **files packaged for ComfyUI, but of course it also hosts many files intended for other software**; sometimes both can even be present in the same repository. The Hub itself does not necessarily make it obvious which exact artifact a particular ComfyUI workflow expects. So if there is a ComfyUI guide, workflow, or template for the model, I think it is usually safer to start from that guide and follow its link to the exact file you need:\n\nI would **not try to combine the `part1of4.safetensors`, `part2of4.safetensors`, etc. manually yet**.\n\nThere are a few different things that can look very similar on Hugging Face:\n\n`.safetensors` shards.\nAll of those may use the `.safetensors` file type, so the extension alone does not tell you which one your workflow needs.\n\nThe [Diffusers documentation on model formats](https://huggingface.co/docs/diffusers/using-diffusers/other-formats) makes this distinction explicitly: **Diffusers format** and **single-file format** are different layouts, while `safetensors` is the file type used to serialize the weights.\n\nMy default route would therefore be:\n\nFor example, the official [ComfyUI Qwen Image example](https://comfyanonymous.github.io/ComfyUI_examples/qwen_image/) gives exact files such as:\n\n```\nqwen_image_fp8_e4m3fn.safetensors\nqwen_2.5_vl_7b_fp8_scaled.safetensors\nqwen_image_vae.safetensors\n```\n\nand tells you which ComfyUI directory each one belongs in.\n\nThere is also a separate [`Comfy-Org/Qwen-Image_ComfyUI`](https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI) repository whose model card literally describes the files as **“Repackaged model files for ComfyUI”** and again lists the appropriate folders.\n\nThat is quite different from simply opening the original/upstream model repository and choosing whichever `.safetensors` file looks closest.\n\nIf you still have the page open, I would check it roughly like this:\n\n```\nDo you know the exact filename ComfyUI asks for?\n|\n+-- Yes\n|   |\n|   +-- Is that exact filename linked from a ComfyUI guide/workflow/template?\n|   |       |\n|   |       +-- Yes -> use that link and the directory specified there.\n|   |       |\n|   |       +-- No  -> search the exact filename, not only the model name.\n|   |\n|   +-- The HF page instead shows model-00001-of-0000N.safetensors?\n|           |\n|           +-- Check whether there is also a *.safetensors.index.json.\n|               If yes, you are probably looking at a sharded model/component,\n|               not \"pieces\" that should simply be concatenated.\n|\n+-- No\n    |\n    +-- Go back to the ComfyUI workflow/tutorial first.\n        Determine:\n        - the required filename;\n        - what loader node consumes it;\n        - and which models/ directory it belongs in.\n```\n\nThe **loader node** is also useful information.\n\nA workflow using a normal checkpoint loader is asking for something different from one loading a diffusion model, text encoder, and VAE separately.\n\nFor example, current ComfyUI examples commonly give instructions of the form:\n\n``` php\ndiffusion model -> ComfyUI/models/diffusion_models/\ntext encoder    -> ComfyUI/models/text_encoders/\nVAE             -> ComfyUI/models/vae/\n```\n\nwhile some easier single-file workflows use:\n\n``` php\ncheckpoint -> ComfyUI/models/checkpoints/\n```\n\nThe [Flux example page](https://comfyanonymous.github.io/ComfyUI_examples/flux/) demonstrates both styles on the same page.\n\nSo if I were troubleshooting this from scratch, I would start with just three pieces of information:\n\n```\n1. The exact filename ComfyUI says it needs\n2. The workflow/tutorial/template where that filename appears\n3. The Hugging Face page you arrive at\n```\n\nFrom those three things it should usually be possible to tell whether you are looking at:\n\nI would definitely check that before attempting to merge anything.", "url": "https://wpnews.pro/news/question-on-how-to-use-hugging-face-to-download-a-safetensors-file", "canonical_source": "https://discuss.huggingface.co/t/question-on-how-to-use-hugging-face-to-download-a-safetensors-file/182820#post_2", "published_at": "2026-10-03 23:02:11+00:00", "updated_at": "2026-10-03 23:08:33.483285+00:00", "lang": "en", "topics": ["ai-tools", "generative-ai", "developer-tools"], "entities": ["Hugging Face", "ComfyUI", "Diffusers", "Comfy-Org/Qwen-Image_ComfyUI", "Qwen Image", "Flux"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/question-on-how-to-use-hugging-face-to-download-a-safetensors-file", "markdown": "https://wpnews.pro/news/question-on-how-to-use-hugging-face-to-download-a-safetensors-file.md", "text": "https://wpnews.pro/news/question-on-how-to-use-hugging-face-to-download-a-safetensors-file.txt", "jsonld": "https://wpnews.pro/news/question-on-how-to-use-hugging-face-to-download-a-safetensors-file.jsonld"}}