Motif-Technologies/Motif-Video-2B

Motif-Technologies
Texto a video

Motif-Video 2B es un modelo abierto de generación de video de 2.000 millones de parámetros de Motif Technologies. Usa un transformer de difusión con rectified flow matching para generar video a partir de texto y también animar una imagen inicial. Está diseñado para lograr buena alineación con prompts, consistencia temporal y detalle visual con un presupuesto de entrenamiento relativamente bajo, usando una arquitectura de tres etapas, Shared Cross-Attention, TREAD y REPA con un profesor V-JEPA.

Como usar

Instalación y uso básico con Diffusers:

pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline

# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained(
    "Motif-Technologies/Motif-Video-2B",
    dtype=torch.bfloat16,
    device_map="cuda"
)

prompt = "A vibrant blue jay perches gracefully on a slender branch, its feathers shimmering in the soft morning light. The bird's keen eyes scan the surroundings, capturing the essence of the tranquil forest. It flutters its wings briefly, showcasing the intricate patterns of blue, white, and black on its plumage. The background reveals a lush canopy of green leaves, with rays of sunlight filtering through, creating a dappled effect on the forest floor. The blue jay then tilts its head, emitting a melodious call that echoes through the serene woodland, adding a touch of magic to the peaceful scene."

image = pipe(prompt).images[0]

Ejemplo texto-a-video:

import torch
from diffusers import MotifVideoPipeline
from diffusers.utils import export_to_video

pipe = MotifVideoPipeline.from_pretrained(
    "Motif-Technologies/Motif-Video-2B",
    torch_dtype=torch.bfloat16,
)
pipe = pipe.to("cuda")

output = pipe(
    prompt="A woman standing in a sunlit field as flower petals swirl around her in slow motion. Each petal floats gently through the golden light, casting tiny shadows. Her hair moves like water, and time seems to stand still.",
    negative_prompt="text overlay, graphic overlay, watermark, logo, subtitles, timestamp, broadcast graphics, UI elements, random letters, frozen pose, rigid, static expression, jerky motion, mechanical motion, discontinuous motion, flat framing, depthless, dull lighting, monotone, crushed shadows, blown-out highlights, shifting background, fading background, poor continuity, identity drift, deformation, flickering, ghosting, smearing, duplication, mutated proportions, inconsistent clothing, flat colors, desaturated, tonally compressed, poor background separation, exposure shift, uneven brightness, color balance shift",
    height=736,
    width=1280,
    num_frames=121,
    num_inference_steps=50,
    frame_rate=24,
)
export_to_video(output.frames[0], "output.mp4", fps=24)

Ejemplo imagen-a-video:

import torch
from diffusers import MotifVideoPipeline
from diffusers.utils import export_to_video, load_image

pipe = MotifVideoImage2VideoPipeline.from_pretrained(
    "Motif-Technologies/Motif-Video-2B",
    torch_dtype=torch.bfloat16,
)
pipe = pipe.to("cuda")

image = load_image("https://huggingface.co/Motif-Technologies/Motif-Video-2B/resolve/main/assets/i2v_sample.jpg")

output = pipe(
    prompt="Three friends stride through a sun-bleached meadow as a warm breeze ripples the tall dry grass around their legs.",
    negative_prompt="text overlay, graphic overlay, watermark, logo, subtitles, timestamp, broadcast graphics, UI elements, random letters, frozen pose, rigid, static expression, jerky motion, mechanical motion, discontinuous motion, flat framing, depthless, dull lighting, monotone, crushed shadows, blown-out highlights, shifting background, fading background, poor continuity, identity drift, deformation, flickering, ghosting, smearing, duplication, mutated proportions, inconsistent clothing, flat colors, desaturated, tonally compressed, poor background separation, exposure shift, uneven brightness, color balance shift",
    image=image,
    height=736,
    width=1280,
    num_frames=121,
    num_inference_steps=50,
    frame_rate=24,
)
export_to_video(output.frames[0], "output.mp4", fps=24)

Requisitos recomendados: Python 3.10+, GPU CUDA con 30 GB o más de VRAM para uso estándar; con CPU offload, FP8 o GGUF puede funcionar en GPUs de 24 GB como RTX 4090 o RTX 3090. Configuración recomendada: resolución 1280x736, 121 frames, 50 pasos de inferencia, 24 fps, scheduler DPMSolver++ y dtype bfloat16 en A100/H100.

Funcionalidades

Generación texto-a-video e imagen-a-video con un único checkpoint.
Produce videos de hasta 720p, 121 fotogramas, aproximadamente 5 segundos a 24 fps.
Arquitectura de 12 capas dual-stream, 16 capas single-stream y 8 capas DDT decoder para separar fusión multimodal, representación conjunta y reconstrucción de detalle.
Shared Cross-Attention para mejorar la alineación texto-video cuando la secuencia de tokens de video es larga.
Entrenado con una receta de bajo presupuesto: menos de 10 millones de clips y menos de 100.000 horas GPU H200.
Compatible con Diffusers, pesos Safetensors, cuantizaciones GGUF y nodos personalizados de ComfyUI.
Soporta inferencia eficiente con CPU offload y cuantización FP8, reduciendo VRAM pico de unos 30 GB a unos 15 GB en GPUs de 24 GB.
Licencia Apache 2.0.

Casos de uso

Crear clips cortos de video a partir de descripciones textuales detalladas.
Animar una imagen inicial manteniendo el encuadre y el sujeto como condición visual.
Prototipar pipelines abiertos de generación de video con Diffusers.
Ejecutar generación de video local en GPUs de alta VRAM o con rutas de inferencia optimizadas para 24 GB.
Integrar generación de video en flujos de ComfyUI mediante nodos personalizados.
Investigación en modelos de video eficientes, alineación texto-video, consistencia temporal y arquitecturas diffusion transformer de bajo presupuesto.