NOVA

baaivisionApache-2.0长期未更新

NOVA 是一种无需向量量化的自回归视频生成方法,用扩散式连续表示替代离散 token,绕开 VQ 编解码器直接生成视频。

[ICLR 2025] Autoregressive Video Generation without Vector Quantization

暂无版本661star21fork同步于 2026-11-07 07:30 UTC

怎么上手

由 README 提炼,执行前请确认
pip install diffusers transformers accelerate imageio-ffmpeg omegaconf wandb
git clone https://github.com/baaivision/NOVA.git
cd NOVA && pip install .
硬件要求按 README 说明

README 未给出显存要求;推理代码默认 pipe.to("cuda"),显存不足时可启用 enable_model_cpu_offload 将模型卸载到 CPU,并设置 PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

NOVA 是无需向量量化的自回归图像/视频生成模型,统一支持文生图、文生视频和图生视频

NOVA 是一种无需向量量化的自回归视频生成方法,用扩散式连续表示替代离散 token,绕开 VQ 编解码器直接生成视频。

核心能力

  • 用非量化自回归建模,逐帧预测时间、逐集合预测空间
  • 一个统一模型覆盖文生图、文生视频、图生视频任务
  • 提供 0.3B 到 1.4B 多个预训练权重,含 512 和 1024 分辨率
  • 基于 diffusers 的 NOVAPipeline 接口,几行代码即可推理
  • 附带 Gradio 本地 Demo 脚本,可快速试用 T2I/T2V

容易踩的坑

推理前需从 Hugging Face 下载对应权重(如 BAAI/nova-d48w1024-osp480),并设置 trust_remote_code=True;视频生成显存不足时需手动开启 low_memory 走 CPU offload,否则易 OOM;图生视频要求输入图像分辨率匹配 768x480。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

0 个版本

