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_8bit_pruned with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use OzzyGT/MiniMax_H3_sdnq_8bit_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_8bit_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
Isn't it better to enable use_quantized_matmul?
#2
by wtrida19933 - opened
It should make generation much faster as far as I understand.
I tried to enable it in current config.json, but got
sdnq/quant_utils.py", line 182, in prepare_weight_for_matmul
weight = weight.t_().contiguous().t_()
^^^^^^^^^^^
RuntimeError: t_() expects a tensor with <= 2 dimensions, but self is 3D
I suppose it's not a runtime param and should be enabled during quantization.
it is a runtime param and not everyone has triton installed, that's why it is usually something you set in the script and not in the model config.
Not sure what you did but I run it with something like this:
pipe.transformer = apply_sdnq_options_to_model(pipe.transformer, use_quantized_matmul=True)
pipe.text_encoder = apply_sdnq_options_to_model(pipe.text_encoder, use_quantized_matmul=True)
and it works fine.