A Quick Guide to Image and Video Generation with Minimax-H3 on Google Colab
MiniMax-H3 is an open-weight omni-modal model capable of generating Images and videos coupled with native, synchronized audio in a single pass. Below is a guide on how to configure, load, and execute the Minimax-H3 notebook across its different generation modes.
Environment Setup
The first cell of the notebook prepares the runtime environment, downloads model checkpoints, and installs custom node extensions required for image and video generation.
Input your Hugging Face (
hf_token) or Civitai (civitai_token) API keys into the designated form fields to authenticate downloads from gated repositories.Review pre-filled links for diffusion models (
img_2_video_modelandref_2_video_model), text encoders, and Video/Audio VAEs (minimax_h3_video_vaeandminimax_h3_audio_vae).Check
download_turbo_lorato enable distilled low-step inference (4–8 steps). To apply custom stylistic or identity LoRAs, toggledownload_lora_1through5toTrueand enter direct model links from Hugging Face or Civitai.Execute Cell 1 and wait for a few minutes for the download and installation of all dependencies.
Uploading Reference Media
Cell 2 handles input management, allowing you to configure the notebook for different workflow modes depending on your requirements:
If you want to generate an image or a video from text only, then you do not need to execute this cell.
If you want to generate an image or a video with one or multiple images or videos, uploading the same files repeatedly for different runs wastes time and bandwidth. To solve this, the Colab notebook now uses a highly efficient, two-step Media Bank architecture.
Instead of uploading files per generation, you upload them once to a persistent local directory and select them by number whenever you need them.
Step 1: Upload & View Media Bank (Cell 2)
This cell acts as your persistent storage folder.
Run the cell and click the Choose Files button. You can select multiple images and audio files at once.
Once the upload completes, the cell automatically generates a visual thumbnail grid for your images and a printed list for your audio files.
Take note of the numbers in the brackets
[ ]above each image or next to each audio file. You will use these numbers to select your media in the next step.
Note: You can run this cell as many times as you want during a session to add new media. It will not delete your previously uploaded files; it just updates the grid with your current inventory.
Step 2: Select Media for Generation (Cell 3)
This is where you tell the model exactly which files from your bank to use for the current generation. Since the files are already on the Colab disk, loading them is instantaneous.
In the Colab form fields, you simply type the index numbers of the media you want to use, separated by commas (e.g.,
1, 3, 4).Anchor Image Number: The image you place here becomes
image 1. The AI model tends to use this image to determine the final aspect ratio of your generated image or video.Additional Image Numbers: Add any other reference images here. The script automatically prevents duplicates, so you don't have to worry about accidentally typing your anchor number again.
Audio Numbers: If your video requires sound, type the corresponding audio index numbers here.
Once you run this cell, the script instantly bundles the correct file paths and dimensions, ready to be injected directly into the video generation in the next cell. If you want to change your inputs for the next run, just change the numbers in Cell 3 and hit play again; no re-uploading is required.
Generating new Media
Cell 4 executes the MiniMax-H3 sampler and renders the final media clip. You can select from 5 modes before executing this cell;
1. Text-to-Image(T2I): Generates an Image from your prompts without requiring initial visual references.
2. Text-to-Video (T2V): Generates motion and synchronized audio from your prompts without requiring initial visual references.
3. Image-to-Image(I2I): Generates an image from your reference image(s). The image above was generated with a simple prompt ("The lady and the man are holding hands in a garden") with the width and height set to 2752x1536. The input images used are shown below:
4. Image-to-Video (I2V) & Keyframing: Animates a single simage or transitions between first-and-last keyframes. It can also use the last frame of a video to extend the video.
5. Reference-to-Video (R2V): Uses multiple reference images (up to 9) to generate videos with multiple shots.
Prompt: The models demonstrates high prompt adherence. You can refer to the MiniMax-H3 Github repo for prompt examples.
Resolution: You can set the target width and height to generate up to 2K images and 1K videos. The width and height should be divisible by 32 to avoid unexpected cropping and scaling of the outputs.
Duration: The models can generate videos with a duration of up to 15 seconds.
Sampling and Seed: The sampler processes latent vectors alongside text embeddings and reference conditions, running at 4–8 steps for the Turbo configuration or 20 to 30 steps for full-weight precision. Setting the seed to zero will result in the generation of a random seed. You can experiment with the different samplers and schedulers but the turbo LoRA uses its own sampler. Note that the turbo LoRA must be one of those from the larryvrh/MiniMax-H3-Turbo-Lora/ huggingface repo as the notebook was configured to work with the LoRAs from the repo. If you want to use another turbo or speedup LoRA, then insert the link in one of the 5 textboxes provided for custom LoRAs in the setup cell and set its strength to a value greater than zero in the Generate Image/Video cell. You can set the strength of a custom LoRA to zero to disable it.
You can run the cell to begin the Image/Video generation.
Although you can generate and edit images with this notebook, you can get better quality by using the the Qwen-Image 2.1 notebook as the Minimax-H3 models are mainly for video generation.
Video Test Result
mode: Reference-to-Video (Ref2VA)






Comments
Post a Comment