Skip to content

Add cu130-torch213 dependency group (torch 2.13 on CUDA 13.0) - #134

Open
pengcuo wants to merge 2 commits into
mainfrom
pzeren/cu130-torch213-support
Open

Add cu130-torch213 dependency group (torch 2.13 on CUDA 13.0)#134
pengcuo wants to merge 2 commits into
mainfrom
pzeren/cu130-torch213-support

Conversation

@pengcuo

@pengcuo pengcuo commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

What

Adds cu130-torch213 and cu130-torch213-train dependency groups pinning torch 2.13.0+cu130 (with matching torchvision 0.28.0, torchcodec 0.14.0, torchao 0.17.0, triton 3.7.1, natten 0.21.6+cu130.torch213 on aarch64, and the cu13 NVIDIA runtime libs), plus a conflicts entry making it mutually exclusive with the other backend groups. uv.lock is regenerated for the new closure.

Why the code change

torchvision 0.28 removed torchvision.io.read_video, so cosmos_framework/inference/vision.py switches to a torchcodec-based THWC uint8 decoder. It's forced onto CPU so an active default-CUDA context during generation doesn't route torchcodec's internal frame-index tensor to CUDA (which would raise NotImplementedError).

Docs

Bumps the recommended NGC base image to nvcr.io/nvidia/pytorch:26.06-py3 in README.md and docs/setup.md to match the torch 2.13 line.

Verification

On 4× GB200 (aarch64):

  • uv sync --all-extras --group=cu130-torch213-train resolves clean; torch.__version__ == 2.13.0+cu130, torch.version.cuda == 13.0.
  • Cosmos3-Nano throughput inference over all 13 inputs/omni/*.json samples (t2i, t2v, i2v, v2v, t2vs, i2vs, and the 6 action modes) produced valid outputs: videos decode with real pixel variation (std 44–76, well above the degenerate floor), audio modes carry an audio track, and all action arrays are non-empty and finite.

Known limitations (in code comments)

  • x86_64 has no torch2.13 wheels yet for flash-attn / TE / natten — those are commented out / left on the torch2.10 build; this line is validated on aarch64.
  • torch 2.13.0+cu130 hard-pins cuDNN to 9.20.0.48; the cuDNN attention backend wants ≥9.22 (else it falls back to NATTEN). Override at runtime if needed.

🤖 Generated with Claude Code

Introduce `cu130-torch213` and `cu130-torch213-train` groups pinning
torch==2.13.0+cu130 (with matching torchvision 0.28.0, torchcodec 0.14.0,
torchao 0.17.0, triton 3.7.1, natten 0.21.6+cu130.torch213 on aarch64, and
the cu13 NVIDIA runtime libs), plus a conflicts entry so it is mutually
exclusive with the other backend groups. Regenerates uv.lock for the new
closure.

torchvision 0.28 removed `torchvision.io.read_video`, so switch
inference/vision.py to a torchcodec-based THWC uint8 decoder (forced onto
CPU so an active default-CUDA context during generation doesn't route
torchcodec's internal index tensor to CUDA).

Bump the recommended NGC base image to nvcr.io/nvidia/pytorch:26.06-py3 in
README and docs/setup.md to match the torch 2.13 line.

Verified on 4x GB200 (aarch64): uv sync --all-extras --group=cu130-torch213-train
resolves clean, and Cosmos3-Nano throughput inference over all 13 inputs/omni
samples (t2i/t2v/i2v/v2v/t2vs/i2vs + 6 action modes) produces valid,
non-degenerate video/image/audio/action outputs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pengcuo
pengcuo force-pushed the pzeren/cu130-torch213-support branch from 46729e4 to 3725e33 Compare July 27, 2026 05:40
The x86_64 pin was still on 0.21.6.dev6+cu130.torch210.gb300, which is built
against the torch 2.10 ABI: on torch 2.13 the extension fails to load and
natten.HAS_LIBNATTEN silently reports False.

nvidia-cosmos/cosmos-dependencies#62 published the matching x86_64 wheel, so
both arches can now share a single unmarked pin.

Verified on 4x H200: full Cosmos3-Nano omni suite (13/13 samples, all 7
model_modes) with HAS_LIBNATTEN=True. NATTEN is the active attention backend
here — flash3 is absent and cuDNN 9.20 is below the 9.22 the framework wants,
so choose_backend resolves to natten.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants