Instructions to use kwanter/LongCat-Video-dit-int8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use kwanter/LongCat-Video-dit-int8 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("kwanter/LongCat-Video-dit-int8", 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": "LongCatVideoTransformer3DModel", | |
| "_diffusers_version": "0.38.0", | |
| "_name_or_path": "/workspace/LongCat-Video/dit", | |
| "adaln_tembed_dim": 512, | |
| "bsa_params": { | |
| "chunk_3d_shape_k": [ | |
| 4, | |
| 4, | |
| 4 | |
| ], | |
| "chunk_3d_shape_q": [ | |
| 4, | |
| 4, | |
| 4 | |
| ], | |
| "sparsity": 0.9375 | |
| }, | |
| "caption_channels": 4096, | |
| "cp_split_hw": null, | |
| "depth": 48, | |
| "enable_bsa": false, | |
| "enable_flashattn2": true, | |
| "enable_flashattn3": false, | |
| "enable_xformers": false, | |
| "frequency_embedding_size": 256, | |
| "hidden_size": 4096, | |
| "in_channels": 16, | |
| "mlp_ratio": 4, | |
| "num_heads": 32, | |
| "out_channels": 16, | |
| "patch_size": [ | |
| 1, | |
| 2, | |
| 2 | |
| ], | |
| "quantization_config": { | |
| "_load_in_4bit": false, | |
| "_load_in_8bit": true, | |
| "bnb_4bit_compute_dtype": "float32", | |
| "bnb_4bit_quant_storage": "uint8", | |
| "bnb_4bit_quant_type": "fp4", | |
| "bnb_4bit_use_double_quant": false, | |
| "llm_int8_enable_fp32_cpu_offload": false, | |
| "llm_int8_has_fp16_weight": false, | |
| "llm_int8_skip_modules": [ | |
| "linear" | |
| ], | |
| "llm_int8_threshold": 6.0, | |
| "load_in_4bit": false, | |
| "load_in_8bit": true, | |
| "quant_method": "bitsandbytes" | |
| }, | |
| "text_tokens_zero_pad": true | |
| } | |