Text-to-Video
Diffusers
Safetensors
MiniMax H3
English
video-generation
text-to-audio-video
sdnq
8-bit precision
Instructions to use OzzyGT/MiniMax_H3_sdnq_4bit_pruned with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use OzzyGT/MiniMax_H3_sdnq_4bit_pruned with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("OzzyGT/MiniMax_H3_sdnq_4bit_pruned", 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
Update README.md
Browse files
README.md
CHANGED
|
@@ -58,11 +58,14 @@ You can find ready-to-use scripts in the [diffusers-recipes](https://github.com/
|
|
| 58 |
|
| 59 |
```python
|
| 60 |
import torch
|
| 61 |
-
from diffusers import ModularPipeline
|
| 62 |
from diffusers.hooks import apply_group_offloading
|
| 63 |
from diffusers.utils.export_utils import encode_video
|
| 64 |
from sdnq import SDNQConfig # noqa: F401
|
| 65 |
|
|
|
|
|
|
|
|
|
|
| 66 |
pipe = ModularPipeline.from_pretrained("OzzyGT/MiniMax_H3_sdnq_4bit_pruned", workflow="t2va", trust_remote_code=True)
|
| 67 |
pipe.load_components(dtype=torch.bfloat16, trust_remote_code=True)
|
| 68 |
|
|
|
|
| 58 |
|
| 59 |
```python
|
| 60 |
import torch
|
| 61 |
+
from diffusers import AutoencoderKLMiniMaxH3, ModularPipeline
|
| 62 |
from diffusers.hooks import apply_group_offloading
|
| 63 |
from diffusers.utils.export_utils import encode_video
|
| 64 |
from sdnq import SDNQConfig # noqa: F401
|
| 65 |
|
| 66 |
+
# patch until fixed upstream, the fp32 pin covers the whole VAE and ignores dtype
|
| 67 |
+
AutoencoderKLMiniMaxH3._keep_in_fp32_modules = []
|
| 68 |
+
|
| 69 |
pipe = ModularPipeline.from_pretrained("OzzyGT/MiniMax_H3_sdnq_4bit_pruned", workflow="t2va", trust_remote_code=True)
|
| 70 |
pipe.load_components(dtype=torch.bfloat16, trust_remote_code=True)
|
| 71 |
|