Instructions to use nvidia/Cosmos-1.0-Diffusion-7B-Text2World with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Cosmos
How to use nvidia/Cosmos-1.0-Diffusion-7B-Text2World with Cosmos:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- NeMo
How to use nvidia/Cosmos-1.0-Diffusion-7B-Text2World with NeMo:
# tag did not correspond to a valid NeMo domain.
- Diffusers
How to use nvidia/Cosmos-1.0-Diffusion-7B-Text2World with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("nvidia/Cosmos-1.0-Diffusion-7B-Text2World", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
having issues using the model with rtx 5090...how to fix
hi, so initially i was getting this error :
RuntimeError: Cannot use weights_only=True with TorchScript archives passed to torch.load. In PyTorch 2.6, we changed the default value of the weights_only argument in torch.load from False to True. Re-running torch.load with weights_only set to False will likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source.
after changing the weights to false, i then got this error:
RuntimeError: FlashAttention only supports Ampere GPUs or newer.
im running the latest drivers, the nightly of pytorch and torchvision. how can i get this to run? Im using wsl by the way
Thank you