Skip to content

Commit abc5e9b

Browse files
committed
Scope load time quantization and disable low cpu mem usage under streamed offload
1 parent 8045395 commit abc5e9b

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

docs/source/en/api/pipelines/minimax_h3.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,21 @@ pipe = ModularPipeline.from_pretrained("MiniMaxAI/MiniMax-H3")
100100
pipe.update_components(
101101
transformer=MiniMaxH3Transformer3DModel.from_pretrained(
102102
"MiniMaxAI/MiniMax-H3", subfolder="transformer", dtype=torch.bfloat16,
103-
quantization_config=TorchAoConfig(Int8WeightOnlyConfig(version=2)),
103+
quantization_config=TorchAoConfig(
104+
Int8WeightOnlyConfig(version=2),
105+
modules_to_not_convert=[
106+
"proj_in", "audio_proj_in", "context_embedder", "time_embedder", "time_proj",
107+
"token_refiner", "norm_out", "proj_out", "audio_proj_out",
108+
],
109+
),
110+
low_cpu_mem_usage=False,
104111
),
105112
text_encoder=Qwen3VLForConditionalGeneration.from_pretrained(
106113
"MiniMaxAI/MiniMax-H3", subfolder="text_encoder", dtype=torch.bfloat16,
107-
quantization_config=TransformersTorchAoConfig(Int8WeightOnlyConfig(version=2)),
114+
quantization_config=TransformersTorchAoConfig(
115+
Int8WeightOnlyConfig(version=2),
116+
modules_to_not_convert=["model.visual", "model.language_model.embed_tokens", "model.language_model.norm", "lm_head"],
117+
),
108118
),
109119
)
110120
pipe.load_components(dtype=torch.bfloat16)

0 commit comments

Comments
 (0)