Add diffusers format weights

#2
by sayakpaul HF Staff - opened

Adds the Modular Diffusers format of MiniMax-H3-Image, converted from revision fe12502c with scripts/convert_minimax_h3_to_diffusers.py --version image.

New files: modular_model_index.json, scheduler/, text_encoder/ (a copy of the MiniMax-H3 text encoder, so the repository is self-contained), transformer_diffusers/ and vae_diffusers/.

No existing file is changed. The original transformer/ and vae/ stay as they are; the converted transformer and VAE live in the two _diffusers folders, which modular_model_index.json points to.

import torch
from diffusers import ComponentsManager, ModularPipeline

manager = ComponentsManager()
manager.enable_auto_cpu_offload(device="cuda")

pipe = ModularPipeline.from_pretrained(
    "MiniMaxAI/MiniMax-H3-Image", components_manager=manager
)
pipe.load_components(dtype=torch.bfloat16)
sayakpaul changed pull request status to open
Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment