Instructions to use diffusers-modular/minimax-h3-refmod with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use diffusers-modular/minimax-h3-refmod with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("diffusers-modular/minimax-h3-refmod", 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
|
@@ -9,7 +9,8 @@ tags:
|
|
| 9 |
|
| 10 |
# MiniMax-H3 RefMod
|
| 11 |
|
| 12 |
-
Portable reference-conditioning files for MiniMax-H3 `ref2va`, as [Modular Diffusers](https://huggingface.co/docs/diffusers/modular_diffusers/overview) blocks.
|
|
|
|
| 13 |
|
| 14 |
## What it is
|
| 15 |
|
|
@@ -103,11 +104,4 @@ video = pipe(
|
|
| 103 |
`safetensors` with:
|
| 104 |
|
| 105 |
- tensors `video.0, video.1, ...` (one per image/video reference) and `audio.0, audio.1, ...` (one per soundtrack), in packed order.
|
| 106 |
-
- a JSON metadata header: `format`, `version`, `num_video`, `num_audio`, `video_shapes`, `audio_shapes`, and `reference_kinds`.
|
| 107 |
-
|
| 108 |
-
## Verification
|
| 109 |
-
|
| 110 |
-
- **Round-trip**: a save then load returns `condition_latents` / `audio_condition_latents` that are bitwise-equal to the live encode (`max|Δ| = 0`).
|
| 111 |
-
- **Drop-in**: replacing `MiniMaxH3Ref2VAReferenceEncoderStep` with `MiniMaxH3LoadRefModStep` in a full `ref2va` graph produces bitwise-identical video and audio, because the reload is exact and the reference encode never draws from the request generator.
|
| 112 |
-
|
| 113 |
-
Both are verified on `hf-internal-testing/tiny-minimax-h3-modular-pipe` (shapes and numerics only; it carries random weights and says nothing about generation quality).
|
|
|
|
| 9 |
|
| 10 |
# MiniMax-H3 RefMod
|
| 11 |
|
| 12 |
+
Portable reference-conditioning files for MiniMax-H3 `ref2va`, as [Modular Diffusers](https://huggingface.co/docs/diffusers/modular_diffusers/overview) blocks.
|
| 13 |
+
This is the diffusers-modular equivalent of the ComfyUI "RefMod": encode a reference once, save the result to a small `.safetensors`, and inject it straight back on later requests instead of re-encoding the media.
|
| 14 |
|
| 15 |
## What it is
|
| 16 |
|
|
|
|
| 104 |
`safetensors` with:
|
| 105 |
|
| 106 |
- tensors `video.0, video.1, ...` (one per image/video reference) and `audio.0, audio.1, ...` (one per soundtrack), in packed order.
|
| 107 |
+
- a JSON metadata header: `format`, `version`, `num_video`, `num_audio`, `video_shapes`, `audio_shapes`, and `reference_kinds`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|