[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-baaivision--NOVA":3,"tool-baaivision--NOVA":64},[4,17,26,40,48,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,2,"2026-04-03T11:11:01",[13,14,15],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":23,"last_commit_at":32,"category_tags":33,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,34,35,36,15,37,38,13,39],"数据工具","视频","插件","其他","语言模型","音频",{"id":41,"name":42,"github_repo":43,"description_zh":44,"stars":45,"difficulty_score":10,"last_commit_at":46,"category_tags":47,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,38,37],{"id":49,"name":50,"github_repo":51,"description_zh":52,"stars":53,"difficulty_score":10,"last_commit_at":54,"category_tags":55,"status":16},519,"PaddleOCR","PaddlePaddle\u002FPaddleOCR","PaddleOCR 是一款基于百度飞桨框架开发的高性能开源光学字符识别工具包。它的核心能力是将图片、PDF 等文档中的文字提取出来，转换成计算机可读取的结构化数据，让机器真正“看懂”图文内容。\n\n面对海量纸质或电子文档，PaddleOCR 解决了人工录入效率低、数字化成本高的问题。尤其在人工智能领域，它扮演着连接图像与大型语言模型（LLM）的桥梁角色，能将视觉信息直接转化为文本输入，助力智能问答、文档分析等应用场景落地。\n\nPaddleOCR 适合开发者、算法研究人员以及有文档自动化需求的普通用户。其技术优势十分明显：不仅支持全球 100 多种语言的识别，还能在 Windows、Linux、macOS 等多个系统上运行，并灵活适配 CPU、GPU、NPU 等各类硬件。作为一个轻量级且社区活跃的开源项目，PaddleOCR 既能满足快速集成的需求，也能支撑前沿的视觉语言研究，是处理文字识别任务的理想选择。",74913,"2026-04-05T10:44:17",[38,14,13,37],{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":23,"last_commit_at":62,"category_tags":63,"status":16},2471,"tesseract","tesseract-ocr\u002Ftesseract","Tesseract 是一款历史悠久且备受推崇的开源光学字符识别（OCR）引擎，最初由惠普实验室开发，后由 Google 维护，目前由全球社区共同贡献。它的核心功能是将图片中的文字转化为可编辑、可搜索的文本数据，有效解决了从扫描件、照片或 PDF 文档中提取文字信息的难题，是数字化归档和信息自动化的重要基础工具。\n\n在技术层面，Tesseract 展现了强大的适应能力。从版本 4 开始，它引入了基于长短期记忆网络（LSTM）的神经网络 OCR 引擎，显著提升了行识别的准确率；同时，为了兼顾旧有需求，它依然支持传统的字符模式识别引擎。Tesseract 原生支持 UTF-8 编码，开箱即用即可识别超过 100 种语言，并兼容 PNG、JPEG、TIFF 等多种常见图像格式。输出方面，它灵活支持纯文本、hOCR、PDF、TSV 等多种格式，方便后续数据处理。\n\nTesseract 主要面向开发者、研究人员以及需要构建文档处理流程的企业用户。由于它本身是一个命令行工具和库（libtesseract），不包含图形用户界面（GUI），因此最适合具备一定编程能力的技术人员集成到自动化脚本或应用程序中",73286,"2026-04-03T01:56:45",[13,14],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":70,"readme_en":71,"readme_zh":72,"quickstart_zh":73,"use_case_zh":74,"hero_image_url":75,"owner_login":76,"owner_name":77,"owner_avatar_url":78,"owner_bio":79,"owner_company":80,"owner_location":80,"owner_email":80,"owner_twitter":80,"owner_website":80,"owner_url":81,"languages":82,"stars":87,"forks":88,"last_commit_at":89,"license":90,"difficulty_score":10,"env_os":91,"env_gpu":92,"env_ram":93,"env_deps":94,"category_tags":104,"github_topics":105,"view_count":23,"oss_zip_url":80,"oss_zip_packed_at":80,"status":16,"created_at":110,"updated_at":111,"faqs":112,"releases":147},2094,"baaivision\u002FNOVA","NOVA","[ICLR 2025] Autoregressive Video Generation without Vector Quantization","NOVA 是一款由北京智源人工智能研究院等机构联合推出的开源视频生成模型，其核心目标是实现高效、高质量的自回归图像与视频生成。传统视频生成方法通常依赖“向量量化”技术将连续数据离散化，这一过程往往会导致信息丢失并影响生成画质。NOVA 创新性地摒弃了这一步骤，直接采用非量化方式，将视频生成重构为时间上的“逐帧预测”和空间上的“逐组预测”，从而在保留更多细节的同时显著提升了生成效率。\n\n该模型具备强大的通用性，能够在单一架构下同时胜任文生图（T2I）和文生视频（T2V）等多种任务，并展现出优秀的零样本生成能力。凭借在 ICLR 2025 上发表的先进成果，NOVA 在多项基准测试中达到了业界领先的性能水平。\n\nNOVA 非常适合人工智能研究人员、算法开发者以及希望探索下一代视频生成技术的创作者使用。对于研究者而言，其开源的代码库、详细的训练评估指南以及重构后的工程架构（支持 Accelerate 等工具）为复现和改进提供了便利；对于开发者，它提供了一个高性能的统一基座以构建多模态应用。无论是希望深入理解非量化自回归机制的学者，还是寻求高质量视频生成解决方案的技术团队，NOVA 都是一个值","NOVA 是一款由北京智源人工智能研究院等机构联合推出的开源视频生成模型，其核心目标是实现高效、高质量的自回归图像与视频生成。传统视频生成方法通常依赖“向量量化”技术将连续数据离散化，这一过程往往会导致信息丢失并影响生成画质。NOVA 创新性地摒弃了这一步骤，直接采用非量化方式，将视频生成重构为时间上的“逐帧预测”和空间上的“逐组预测”，从而在保留更多细节的同时显著提升了生成效率。\n\n该模型具备强大的通用性，能够在单一架构下同时胜任文生图（T2I）和文生视频（T2V）等多种任务，并展现出优秀的零样本生成能力。凭借在 ICLR 2025 上发表的先进成果，NOVA 在多项基准测试中达到了业界领先的性能水平。\n\nNOVA 非常适合人工智能研究人员、算法开发者以及希望探索下一代视频生成技术的创作者使用。对于研究者而言，其开源的代码库、详细的训练评估指南以及重构后的工程架构（支持 Accelerate 等工具）为复现和改进提供了便利；对于开发者，它提供了一个高性能的统一基座以构建多模态应用。无论是希望深入理解非量化自回归机制的学者，还是寻求高质量视频生成解决方案的技术团队，NOVA 都是一个值得关注的强大工具。","\u003Cdiv align=\"center\">\n\n\u003Ch1>Autoregressive Video Generation without Vector Quantization\u003C\u002Fh1>\n\n\u003Cp align=\"center\">\n\u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2412.14169\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FArXiv-2512.14169-%23840707.svg\" alt=\"ArXiv\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FBAAI\u002Fnova-d48w1024-sdxl1024\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F🤗 Demo-T2I-%26840707.svg\" alt=\"T2IDemo\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FBAAI\u002Fnova-d48w1024-osp480\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F🤗 Demo-T2V-%26840707.svg\" alt=\"T2VDemo\">\u003C\u002Fa>\n\u003Ca href=\"http:\u002F\u002Fbitterdhg.github.io\u002FNOVA_page\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FWebpage-NOVA-%237CB4F7.svg\" alt=\"Webpage\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n[Haoge Deng](https:\u002F\u002Fscholar.google.com\u002Fcitations?user=S2sbvjgAAAAJ&hl=zh-CN&oi=ao)\u003Csup>1,4*\u003C\u002Fsup>, [Ting Pan](https:\u002F\u002Fscholar.google.com\u002Fcitations?&user=qQv6YbsAAAAJ)\u003Csup>2,4*\u003C\u002Fsup>, [Haiwen Diao](https:\u002F\u002Fscholar.google.com\u002Fcitations?user=46eCjHQAAAAJ&hl=zh-CN)\u003Csup>3,4*\u003C\u002Fsup>, [Zhengxiong Luo](https:\u002F\u002Fscholar.google.com\u002Fcitations?user=Sz1yTZsAAAAJ&hl=zh-CN)\u003Csup>4*\u003C\u002Fsup>, [Yufeng Cui](https:\u002F\u002Fscholar.google.com\u002Fcitations?user=5Ydha2EAAAAJ&hl=zh-CN)\u003Csup>4\u003C\u002Fsup>\u003Cbr>\n[Huchuan Lu](https:\u002F\u002Fscholar.google.com\u002Fcitations?user=D3nE0agAAAAJ&hl=zh-CN)\u003Csup>3\u003C\u002Fsup>, [Shiguang Shan](https:\u002F\u002Fscholar.google.com\u002Fcitations?user=Vkzd7MIAAAAJ&hl=en)\u003Csup>2\u003C\u002Fsup>, [Yonggang Qi](https:\u002F\u002Fscholar.google.com.tw\u002Fcitations?user=pQNpf7cAAAAJ&hl=zh-CN&oi=ao)\u003Csup>1†\u003C\u002Fsup>, [Xinlong Wang](https:\u002F\u002Fscholar.google.com\u002Fcitations?user=DPz0DjYAAAAJ&hl=zh-CN)\u003Csup>4†\u003C\u002Fsup>\u003Cbr>\n\n[BUPT](https:\u002F\u002Fwww.bupt.edu.cn)\u003Csup>1\u003C\u002Fsup>, [ICT-CAS](http:\u002F\u002Fenglish.ict.cas.cn)\u003Csup>2\u003C\u002Fsup>, [DLUT](https:\u002F\u002Fen.dlut.edu.cn)\u003Csup>3\u003C\u002Fsup>, [BAAI](https:\u002F\u002Fwww.baai.ac.cn\u002Fen)\u003Csup>4\u003C\u002Fsup>\u003Cbr>\n\u003Csup>*\u003C\u002Fsup> Equal Contribution, \u003Csup>†\u003C\u002Fsup> Corresponding Author\n\u003Cbr>\u003Cbr>\u003Cimage src=\"assets\u002Fmodel_overview.png\"\u002F>\n\u003C\u002Fdiv>\n\nWe present **NOVA** (**NO**n-Quantized **V**ideo **A**utoregressive Model), a model that enables autoregressive image\u002Fvideo 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.\n\n## 🚀News\n- ```[Oct 2025]``` Released our next video generation model 🐻 [URSA](https:\u002F\u002Fgithub.com\u002Fbaaivision\u002FURSA).\n- ```[Jul 2025]``` Codebase refactor with **Accelerate**, **OmegaConf** and **Wandb**.\n- ```[Feb 2025]``` Released [Evaluation Guide](.\u002Fdocs\u002Fevaluation.md).\n- ```[Feb 2025]``` Released [Training Guide](.\u002Fdocs\u002Ftraining.md)\n- ```[Jan 2025]``` Accepted by ICLR 2025. [[OpenReview]](https:\u002F\u002Fopenreview.net\u002Fforum?id=JE9tCwe3lp) & [[Poster]](https:\u002F\u002Ficlr.cc\u002Fvirtual\u002F2025\u002Fposter\u002F30117).\n- ```[Dec 2024]``` Released [Project Page](http:\u002F\u002Fbitterdhg.github.io\u002FNOVA_page)\n- ```[Dec 2024]``` Released 🤗 Online Demo (\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FBAAI\u002Fnova-d48w1024-sdxl1024\">\u003Cb>T2I\u003C\u002Fb>\u003C\u002Fa>, \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FBAAI\u002Fnova-d48w1024-osp480\">\u003Cb>T2V\u003C\u002Fb>\u003C\u002Fa>)\n- ```[Dec 2024]``` Released [paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F2412.14169), [weights](#model-zoo), and [Quick Start](#2-quick-start) guide and Gradio Demo [local code](#3-gradio-demo) .\n\n## ✨Hightlights\n\n- 🔥 **Novel Approach**: Non-quantized video autoregressive generation.\n- 🔥 **State-of-the-art Performance**: High efficiency with state-of-the-art t2i\u002Ft2v results.\n- 🔥 **Unified Modeling**: Multi-task capabilities in a single unified model.\n\n## 🗄️Model Zoo\n\u003Ca id=\"model-zoo\">\u003C\u002Fa>\n> See detailed description in [Model Zoo](.\u002Fdocs\u002Fmodel_zoo.md)\n\n### Text to Image\n\u003Ca id=\"text-to-image-weight\">\u003C\u002Fa>\n\n| Model       | Parameters | Resolution | Data |  Weight                                                               | GenEval | DPGBench |\n|:-----------:|:----------:|:----------:|:----:|:---------------------------------------------------------------------:|:--------:|:-------:|\n| NOVA-0.6B   | 0.6B       | 512x512    | 16M  | [🤗 HF link](https:\u002F\u002Fhuggingface.co\u002FBAAI\u002Fnova-d48w1024-sd512)          | 0.75   |   81.76   |\n| NOVA-0.3B   | 0.3B       | 1024x1024  | 600M | [🤗 HF link](https:\u002F\u002Fhuggingface.co\u002FBAAI\u002Fnova-d48w768-sdxl1024)        | 0.67   |   80.60   |\n| NOVA-0.6B   | 0.6B       | 1024x1024  | 600M | [🤗 HF link](https:\u002F\u002Fhuggingface.co\u002FBAAI\u002Fnova-d48w1024-sdxl1024)       | 0.69   |   82.25   |\n| NOVA-1.4B   | 1.4B       | 1024x1024  | 600M | [🤗 HF link](https:\u002F\u002Fhuggingface.co\u002FBAAI\u002Fnova-d48w1536-sdxl1024)       | 0.71   |   83.01   |\n\n### Text to Video\n\u003Ca id=\"text-to-video-weight\">\u003C\u002Fa>\n\n| Model       | Parameters  | Resolution | Data | Weight                                                                | VBench |\n|:-----------:|:-----------:|:----------:|:----:|-----------------------------------------------------------------------|:------:|\n| NOVA-0.6B   | 0.6B        | 33x768x480 | 20M  | [🤗 HF link](https:\u002F\u002Fhuggingface.co\u002FBAAI\u002Fnova-d48w1024-osp480)        |  80.12  |\n\n## 📖Table of Contents\n- [1. Installation](#1-installation)\n  - [1.1 From Source](#from-source)\n  - [1.2 From Git](#from-git)\n- [2. Quick Start](#2-quick-start)\n  - [2.1 Text to Image](#text-to-image-quickstart)\n  - [2.2 Text to Video](#text-to-video-quickstart)\n  - [2.3 Image to Video](#image-to-video-quickstart)\n- [3. Gradio Demo](#3-gradio-demo)\n- [4. Train](#4-train)\n- [5. Inference](#5-inference)\n- [6. Evaluation](#6-evaluation)\n\n## 1. Installation\n### 1.1 From Source\n\n\u003Ca id=\"from-source\">\u003C\u002Fa>\nClone this repository to local disk and install:\n\n```bash\npip install diffusers transformers accelerate imageio-ffmpeg omegaconf wandb\ngit clone https:\u002F\u002Fgithub.com\u002Fbaaivision\u002FNOVA.git\ncd NOVA && pip install .\n```\n\n### 1.2 From Git\n\u003Ca id=\"from-git\">\u003C\u002Fa>\n\nYou can also install from the remote repository **if you have set your Github SSH key**: \n\n```bash\npip install diffusers transformers accelerate imageio-ffmpeg omegaconf wandb\npip install git+ssh:\u002F\u002Fgit@github.com\u002Fbaaivision\u002FNOVA.git\n```\n\n## 2. Quick Start\n### 2.1 Text to Image\n\u003Ca id=\"text-to-image-quickstart\">\u003C\u002Fa>\n\n```python\nimport torch\nfrom diffnext.pipelines import NOVAPipeline\n\nmodel_id = \"BAAI\u002Fnova-d48w768-sdxl1024\"\nmodel_args = {\"torch_dtype\": torch.float16, \"trust_remote_code\": True}\npipe = NOVAPipeline.from_pretrained(model_id, **model_args)\npipe = pipe.to(\"cuda\")\n\nprompt = \"a shiba inu wearing a beret and black turtleneck.\"\nimage = pipe(prompt).images[0]\n    \nimage.save(\"shiba_inu.jpg\")\n```\n\n### 2.2  Text to Video\n\u003Ca id=\"text-to-video-quickstart\">\u003C\u002Fa>\n\n```python\nimport os\nimport torch\nfrom diffnext.pipelines import NOVAPipeline\nfrom diffnext.utils import export_to_image, export_to_video\nos.environ[\"PYTORCH_CUDA_ALLOC_CONF\"] = \"expandable_segments:True\"\n\nmodel_id = \"BAAI\u002Fnova-d48w1024-osp480\"\nlow_memory = False\n\nmodel_args = {\"torch_dtype\": torch.float16, \"trust_remote_code\": True}\npipe = NOVAPipeline.from_pretrained(model_id, **model_args)\n\nif low_memory:\n    # Use CPU model offload routine and expandable allocator if OOM.\n    pipe.enable_model_cpu_offload()\nelse:\n    pipe = pipe.to(\"cuda\")\n\n# Text to Video\nprompt = \"Many spotted jellyfish pulsating under water.\"\nvideo = pipe(prompt, max_latent_length=9).frames[0]\nexport_to_video(video, \"jellyfish.mp4\", fps=12)\n\n# Increase AR and diffusion steps for better video quality.\nvideo = pipe(\n  prompt,\n  max_latent_length=9,\n  num_inference_steps=128,  # default: 64\n  num_diffusion_steps=100,  # default: 25\n).frames[0]\nexport_to_video(video, \"jellyfish_v2.mp4\", fps=12)\n\n# You can also generate images from text, with the first frame as an image.\nprompt = \"Many spotted jellyfish pulsating under water.\"\nimage = pipe(prompt, max_latent_length=1).frames[0, 0]\nexport_to_image(image, \"jellyfish.jpg\")\n```\n\n### 2.3  Image to Video\n\u003Ca id=\"image-to-video-quickstart\">\u003C\u002Fa>\n\n```python\nimport os, torch, PIL.Image, numpy as np\nfrom diffnext.pipelines import NOVAPipeline\nfrom diffnext.utils import export_to_image, export_to_video\nos.environ[\"PYTORCH_CUDA_ALLOC_CONF\"] = \"expandable_segments:True\"\n\nmodel_id = \"BAAI\u002Fnova-d48w1024-osp480\"\nlow_memory = False\n\nmodel_args = {\"torch_dtype\": torch.float16, \"trust_remote_code\": True}\npipe = NOVAPipeline.from_pretrained(model_id, **model_args)\n\nif low_memory:\n    # Use CPU model offload routine and expandable allocator if OOM.\n    pipe.enable_model_cpu_offload()\nelse:\n    pipe = pipe.to(\"cuda\")\n\nprompt = \"Many spotted jellyfish pulsating under water.\"\n\n# Step1: Generate or select an image that matches the resolution 768x480.\nimage = pipe(prompt, max_latent_length=1).frames[0, 0]\nexport_to_image(image, \"jellyfish.jpg\")\n\n# Step2: Use this image to generate subsequent frames.\nvideo = pipe(prompt, image=np.array(PIL.Image.open(\"jellyfish.jpg\")), max_latent_length=9).frames[0]\nexport_to_video(video, \"jellyfish.mp4\", fps=12)\n```\n\n## 3. Gradio Demo\n\n```bash\n# For text-to-image demo\npython scripts\u002Fapp_nova_t2i.py --model \"BAAI\u002Fnova-d48w1024-sdxl1024\" --device 0\n\n# For text-to-video demo\npython scripts\u002Fapp_nova_t2v.py --model \"BAAI\u002Fnova-d48w1024-osp480\" --device 0\n```\n\n## 4. Train\n- See [Training Guide](.\u002Fdocs\u002Ftraining.md)\n\n## 5. Evaluation\n- See [Evaluation Guide](.\u002Fdocs\u002Fevaluation.md)\n\n## 6. Inference\n- See [Inference Guide](.\u002Fdocs\u002Finference.md)\n\n## 📋Todo List\n- [X] [Model zoo](#model-zoo)\n- [X] [Quick Start](#2-quick-start)\n- [X] [Gradio Demo](#3-gradio-demo)\n- [X] [Training guide](#4-train)\n- [X] [Evaluation guide](#5-evaluation)\n- [ ] Inference guide\n- [ ] Prompt Writer\n- [ ] Larger model size\n- [ ] Additional downstream tasks: Image editing, Video editing, Controllable generation\n\n## Citation\nIf you find this repository useful, please consider giving a star ⭐ and citation 🦖:\n```\n@article{deng2025ursa,\n  title={Uniform Discrete Diffusion with Metric Path for Video Generation},\n  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},\n  journal={arXiv preprint arXiv:2510.24717},\n  year={2025}\n}\n```\n```\n@article{deng2024nova,\n  title={Autoregressive Video Generation without Vector Quantization},\n  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},\n  journal={arXiv preprint arXiv:2412.14169},\n  year={2024}\n}\n```\n\n## Acknowledgement\n\nWe thank the repositories: [MAE](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fmae), [MAR](https:\u002F\u002Fgithub.com\u002FLTH14\u002Fmar), [MaskGIT](https:\u002F\u002Fgithub.com\u002Fgoogle-research\u002Fmaskgit), [DiT](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002FDiT), [Open-Sora-Plan](https:\u002F\u002Fgithub.com\u002FPKU-YuanGroup\u002FOpen-Sora-Plan), [CogVideo](https:\u002F\u002Fgithub.com\u002FTHUDM\u002FCogVideo), [FLUX](https:\u002F\u002Fgithub.com\u002Fblack-forest-labs\u002Fflux), [OpenMuse](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fopen-muse) and [CodeWithGPU](https:\u002F\u002Fgithub.com\u002Fseetacloud\u002Fcodewithgpu).\n## License\nCode and models are licensed under [Apache License 2.0](LICENSE).\n","\u003Cdiv align=\"center\">\n\n\u003Ch1>无需向量量化即可实现自回归视频生成\u003C\u002Fh1>\n\n\u003Cp align=\"center\">\n\u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2412.14169\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FArXiv-2512.14169-%23840707.svg\" alt=\"ArXiv\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FBAAI\u002Fnova-d48w1024-sdxl1024\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F🤗 Demo-T2I-%26840707.svg\" alt=\"T2IDemo\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FBAAI\u002Fnova-d48w1024-osp480\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F🤗 Demo-T2V-%26840707.svg\" alt=\"T2VDemo\">\u003C\u002Fa>\n\u003Ca href=\"http:\u002F\u002Fbitterdhg.github.io\u002FNOVA_page\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FWebpage-NOVA-%237CB4F7.svg\" alt=\"Webpage\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n[邓浩格](https:\u002F\u002Fscholar.google.com\u002Fcitations?user=S2sbvjgAAAAJ&hl=zh-CN&oi=ao)\u003Csup>1,4*\u003C\u002Fsup>, [潘婷](https:\u002F\u002Fscholar.google.com\u002Fcitations?&user=qQv6YbsAAAAJ)\u003Csup>2,4*\u003C\u002Fsup>, [刁海文](https:\u002F\u002Fscholar.google.com\u002Fcitations?user=46eCjHQAAAAJ&hl=zh-CN)\u003Csup>3,4*\u003C\u002Fsup>, [罗正雄](https:\u002F\u002Fscholar.google.com\u002Fcitations?user=Sz1yTZsAAAAJ&hl=zh-CN)\u003Csup>4*\u003C\u002Fsup>, [崔宇峰](https:\u002F\u002Fscholar.google.com\u002Fcitations?user=5Ydha2EAAAAJ&hl=zh-CN)\u003Csup>4\u003C\u002Fsup>\u003Cbr>\n[陆虎川](https:\u002F\u002Fscholar.google.com\u002Fcitations?user=D3nE0agAAAAJ&hl=zh-CN)\u003Csup>3\u003C\u002Fsup>, [单世光](https:\u002F\u002Fscholar.google.com\u002Fcitations?user=Vkzd7MIAAAAJ&hl=en)\u003Csup>2\u003C\u002Fsup>, [齐永刚](https:\u002F\u002Fscholar.google.com.tw\u002Fcitations?user=pQNpf7cAAAAJ&hl=zh-CN&oi=ao)\u003Csup>1†\u003C\u002Fsup>, [王新龙](https:\u002F\u002Fscholar.google.com\u002Fcitations?user=DPz0DjYAAAAJ&hl=zh-CN)\u003Csup>4†\u003C\u002Fsup>\u003Cbr>\n\n[北邮](https:\u002F\u002Fwww.bupt.edu.cn)\u003Csup>1\u003C\u002Fsup>, [中科院信工所](http:\u002F\u002Fenglish.ict.cas.cn)\u003Csup>2\u003C\u002Fsup>, [大连理工](https:\u002F\u002Fen.dlut.edu.cn)\u003Csup>3\u003C\u002Fsup>, [百川智能](https:\u002F\u002Fwww.baai.ac.cn\u002Fen)\u003Csup>4\u003C\u002Fsup>\u003Cbr>\n\u003Csup>*\u003C\u002Fsup> 共同第一作者，\u003Csup>†\u003C\u002Fsup> 通讯作者\n\u003Cbr>\u003Cbr>\u003Cimage src=\"assets\u002Fmodel_overview.png\"\u002F>\n\u003C\u002Fdiv>\n\n我们提出了**NOVA**（**NO**n-Quantized **V**ideo **A**utoregressive Model），这是一种能够高效地进行自回归图像\u002F视频生成的模型。**NOVA**将视频生成问题重新定义为对时间维度上的逐帧预测以及空间维度上的逐组预测的非量化自回归建模。**NOVA**具有良好的泛化能力，能够在单一统一的模型中实现多样化的零样本生成。\n\n## 🚀新闻\n- ```[2025年10月]``` 发布了我们的下一代视频生成模型🐻 [URSA](https:\u002F\u002Fgithub.com\u002Fbaaivision\u002FURSA)。\n- ```[2025年7月]``` 使用**Accelerate**、**OmegaConf**和**Wandb**重构代码库。\n- ```[2025年2月]``` 发布了[评估指南](.\u002Fdocs\u002Fevaluation.md)。\n- ```[2025年2月]``` 发布了[训练指南](.\u002Fdocs\u002Ftraining.md)\n- ```[2025年1月]``` 被ICLR 2025接收。[[OpenReview]](https:\u002F\u002Fopenreview.net\u002Fforum?id=JE9tCwe3lp) & [[海报]](https:\u002F\u002Ficlr.cc\u002Fvirtual\u002F2025\u002Fposter\u002F30117)。\n- ```[2024年12月]``` 发布了[项目页面](http:\u002F\u002Fbitterdhg.github.io\u002FNOVA_page)\n- ```[2024年12月]``` 发布了🤗 在线演示（\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FBAAI\u002Fnova-d48w1024-sdxl1024\">\u003Cb>T2I\u003C\u002Fb>\u003C\u002Fa>, \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FBAAI\u002Fnova-d48w1024-osp480\">\u003Cb>T2V\u003C\u002Fb>\u003C\u002Fa>)\n- ```[2024年12月]``` 发布了[论文](https:\u002F\u002Farxiv.org\u002Fabs\u002F2412.14169)，[权重](#model-zoo)，以及[快速入门](#2-quick-start)指南和Gradio演示[本地代码](#3-gradio-demo)。\n\n## ✨亮点\n\n- 🔥 **新颖方法**: 非量化视频自回归生成。\n- 🔥 **最先进性能**: 高效且具备最先进的t2i\u002Ft2v效果。\n- 🔥 **统一建模**: 单一统一模型中的多任务能力。\n\n## 🗄️模型库\n\u003Ca id=\"model-zoo\">\u003C\u002Fa>\n> 更多详细信息请参见[模型库](.\u002Fdocs\u002Fmodel_zoo.md)\n\n### 文本到图像\n\u003Ca id=\"text-to-image-weight\">\u003C\u002Fa>\n\n| 模型       | 参数 | 分辨率 | 数据 | 权重                                                               | GenEval | DPGBench |\n|:-----------:|:----------:|:----------:|:----:|:---------------------------------------------------------------------:|:--------:|:-------:|\n| NOVA-0.6B   | 0.6B       | 512x512    | 16M  | [🤗 HF链接](https:\u002F\u002Fhuggingface.co\u002FBAAI\u002Fnova-d48w1024-sd512)          | 0.75   |   81.76   |\n| NOVA-0.3B   | 0.3B       | 1024x1024  | 600M | [🤗 HF链接](https:\u002F\u002Fhuggingface.co\u002FBAAI\u002Fnova-d48w768-sdxl1024)        | 0.67   |   80.60   |\n| NOVA-0.6B   | 0.6B       | 1024x1024  | 600M | [🤗 HF链接](https:\u002F\u002Fhuggingface.co\u002FBAAI\u002Fnova-d48w1024-sdxl1024)       | 0.69   |   82.25   |\n| NOVA-1.4B   | 1.4B       | 1024x1024  | 600M | [🤗 HF链接](https:\u002F\u002Fhuggingface.co\u002FBAAI\u002Fnova-d48w1536-sdxl1024)       | 0.71   |   83.01   |\n\n### 文本到视频\n\u003Ca id=\"text-to-video-weight\">\u003C\u002Fa>\n\n| 模型       | 参数  | 分辨率 | 数据 | 权重                                                                | VBench |\n|:-----------:|:-----------:|:----------:|:----:|-----------------------------------------------------------------------|:------:|\n| NOVA-0.6B   | 0.6B        | 33x768x480 | 20M  | [🤗 HF链接](https:\u002F\u002Fhuggingface.co\u002FBAAI\u002Fnova-d48w1024-osp480)        |  80.12  |\n\n## 📖目录\n- [1. 安装](#1-installation)\n  - [1.1 从源码](#from-source)\n  - [1.2 从Git](#from-git)\n- [2. 快速入门](#2-quick-start)\n  - [2.1 文本到图像](#text-to-image-quickstart)\n  - [2.2 文本到视频](#text-to-video-quickstart)\n  - [2.3 图像到视频](#image-to-video-quickstart)\n- [3. Gradio演示](#3-gradio-demo)\n- [4. 训练](#4-train)\n- [5. 推理](#5-inference)\n- [6. 评估](#6-evaluation)\n\n## 1. 安装\n### 1.1 从源码\n\n\u003Ca id=\"from-source\">\u003C\u002Fa>\n克隆此仓库到本地磁盘并安装：\n\n```bash\npip install diffusers transformers accelerate imageio-ffmpeg omegaconf wandb\ngit clone https:\u002F\u002Fgithub.com\u002Fbaaivision\u002FNOVA.git\ncd NOVA && pip install .\n```\n\n### 1.2 从Git\n\u003Ca id=\"from-git\">\u003C\u002Fa>\n\n如果您已设置GitHub SSH密钥，也可以直接从远程仓库安装：\n\n```bash\npip install diffusers transformers accelerate imageio-ffmpeg omegaconf wandb\npip install git+ssh:\u002F\u002Fgit@github.com\u002Fbaaivision\u002FNOVA.git\n```\n\n## 2. 快速入门\n### 2.1 文本到图像\n\u003Ca id=\"text-to-image-quickstart\">\u003C\u002Fa>\n\n```python\nimport torch\nfrom diffnext.pipelines import NOVAPipeline\n\nmodel_id = \"BAAI\u002Fnova-d48w768-sdxl1024\"\nmodel_args = {\"torch_dtype\": torch.float16, \"trust_remote_code\": True}\npipe = NOVAPipeline.from_pretrained(model_id, **model_args)\npipe = pipe.to(\"cuda\")\n\nprompt = \"一只穿着贝雷帽和黑色高领毛衣的柴犬。\"\nimage = pipe(prompt).images[0]\n    \nimage.save(\"shiba_inu.jpg\")\n```\n\n### 2.2 文本生成视频\n\u003Ca id=\"text-to-video-quickstart\">\u003C\u002Fa>\n\n```python\nimport os\nimport torch\nfrom diffnext.pipelines import NOVAPipeline\nfrom diffnext.utils import export_to_image, export_to_video\nos.environ[\"PYTORCH_CUDA_ALLOC_CONF\"] = \"expandable_segments:True\"\n\nmodel_id = \"BAAI\u002Fnova-d48w1024-osp480\"\nlow_memory = False\n\nmodel_args = {\"torch_dtype\": torch.float16, \"trust_remote_code\": True}\npipe = NOVAPipeline.from_pretrained(model_id, **model_args)\n\nif low_memory:\n    # 使用CPU模型卸载机制和可扩展分配器以避免显存不足。\n    pipe.enable_model_cpu_offload()\nelse:\n    pipe = pipe.to(\"cuda\")\n\n# 文本生成视频\nprompt = \"许多斑点水母在水下 pulsating。\"\nvideo = pipe(prompt, max_latent_length=9).frames[0]\nexport_to_video(video, \"jellyfish.mp4\", fps=12)\n\n# 增加宽高比和扩散步数以提高视频质量。\nvideo = pipe(\n  prompt,\n  max_latent_length=9,\n  num_inference_steps=128,  # 默认：64\n  num_diffusion_steps=100,  # 默认：25\n).frames[0]\nexport_to_video(video, \"jellyfish_v2.mp4\", fps=12)\n\n# 你也可以从文本生成图像，将第一帧作为图像保存。\nprompt = \"许多斑点水母在水下 pulsating。\"\nimage = pipe(prompt, max_latent_length=1).frames[0, 0]\nexport_to_image(image, \"jellyfish.jpg\")\n```\n\n### 2.3 图像生成视频\n\u003Ca id=\"image-to-video-quickstart\">\u003C\u002Fa>\n\n```python\nimport os, torch, PIL.Image, numpy as np\nfrom diffnext.pipelines import NOVAPipeline\nfrom diffnext.utils import export_to_image, export_to_video\nos.environ[\"PYTORCH_CUDA_ALLOC_CONF\"] = \"expandable_segments:True\"\n\nmodel_id = \"BAAI\u002Fnova-d48w1024-osp480\"\nlow_memory = False\n\nmodel_args = {\"torch_dtype\": torch.float16, \"trust_remote_code\": True}\npipe = NOVAPipeline.from_pretrained(model_id, **model_args)\n\nif low_memory:\n    # 使用CPU模型卸载机制和可扩展分配器以避免显存不足。\n    pipe.enable_model_cpu_offload()\nelse:\n    pipe = pipe.to(\"cuda\")\n\nprompt = \"许多斑点水母在水下 pulsating。\"\n\n# 步骤1：生成或选择一张分辨率为768x480的匹配图像。\nimage = pipe(prompt, max_latent_length=1).frames[0, 0]\nexport_to_image(image, \"jellyfish.jpg\")\n\n# 步骤2：使用这张图像生成后续帧。\nvideo = pipe(prompt, image=np.array(PIL.Image.open(\"jellyfish.jpg\")), max_latent_length=9).frames[0]\nexport_to_video(video, \"jellyfish.mp4\", fps=12)\n```\n\n## 3. Gradio演示\n\n```bash\n# 文本到图像演示\npython scripts\u002Fapp_nova_t2i.py --model \"BAAI\u002Fnova-d48w1024-sdxl1024\" --device 0\n\n# 文本到视频演示\npython scripts\u002Fapp_nova_t2v.py --model \"BAAI\u002Fnova-d48w1024-osp480\" --device 0\n```\n\n## 4. 训练\n- 请参阅[训练指南](.\u002Fdocs\u002Ftraining.md)\n\n## 5. 评估\n- 请参阅[评估指南](.\u002Fdocs\u002Fevaluation.md)\n\n## 6. 推理\n- 请参阅[推理指南](.\u002Fdocs\u002Finference.md)\n\n## 📋待办事项清单\n- [X] [模型库](#model-zoo)\n- [X] [快速入门](#2-quick-start)\n- [X] [Gradio演示](#3-gradio-demo)\n- [X] [训练指南](#4-train)\n- [X] [评估指南](#5-evaluation)\n- [ ] 推理指南\n- [ ] 提示词编写工具\n- [ ] 更大的模型规模\n- [ ] 额外的下游任务：图像编辑、视频编辑、可控生成\n\n## 引用\n如果您觉得本仓库有用，请考虑给个星⭐并引用🦖：\n```\n@article{deng2025ursa,\n  title={用于视频生成的具有度量路径的统一离散扩散},\n  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},\n  journal={arXiv预印本 arXiv:2510.24717},\n  year={2025}\n}\n```\n```\n@article{deng2024nova,\n  title={无需向量量化即可实现的自回归视频生成},\n  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},\n  journal={arXiv预印本 arXiv:2412.14169},\n  year={2024}\n}\n```\n\n## 致谢\n\n我们感谢以下项目：[MAE](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fmae)、[MAR](https:\u002F\u002Fgithub.com\u002FLTH14\u002Fmar)、[MaskGIT](https:\u002F\u002Fgithub.com\u002Fgoogle-research\u002Fmaskgit)、[DiT](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002FDiT)、[Open-Sora-Plan](https:\u002F\u002Fgithub.com\u002FPKU-YuanGroup\u002FOpen-Sora-Plan)、[CogVideo](https:\u002F\u002Fgithub.com\u002FTHUDM\u002FCogVideo)、[FLUX](https:\u002F\u002Fgithub.com\u002Fblack-forest-labs\u002Fflux)、[OpenMuse](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fopen-muse)以及[CodeWithGPU](https:\u002F\u002Fgithub.com\u002Fseetacloud\u002Fcodewithgpu)。\n## 许可证\n代码和模型采用[Apache许可证2.0](LICENSE)授权。","# NOVA 快速上手指南\n\nNOVA 是一款无需向量量化（Non-Quantized）的自回归视频生成模型，支持高效的文生图（T2I）、文生视频（T2V）及图生视频（I2V）任务。本指南帮助开发者快速在本地部署并运行该模型。\n\n## 1. 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**: Linux (推荐) 或 macOS\n*   **Python**: 3.8 及以上版本\n*   **GPU**: 支持 CUDA 的 NVIDIA 显卡（建议显存 16GB 以上以运行高分辨率模型）\n*   **依赖库**: `torch`, `diffusers`, `transformers`, `accelerate` 等\n\n> **提示**：国内用户建议使用国内镜像源加速 Python 包下载，例如阿里云或清华大学镜像源。\n\n## 2. 安装步骤\n\n您可以选择从源码克隆或直接从 Git 仓库安装。\n\n### 方式一：从源码安装（推荐）\n\n```bash\n# 1. 安装基础依赖（建议使用国内镜像源）\npip install diffusers transformers accelerate imageio-ffmpeg omegaconf wandb -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n\n# 2. 克隆仓库\ngit clone https:\u002F\u002Fgithub.com\u002Fbaaivision\u002FNOVA.git\n\n# 3. 进入目录并安装\ncd NOVA && pip install . -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n### 方式二：直接从 Git 安装\n\n如果您已配置好 GitHub SSH Key，可直接通过以下命令安装：\n\n```bash\n# 安装基础依赖\npip install diffusers transformers accelerate imageio-ffmpeg omegaconf wandb -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n\n# 直接安装远程仓库\npip install git+ssh:\u002F\u002Fgit@github.com\u002Fbaaivision\u002FNOVA.git\n```\n\n## 3. 基本使用\n\nNOVA 提供了统一的 `NOVAPipeline` 接口。以下是三种核心任务的最简代码示例。\n\n> **注意**：首次运行时会自动从 Hugging Face 下载模型权重。国内网络若下载缓慢，建议配置 `HF_ENDPOINT` 环境变量或使用镜像站。\n\n### 3.1 文生图 (Text-to-Image)\n\n生成一张 1024x1024 分辨率的图片。\n\n```python\nimport torch\nfrom diffnext.pipelines import NOVAPipeline\n\n# 加载模型 (可选模型见 Model Zoo)\nmodel_id = \"BAAI\u002Fnova-d48w768-sdxl1024\"\nmodel_args = {\"torch_dtype\": torch.float16, \"trust_remote_code\": True}\npipe = NOVAPipeline.from_pretrained(model_id, **model_args)\npipe = pipe.to(\"cuda\")\n\n# 生成图片\nprompt = \"a shiba inu wearing a beret and black turtleneck.\"\nimage = pipe(prompt).images[0]\n    \nimage.save(\"shiba_inu.jpg\")\n```\n\n### 3.2 文生视频 (Text-to-Video)\n\n生成一段视频。为优化显存使用，建议设置 CUDA 内存分配策略。\n\n```python\nimport os\nimport torch\nfrom diffnext.pipelines import NOVAPipeline\nfrom diffnext.utils import export_to_video\n\n# 设置显存优化\nos.environ[\"PYTORCH_CUDA_ALLOC_CONF\"] = \"expandable_segments:True\"\n\nmodel_id = \"BAAI\u002Fnova-d48w1024-osp480\"\nmodel_args = {\"torch_dtype\": torch.float16, \"trust_remote_code\": True}\npipe = NOVAPipeline.from_pretrained(model_id, **model_args)\npipe = pipe.to(\"cuda\")\n\n# 生成视频\nprompt = \"Many spotted jellyfish pulsating under water.\"\nvideo = pipe(prompt, max_latent_length=9).frames[0]\n\n# 保存视频 (fps=12)\nexport_to_video(video, \"jellyfish.mp4\", fps=12)\n```\n\n### 3.3 图生视频 (Image-to-Video)\n\n基于首帧图片生成后续视频序列。\n\n```python\nimport os, torch, PIL.Image, numpy as np\nfrom diffnext.pipelines import NOVAPipeline\nfrom diffnext.utils import export_to_video\n\nos.environ[\"PYTORCH_CUDA_ALLOC_CONF\"] = \"expandable_segments:True\"\n\nmodel_id = \"BAAI\u002Fnova-d48w1024-osp480\"\nmodel_args = {\"torch_dtype\": torch.float16, \"trust_remote_code\": True}\npipe = NOVAPipeline.from_pretrained(model_id, **model_args)\npipe = pipe.to(\"cuda\")\n\nprompt = \"Many spotted jellyfish pulsating under water.\"\n\n# 步骤 1: 先生成或加载一张符合分辨率 (768x480) 的首帧图片\n# 此处演示先生成图片，实际使用中也可读取本地图片\nimage = pipe(prompt, max_latent_length=1).frames[0, 0]\nimage_path = \"jellyfish.jpg\"\nimage.save(image_path)\n\n# 步骤 2: 基于该图片生成视频\nvideo = pipe(\n    prompt, \n    image=np.array(PIL.Image.open(image_path)), \n    max_latent_length=9\n).frames[0]\n\nexport_to_video(video, \"jellyfish_i2v.mp4\", fps=12)\n```\n\n### 💡 显存优化提示\n如果您的显卡显存较小（如遇到 OOM 错误），可以在初始化 pipeline 后启用 CPU 卸载模式：\n\n```python\npipe.enable_model_cpu_offload()\n```","某短视频内容创作团队需要为电商大促快速生成大量高质量、动态连贯的商品展示视频，以替代昂贵且耗时的传统实拍与后期制作。\n\n### 没有 NOVA 时\n- **画质受损严重**：传统视频生成模型依赖向量量化（Vector Quantization）技术压缩数据，导致生成的商品纹理模糊、边缘出现伪影，难以展现高端产品的质感。\n- **工作流割裂低效**：团队需分别使用不同的模型生成首帧图片和后续视频，多任务切换导致流程繁琐，且难以保证画面风格的一致性。\n- **推理成本高昂**：现有方案在生成长序列视频时计算冗余大，生成一段 5 秒高清视频往往需要数分钟甚至更久，无法满足“即时出片”的营销节奏。\n- **零样本泛化能力弱**：面对从未见过的新奇商品或特殊运镜指令，模型往往无法理解，需要针对每类新品重新微调训练，时间成本极高。\n\n### 使用 NOVA 后\n- **无损细节还原**：NOVA 采用非量化自回归架构，直接对像素级数据进行建模，生成的视频完美保留了商品的金属光泽与织物纹理，达到广播级画质。\n- **统一模型多能**：利用 NOVA 的统一建模范式，同一模型即可无缝完成从文生图到文生视频的转换，确保首帧与动态画面风格高度一致，大幅简化流水线。\n- **高效实时生成**：得益于其高效的逐帧与逐集合预测机制，NOVA 将高清视频生成速度提升数倍，显著缩短等待时间，让创意验证几乎实时完成。\n- **强大的零样本适应**：无需任何额外训练，NOVA 即可精准理解复杂的新商品描述与运镜指令，轻松应对各类突发创意需求，实现真正的“即插即用”。\n\nNOVA 通过摒弃向量量化瓶颈，以统一高效的架构彻底解决了视频生成中画质损失与流程割裂的难题，让高质量视频创作变得像文本聊天一样简单快捷。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbaaivision_NOVA_e90f177d.png","baaivision","BAAI-Vision","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fbaaivision_24920407.png","Foundation model fanatics from BAAI.",null,"https:\u002F\u002Fgithub.com\u002Fbaaivision",[83],{"name":84,"color":85,"percentage":86},"Python","#3572A5",100,642,22,"2026-04-02T11:18:11","Apache-2.0","未说明","必需 NVIDIA GPU (代码示例使用 'cuda')，显存需求视模型而定：0.3B-0.6B 模型建议 8GB+，1.4B 模型或高分辨率视频生成建议 16GB-24GB+。支持通过 enable_model_cpu_offload() 在低显存环境下运行。","未说明 (建议 16GB+ 以处理大型视频生成任务)",{"notes":95,"python":91,"dependencies":96},"1. 视频生成时建议设置环境变量 PYTORCH_CUDA_ALLOC_CONF='expandable_segments:True' 以防止显存碎片化导致的 OOM 错误。2. 模型权重需从 Hugging Face 下载，最大模型参数量达 1.4B。3. 支持文本生成图像 (T2I)、文本生成视频 (T2V) 及图像生成视频 (I2V)。4. 低显存用户可启用 CPU 卸载模式 (enable_model_cpu_offload)。",[97,98,99,100,101,102,103],"torch","diffusers","transformers","accelerate","imageio-ffmpeg","omegaconf","wandb",[35,14],[106,107,108,109],"autoregressive-models","diffusion-models","image-generation","video-generation","2026-03-27T02:49:30.150509","2026-04-06T05:35:27.943296",[113,118,123,128,133,138,143],{"id":114,"question_zh":115,"answer_zh":116,"source_url":117},9610,"训练 NOVA 模型的具体配置（如 Batch Size、GPU 数量、迭代次数）是什么？","完整的管道配置示例如下：\n```\nPIPELINE:  \n  MODULES:  \n    model_index: model_zoo\u002Fnova-d48w1024-osp480\u002Fmodel_index.json\n    scheduler: model_zoo\u002Fnova-d48w1024-osp480\u002Fscheduler\n    text_encoder: model_zoo\u002Fnova-d48w1024-osp480\u002Ftext_encoder\n    tokenizer: model_zoo\u002Fnova-d48w1024-osp480\u002Ftokenizer\n    vae: model_zoo\u002Fnova-d48w1024-osp480\u002Fvae\n```\n注意：`target_path` 不是必须的，因为训练器会在 `\u002Ftmp` 下自动创建符号链接。具体的超参数（如学习率、EMA 衰减）建议在您的数据集上进行网格搜索，复现论文结果的关键在于数据而非特定配置。详细配置文件可在 `diffnext\u002Fconfig\u002Fdefaults.py` 或 `configs` 目录中找到。","https:\u002F\u002Fgithub.com\u002Fbaaivision\u002FNOVA\u002Fissues\u002F24",{"id":119,"question_zh":120,"answer_zh":121,"source_url":122},9611,"T2I 和 T2V 模型分别使用什么位置编码？如何从绝对位置编码切换到 RoPE？","官方已采用带有额外 T2I 训练阶段的 RoPE（旋转位置编码），这在 token 较少（如 256x256）时更稳定。如果您想从绝对位置编码（APE）切换到 RoPE：\n1. 在 transformer 的配置文件（`transformer\u002Fconfig.json`）中将 `rotary_pos_embed` 设置为 `true`。\n2. 如果基于训练好的 APE 权重进行微调，通常需要约 1000 步。\n3. 注意：直接切换可能导致梯度爆炸或不稳定，建议检查是否冻结了输入条件的 LayerNorm，或使用官方发布的 512x512 T2I 阶段权重进行初始化。","https:\u002F\u002Fgithub.com\u002Fbaaivision\u002FNOVA\u002Fissues\u002F29",{"id":124,"question_zh":125,"answer_zh":126,"source_url":127},9612,"如何在推理时修改生成图像的分辨率（例如从 1024x1024 改为更低分辨率）？","可以通过更新 Pipeline 中的分辨率设置来实现。主要步骤包括更新 transformer 配置中的 `image_size`、`image_base_size` 和 `video_base_size`，并重置位置编码（PosEmbed）。参考代码逻辑如下：\n```python\ndef update_resolution(self, height: int, width: int):\n    s = self.transformer.config.image_stride\n    pi = self.transformer.image_encoder.patch_embed.patch_size\n    # 更新图像尺寸配置\n    self.transformer._internal_dict[\"image_size\"] = self.transformer.config.image_size = (height, width)\n    self.transformer.image_encoder.image_size = (height \u002F\u002F s, width \u002F\u002F s)\n    # 更新基础尺寸配置\n    self.transformer._internal_dict[\"image_base_size\"] = self.transformer.config.image_base_size = (height \u002F\u002F (s * pi), width \u002F\u002F (s * pi))\n    # 重置位置编码\n    if isinstance(pos_emb, PosEmbed):\n        pos_emb.space_embed = None\n        pos_emb.base_h = h\n        pos_emb.base_w = w\n```\n请确保相应地调整 `video_pos_embed` 和 `video_encoder.pos_embed`。","https:\u002F\u002Fgithub.com\u002Fbaaivision\u002FNOVA\u002Fissues\u002F11",{"id":129,"question_zh":130,"answer_zh":131,"source_url":132},9613,"视频生成中的“运动流”（motion flow）数值是如何计算的？训练时应该用固定值还是计算值？","Motion flow 的计算方法如下：\n1. 计算视频中所有相邻帧之间的光流（optical flow）。\n2. 将这些光流值取平均，得到一个标量。\n3. 该值应直接作为浮点数使用，无需取整。\n在训练时，**不应**将所有样本硬编码为固定值（如 5.0），而应为**每个训练样本单独计算**其 motion flow 值。","https:\u002F\u002Fgithub.com\u002Fbaaivision\u002FNOVA\u002Fissues\u002F10",{"id":134,"question_zh":135,"answer_zh":136,"source_url":137},9614,"在哪里可以找到复现论文表格结果的精确训练配置文件？","精确的配置文件已发布在仓库的 `configs` 目录中，或者查看核心默认配置文件：`diffnext\u002Fconfig\u002Fdefaults.py`。\n维护者指出，复现 Table 2 和 Table 3 结果的关键因素是**数据**，而不是特定的配置参数。对于学习率和 EMA 衰减等超参数，建议根据您的具体数据集运行网格搜索以获得最佳效果。","https:\u002F\u002Fgithub.com\u002Fbaaivision\u002FNOVA\u002Fissues\u002F20",{"id":139,"question_zh":140,"answer_zh":141,"source_url":142},9615,"生成的视频中人物面部出现严重扭曲怎么办？","面部扭曲问题主要是由于训练数据中缺乏足够的人类相关数据导致的。目前的解决方案是等待官方收集和训练更多、更高质量的人类数据。用户可以通过增加包含人脸的高质量视频数据来微调模型以改善此问题，但官方正在致力于通过进一步训练来解决这一局限性。","https:\u002F\u002Fgithub.com\u002Fbaaivision\u002FNOVA\u002Fissues\u002F4",{"id":144,"question_zh":145,"answer_zh":146,"source_url":117},9616,"如何在只有少量 GPU（如 2 张 A100）的情况下进行训练？支持 LoRA 吗？","目前官方训练采用了高学习率的全量微调（full fine-tuning），因此 LoRA 可能无法正常工作或不适用。如果资源有限，官方尚未明确提供针对极低显存环境的完整缩减方案，但社区讨论了 QLoRA 或 LoRA 的可能性。当前建议是参考官方配置，若必须减少资源，可能需要大幅减小 batch size 或分辨率，但这需要自行调整配置并可能影响收敛稳定性。",[]]