Instructions to use circulus/Cosmos-Transfer2.5-2B-bnb-int4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use circulus/Cosmos-Transfer2.5-2B-bnb-int4 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("circulus/Cosmos-Transfer2.5-2B-bnb-int4", 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
| { | |
| "_class_name": "CosmosControlNetModel", | |
| "_diffusers_version": "0.39.0", | |
| "_name_or_path": "nvidia/Cosmos-Transfer2.5-2B", | |
| "adaln_lora_dim": 256, | |
| "attention_head_dim": 128, | |
| "crossattn_proj_in_channels": 100352, | |
| "encoder_hidden_states_channels": 1024, | |
| "extra_pos_embed_type": null, | |
| "img_context_dim_in": 1152, | |
| "img_context_dim_out": 2048, | |
| "in_channels": 130, | |
| "latent_channels": 18, | |
| "max_size": [ | |
| 128, | |
| 240, | |
| 240 | |
| ], | |
| "mlp_ratio": 4.0, | |
| "model_channels": 2048, | |
| "n_controlnet_blocks": 4, | |
| "num_attention_heads": 16, | |
| "patch_size": [ | |
| 1, | |
| 2, | |
| 2 | |
| ], | |
| "quantization_config": { | |
| "_load_in_4bit": true, | |
| "_load_in_8bit": false, | |
| "bnb_4bit_compute_dtype": "bfloat16", | |
| "bnb_4bit_quant_storage": "uint8", | |
| "bnb_4bit_quant_type": "nf4", | |
| "bnb_4bit_use_double_quant": true, | |
| "llm_int8_enable_fp32_cpu_offload": false, | |
| "llm_int8_has_fp16_weight": false, | |
| "llm_int8_skip_modules": null, | |
| "llm_int8_threshold": 6.0, | |
| "load_in_4bit": true, | |
| "load_in_8bit": false, | |
| "quant_method": "bitsandbytes" | |
| }, | |
| "rope_scale": [ | |
| 1.0, | |
| 3.0, | |
| 3.0 | |
| ], | |
| "text_embed_dim": 1024, | |
| "use_crossattn_projection": true | |
| } | |