暂无 release 数据(可能没有发版,或尚未同步)。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Haoge Deng1,4*, Ting Pan2,4*, Haiwen Diao3,4*, Zhengxiong Luo4*, Yufeng Cui4 Huchuan Lu3, Shiguang Shan2, Yonggang Qi1†, Xinlong Wang4†

    BUPT1, ICT-CAS2, DLUT3, BAAI4 * Equal Contribution, † Corresponding Author

    We present NOVA (NOn-Quantized Video Autoregressive Model), a model that enables autoregressive image/video generation with high efficiency. NOVA reformulates the video generation problem as non-quantized autoregressive modeling of temporal frame-by-frame prediction and spatial set-by-set prediction. NOVA generalizes well and enables diverse zero-shot generation abilities in one unified model.

    🚀News

    ✨Hightlights

    • 🔥 Novel Approach: Non-quantized video autoregressive generation.
    • 🔥 State-of-the-art Performance: High efficiency with state-of-the-art t2i/t2v results.
    • 🔥 Unified Modeling: Multi-task capabilities in a single unified model.

    🗄️Model Zoo

    See detailed description in Model Zoo

    Text to Image

    ModelParametersResolutionDataWeightGenEvalDPGBench
    NOVA-0.6B0.6B512x51216M🤗 HF link0.7581.76
    NOVA-0.3B0.3B1024x1024600M🤗 HF link0.6780.60
    NOVA-0.6B0.6B1024x1024600M🤗 HF link0.6982.25
    NOVA-1.4B1.4B1024x1024600M🤗 HF link0.7183.01

    Text to Video

    ModelParametersResolutionDataWeightVBench
    NOVA-0.6B0.6B33x768x48020M🤗 HF link80.12

    📖Table of Contents

    1. Installation

    1.1 From Source

    Clone this repository to local disk and install:

    pip install diffusers transformers accelerate imageio-ffmpeg omegaconf wandb
    git clone https://github.com/baaivision/NOVA.git
    cd NOVA && pip install .
    

    1.2 From Git

    You can also install from the remote repository if you have set your Github SSH key:

    pip install diffusers transformers accelerate imageio-ffmpeg omegaconf wandb
    pip install git+ssh://[email protected]/baaivision/NOVA.git
    

    2. Quick Start

    2.1 Text to Image

    import torch
    from diffnext.pipelines import NOVAPipeline
    
    model_id = "BAAI/nova-d48w768-sdxl1024"
    model_args = {"torch_dtype": torch.float16, "trust_remote_code": True}
    pipe = NOVAPipeline.from_pretrained(model_id, **model_args)
    pipe = pipe.to("cuda")
    
    prompt = "a shiba inu wearing a beret and black turtleneck."
    image = pipe(prompt).images[0]
        
    image.save("shiba_inu.jpg")
    

    2.2 Text to Video

    import os
    import torch
    from diffnext.pipelines import NOVAPipeline
    from diffnext.utils import export_to_image, export_to_video
    os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "expandable_segments:True"
    
    model_id = "BAAI/nova-d48w1024-osp480"
    low_memory = False
    
    model_args = {"torch_dtype": torch.float16, "trust_remote_code": True}
    pipe = NOVAPipeline.from_pretrained(model_id, **model_args)
    
    if low_memory:
        # Use CPU model offload routine and expandable allocator if OOM.
        pipe.enable_model_cpu_offload()
    else:
        pipe = pipe.to("cuda")
    
    # Text to Video
    prompt = "Many spotted jellyfish pulsating under water."
    video = pipe(prompt, max_latent_length=9).frames[0]
    export_to_video(video, "jellyfish.mp4", fps=12)
    
    # Increase AR and diffusion steps for better video quality.
    video = pipe(
      prompt,
      max_latent_length=9,
      num_inference_steps=128,  # default: 64
      num_diffusion_steps=100,  # default: 25
    ).frames[0]
    export_to_video(video, "jellyfish_v2.mp4", fps=12)
    
    # You can also generate images from text, with the first frame as an image.
    prompt = "Many spotted jellyfish pulsating under water."
    image = pipe(prompt, max_latent_length=1).frames[0, 0]
    export_to_image(image, "jellyfish.jpg")
    

    2.3 Image to Video

    import os, torch, PIL.Image, numpy as np
    from diffnext.pipelines import NOVAPipeline
    from diffnext.utils import export_to_image, export_to_video
    os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "expandable_segments:True"
    
    model_id = "BAAI/nova-d48w1024-osp480"
    low_memory = False
    
    model_args = {"torch_dtype": torch.float16, "trust_remote_code": True}
    pipe = NOVAPipeline.from_pretrained(model_id, **model_args)
    
    if low_memory:
        # Use CPU model offload routine and expandable allocator if OOM.
        pipe.enable_model_cpu_offload()
    else:
        pipe = pipe.to("cuda")
    
    prompt = "Many spotted jellyfish pulsating under water."
    
    # Step1: Generate or select an image that matches the resolution 768x480.
    image = pipe(prompt, max_latent_length=1).frames[0, 0]
    export_to_image(image, "jellyfish.jpg")
    
    # Step2: Use this image to generate subsequent frames.
    video = pipe(prompt, image=np.array(PIL.Image.open("jellyfish.jpg")), max_latent_length=9).frames[0]
    export_to_video(video, "jellyfish.mp4", fps=12)
    

    3. Gradio Demo

    # For text-to-image demo
    python scripts/app_nova_t2i.py --model "BAAI/nova-d48w1024-sdxl1024" --device 0
    
    # For text-to-video demo
    python scripts/app_nova_t2v.py --model "BAAI/nova-d48w1024-osp480" --device 0
    

    4. Train

    5. Evaluation

    6. Inference

    📋Todo List

    Citation

    If you find this repository useful, please consider giving a star ⭐ and citation 🦖:

    @article{deng2025ursa,
      title={Uniform Discrete Diffusion with Metric Path for Video Generation},
      author={Deng, Haoge and Pan, Ting and Zhang, Fan and Liu, Yang and Luo, Zhuoyan and Cui, Yufeng and Shen, Chunhua and Shan, Shiguang and Zhang, Zhaoxiang and Wang, Xinlong},
      journal={arXiv preprint arXiv:2510.24717},
      year={2025}
    }
    
    @article{deng2024nova,
      title={Autoregressive Video Generation without Vector Quantization},
      author={Deng, Haoge and Pan, Ting and Diao, Haiwen and Luo, Zhengxiong and Cui, Yufeng and Lu, Huchuan and Shan, Shiguang and Qi, Yonggang and Wang, Xinlong},
      journal={arXiv preprint arXiv:2412.14169},
      year={2024}
    }
    

    Acknowledgement

    We thank the repositories: MAE, MAR, MaskGIT, DiT, Open-Sora-Plan, CogVideo, FLUX, OpenMuse and CodeWithGPU.

    License

    Code and models are licensed under Apache License 2.0.