Model reference · open weights
Allegro-T2V-40x720P is an open-weight video model from rhymes-ai. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Maker | rhymes-ai |
|---|---|
| Type | Video models |
| Task | Text→video |
| Parameters (lead) | 2.8B |
| Runs with | diffusers |
| Released | 2024-12-17 |
| Popularity | 8 downloads / month |
| Licence | Open weights |
About
Install the necessary requirements.
Ensure Python >= 3.10, PyTorch >= 2.4, CUDA >= 12.4.
It is recommended to use Anaconda to create a new environment (Python >= 3.10) conda create -n rllegro python=3.10 -y to run the following example.
run pip install git+https://github.com/huggingface/diffusers.git torch==2.4.1 transformers==4.40.1 accelerate sentencepiece imageio imageio-ffmpeg beautifulsoup4
Run inference.
import torch
from diffusers import AutoencoderKLAllegro, AllegroPipeline
from diffusers.utils import export_to_video
vae = AutoencoderKLAllegro.from_pretrained("rhymes-ai/Allegro-T2V-40x720P", subfolder="vae", torch_dtype=torch.float32)
pipe = AllegroPipeline.from_pretrained(
"rhymes-ai/Allegro-T2V-40x720P", vae=vae, torch_dtype=torch.bfloat16
)
pipe.to("cuda")
pipe.vae.enable_tiling()
prompt = "A seaside harbor with bright sunlight and sparkling seawater, with many boats in the water. From an aerial view, the boats vary in size and color, some moving and some stationary. Fishing boats in the water suggest that this location might be a popular spot for docking fishing boats."
positive_prompt = """
(masterpiece), (best quality), (ultra-detailed), (unwatermarked),
{}
emotional, harmonious, vignette, 4k epic detailed, shot on kodak, 35mm photo,
sharp focus, high budget, cinemascope, moody, epic, gorgeous
"""
negative_prompt = """
nsfw, lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality,
low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry.
"""
prompt = prompt.format(prompt.lower().strip())
video = pipe(prompt, negative_prompt=negative_prompt, guidance_scale=7.5, max_sequence_length=512, num_inference_steps=100, generator = torch.Generator(device="cuda:0").manual_seed(42)).frames[0]
export_to_video(video, "output.mp4", fps=15)
Use pipe.enable_sequential_cpu_offload() to offload the model into CPU for less GPU memory cost, but the inference time will increase significantly.
(Optional) Interpolate the video to 30 FPS.
It is recommended to use EMA-VFI to interpolate the video from 15 FPS to 30 FPS.
For better visual quality, please use imageio to save the video.
For faster inference such Context Parallel, PAB, please refer to our github repo.
This repo is released under the Apache 2.0 License.
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys allegro-t2v-40x720p for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (allegro-t2v-40x720p below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/videos/generations \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"allegro-t2v-40x720p","prompt":"a drone shot over a forest"}'
Create an account — your API key is available in the console. 5M tokens/month currently included with every new account at launch.