# Cosmos 2.5 Diffusers Issue

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcosmos-2-5-diffusers-issue%2F172998%3E%5C
**Category:** 🧨 Diffusers\
**Created:** [February 1, 2026, 3:35pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcosmos-2-5-diffusers-issue%2F172998 "2026-02-01T15:35:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![advpatel](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@advpatel](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fadvpatel)%5C
**Post date:** [February 1, 2026, 3:35pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcosmos-2-5-diffusers-issue%2F172998%2F1 "2026-02-01T15:35:54Z")

</div>

Error when running:  
```from diffusers import DiffusionPipeline

pipe = DiffusionPipeline.from\_pretrained(“nvidia/Cosmos-Predict2.5-2B”, dtype=torch.bfloat16, device\_map=“cuda”)```

````auto
[rank0]: Traceback (most recent call last):
[rank0]: File “/root/Projects/physical-ai-hackathon/.venv/lib/python3.11/site-packages/huggingface_hub/utils/_http.py”, line 407, in hf_raise_for_status
[rank0]: response.raise_for_status()
[rank0]: File “/root/Projects/physical-ai-hackathon/.venv/lib/python3.11/site-packages/requests/models.py”, line 1026, in raise_for_status
[rank0]: raise HTTPError(http_error_msg, response=self)
[rank0]: requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://huggingface.co/nvidia/Cosmos-Predict2.5-2B/resolve/main/model_index.json```

````

on diffusers 0.35.2

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/hellohellohello/original/2X/d/de4155eb4aa4108ecb32a1389d7cc37ae69f88b7.png) [@system](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsystem)%5C
**Post date:** [February 1, 2026, 3:35pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcosmos-2-5-diffusers-issue%2F172998%2F2 "2026-02-01T15:35:55Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/hellohellohello/original/2X/d/de4155eb4aa4108ecb32a1389d7cc37ae69f88b7.png) [@system](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsystem)%5C
**Post date:** [February 2, 2026, 12:45am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcosmos-2-5-diffusers-issue%2F172998%2F3 "2026-02-02T00:45:00Z")

</div>



---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [February 2, 2026, 10:28pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcosmos-2-5-diffusers-issue%2F172998%2F4 "2026-02-02T22:28:40Z")

</div>

Wrong revision?

* * *

## What’s happening

`DiffusionPipeline.from_pretrained(...)` is designed to load **Diffusers-formatted “pipeline repos”**. It does that by downloading `model_index.json` and reading it to determine the correct pipeline class and component layout. ([Hugging Face](https://huggingface.co/docs/diffusers/en/using-diffusers/loading "DiffusionPipeline"))

Your error is:

- **404 for** `.../resolve/main/model_index.json`

That means: on the **`main`** revision, the Hub could not serve `model_index.json` at the repo root.

* * *

## Root causes in your Cosmos 2.5 case

### Cause 1 — You’re loading the wrong revision (most likely)

The official Diffusers docs for Cosmos 2.5 do **not** load from `main`. They explicitly load:

- `model_id = "nvidia/Cosmos-Predict2.5-2B"`
- `revision="diffusers/base/post-trained"`

and use a Cosmos-specific pipeline class. ([Hugging Face](https://huggingface.co/docs/diffusers/main/en/api/pipelines/cosmos "Cosmos"))

So if you omit `revision=...`, Diffusers defaults to `main`, looks for `model_index.json` there, and gets a 404.

### Cause 2 — The repo is gated; lack of auth can surface as “not found”

The model page indicates you must be logged in and accept conditions to access the content. ([Hugging Face](https://huggingface.co/nvidia/Cosmos-Predict2.5-2B "nvidia/Cosmos-Predict2.5-2B"))  
The NVIDIA Cosmos installation docs also instruct logging into Hugging Face via `hf auth login` and accepting the NVIDIA license before checkpoints can be downloaded. ([NVIDIA Docs](https://docs.nvidia.com/cosmos/latest/predict2.5/installation.html "Installation — Cosmos"))

Even if the “real” issue is the wrong revision, gating can independently block downloads (and depending on circumstances, you may see errors that look like missing files).

### Cause 3 — Version mismatch risk (after you fix the 404)

Cosmos support in Diffusers has been evolving; newer Diffusers releases explicitly mention Cosmos pipelines being added. ([GitHub](https://github.com/huggingface/diffusers/releases "Releases · huggingface/diffusers"))  
If you fix the 404 and then hit errors like “unknown pipeline class” or missing modules, it’s usually because the installed Diffusers version doesn’t include the required Cosmos pipeline implementation.

* * *

## Concrete fixes (apply in this order)

### 1) Use the correct pipeline + revision (canonical)

This matches the official Cosmos 2.5 Diffusers example. ([Hugging Face](https://huggingface.co/docs/diffusers/main/en/api/pipelines/cosmos "Cosmos"))

```python
import torch
from diffusers import Cosmos2_5_PredictBasePipeline

model_id = "nvidia/Cosmos-Predict2.5-2B"

pipe = Cosmos2_5_PredictBasePipeline.from_pretrained(
    model_id,
    revision="diffusers/base/post-trained",
    torch_dtype=torch.bfloat16,
    token=True, # uses your cached HF token (see next step)
).to("cuda")

```

Why this works:

- `revision="diffusers/base/post-trained"` points to where the Diffusers-formatted artifacts are expected to live for this model. ([Hugging Face](https://huggingface.co/docs/diffusers/main/en/api/pipelines/cosmos "Cosmos"))
- The pipeline class is Cosmos-specific; it avoids relying on generic auto-detection when repos have multiple layouts. ([Hugging Face](https://huggingface.co/docs/diffusers/main/en/api/pipelines/cosmos "Cosmos"))

### 2) Authenticate + accept access (required for gated downloads)

Follow NVIDIA’s instructions:

- get a HF token (read access)
- `hf auth login`
- accept the NVIDIA Open Model License Agreement ([NVIDIA Docs](https://docs.nvidia.com/cosmos/latest/predict2.5/installation.html "Installation — Cosmos"))

If you use a **fine-grained token** , make sure it is allowed to access **public gated repositories** ; otherwise you can get permission failures even when you “have access” on the website. ([Zenn](https://zenn.dev/glisan/articles/b9fb7475e92e00 "【Huggingface】 アクセスがはじかれた！？"))

### 3) Update your call signature (your snippet has non-fatal issues)

- Use `torch_dtype=...` (that’s what the Cosmos docs use). ([Hugging Face](https://huggingface.co/docs/diffusers/main/en/api/pipelines/cosmos "Cosmos"))
- Replace smart quotes `“ ”` with normal quotes `" "`.
- `device_map="cuda"` can work for some pipelines (Diffusers docs show it for other models) ([Hugging Face](https://huggingface.co/docs/diffusers/en/using-diffusers/loading "DiffusionPipeline")), but the Cosmos docs use `.to("cuda")` after loading. ([Hugging Face](https://huggingface.co/docs/diffusers/main/en/api/pipelines/cosmos "Cosmos"))  
For Cosmos, prefer following the Cosmos example first.

### 4) If you still fail after the above: upgrade Diffusers + dependencies

If you resolve gating/revision but hit pipeline/import errors, upgrade Diffusers. New releases have explicitly shipped Cosmos-related pipelines. ([GitHub](https://github.com/huggingface/diffusers/releases "Releases · huggingface/diffusers"))

Typical upgrade set:

- `diffusers`, `huggingface_hub`, `accelerate`, `transformers`, `safetensors`

* * *

## How to verify which cause you’re hitting

### Check A — Does `model_index.json` exist on `main`?

If it truly isn’t present on `main`, the 404 is expected; the fix is `revision="diffusers/base/post-trained"`. ([Hugging Face](https://huggingface.co/docs/diffusers/main/en/api/pipelines/cosmos "Cosmos"))

### Check B — Are you authenticated for gated files?

If you aren’t logged in / haven’t accepted the model’s terms, downloads will fail for gated repos. ([Hugging Face](https://huggingface.co/docs/hub/en/models-gated "Gated models"))

* * *

## Summary for your exact traceback

- The URL in your error includes `/resolve/main/…`, so you are definitely loading the **default `main` revision**.
- Cosmos 2.5 Diffusers docs explicitly require **`revision="diffusers/base/post-trained"`**. ([Hugging Face](https://huggingface.co/docs/diffusers/main/en/api/pipelines/cosmos "Cosmos"))
- The model is gated and requires authentication + license acceptance. ([NVIDIA Docs](https://docs.nvidia.com/cosmos/latest/predict2.5/installation.html "Installation — Cosmos"))

Apply: **(1) revision + Cosmos pipeline class** + **(2) HF auth & license acceptance**. If you then hit class/import issues, **upgrade Diffusers** (Cosmos pipelines have been added in newer releases). ([GitHub](https://github.com/huggingface/diffusers/releases "Releases · huggingface/diffusers"))
