A Quick Guide to Image and Video Generation with Minimax-H3 on Google Colab

 

Couple walking in a garden
A 2k image generated using Minimax-H3

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_model and ref_2_video_model), text encoders, and Video/Audio VAEs (minimax_h3_video_vae and minimax_h3_audio_vae).

  • Check download_turbo_lora to enable distilled low-step inference (4–8 steps). To apply custom stylistic or identity LoRAs, toggle download_lora_1 through 5 to True and 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.

  • For Image to Image/Video, set the num_ref_images slider to 1 or 2 to upload starting/ending images to guide scene composition and subject identity. You can also upload a video for extension.

  • For reference to Image/Video, upload multiple reference images (up to 9) by setting the num_ref_images slider to your desired number of input images.

  • Adjust the num_ref_audios slider above 0 to upload local audio files. MiniMax-H3 conditions on the supplied audio track rather than generating unguided sound.


Generating new Media

Cell 3 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:

  • Lady in her officeMan walking in the street

  • 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





The above 15 seconds video was generated in about 15 minutes on the A100 GPU using the reference to video mode with the following images and settings:



mode: Reference-to-Video (Ref2VA)

prompt: integrated_multimodal_description: [Shot 1]The man is holding hands with the lady in colourful dress and  they are happily moving forward.  [Shot 2]The full backview of the lady in plain dress is shown as she walks towards the man and the lady in colourful dress. [shot 3] The man holds the hand of the lady in  plain dress and all three walk together with the lady in colourful dress to his right and the lady in plain dress to his left. [shot 4] The camera focuses on the smiling faces of all three.


width: 1344

height: 768

duration_seconds: 15

sampler_name: res_multistep

scheduler: beta

steps: 6











Comments

Popular posts from this blog

How to use Wan2.2 Google Colab Notebooks for Image to Video Generation

Generating Long, High-Quality AI Videos with LongCat-Video in ComfyUI (Google Colab Setup)

I dumped Kling AI for these colab notebooks