ViMax
ApplicationHKUDS/ViMax
Agentic video generation system from ideas, novels, or scripts.
Overview
ViMax is an all-in-one agentic video generation platform that acts as director, screenwriter, producer, and video generator. It takes raw concepts, complete novels, or screenplays and autonomously creates storyboards, characters, and final videos. Features include Idea2Video, Novel2Video, Script2Video, and AutoCameo modes.
README Preview
\n \n \n \n\n ViMax: Agentic Video Generation\n\n \n \n\n \n \n \n \n \n\n \n \n \n \n\n \n \n \n\n\n\n \n\n \n \n\n \n \n \n\n\n\n---\n\n### 🚨 Current Video Generation Limitations:\n- ❌ **Limited to Short Clips** - Most AI tools generate only seconds of footage. \n- ❌ **Consistency Chaos** - Characters and scenes change unpredictably across frames. \n- ❌ **Visual-Only Focus** - Missing scripts, audio, narrative structure, and storytelling depth. \n\n### 💡 ViMax Solution:\n🎬 **Director**, **Screenwriter**, **Producer**, and **Video Generator** **All-in-One**! We're exploring a future where AI becomes a complete creative powerhouse. 💡 Simply input your concept. ViMax autonomously handles the rest. It orchestrates scriptwriting, storyboarding, character creation, and final video generation—all end-to-end. 🚀\n\nhttps://github.com/user-attachments/assets/5bad46b2-8276-4e1d-9480-3522640744b2\n\n\n\n\n\n---\n\n\n## 📑 Table of Contents\n\n- [💡 Key Features](#key-features)\n- [🔮 Demos](#Video-Demos-Generated-from-Scratch)\n- [🏗️ Architecture](#️-architecture)\n- [🚀 Quick Start](#quick-start)\n\n---\n## 💡Key Features\n\n\n\n\n\n\n\n\n🌟 Idea2Video\n\n\n\n \n\n\n\nFrom Spark to Screen\n\n\n\nTransform raw ideas into complete video stories through intelligent multi-agent workflows automating storytelling, character design, and production .\n\n\n\n\n\n\n\n\n\n🎨 Novel2Video\n\n\n\n \n\n\n\nSmart Literary Adaptation Engine\n\n\n\nTransform complete novels into episodic video content with intelligent narrative compression, character tracking, and scene-by-scene visual adaptation\n\n\n\n\n\n\n\n\n⚙️ Script2Video\n\n\n\n \n\n\n\nUnlimited Screenplay Video Creation\n\n\n\nUnleash your creativity by writing any screenplay from personal stories to epic adventures, giving you complete control over every aspect of your visual storytelling.\n\n\n\n\n\n\n\n\n\n\n🤳 AutoCameo\n\n\n\n \n\n\n\nGenerate Video from Your Photo\n\n\n\n Crea
FAQ (2)
TroubleshootingHow to fix LangChain OutputParserException when the LLM returns null for non-Optional Pydantic fields?
The error occurs because Pydantic rejects null for required fields typed as int, bool, or str. Make every field that the LLM may return as null Optional and give it a default of None:
from typing import Optional
from pydantic import BaseModel, Field, model_validator
class CameraParentItem(BaseModel):
parent_cam_idx: Optional[int] = Field(
default=None,
description="The index of the parent camera. Use null for the root camera.",
examples=[0, 1, None],
)
parent_shot_idx: Optional[int] = Field(
default=None,
description="The index of the dependent shot. Use null for the root shot.",
examples=[0, 3, None],
)
reason: Optional[str] = Field(
default=None,
description="The reason for selecting the parent camera.",
)
is_parent_fully_covers_child: Optional[bool] = Field(
default=None,
description="Whether the parent camera fully covers the child camera's content.",
examples=[True, False, None],
)
missing_info: Optional[str] = Field(
default=None,
description="Elements in the child shot not covered by the parent shot. Set to null when fully covered.",
)
If only the root item may have null parent references, add validation so non-root items remain valid:
@model_validator(mode="after")
def validate_root_item(self):
if self.parent_cam_idx is None or self.parent_shot_idx is None:
if self.reason is None or "root" not in self.reason.lower():
raise ValueError("Only the root camera/shot may have null parent indices")
return self
Also update the LLM prompt to explicitly state that parent_cam_idx and parent_shot_idx should be null only for the root item; otherwise they must be integers.
TroubleshootingHow to fix "'Novel2MoviePipeline' object has no attribute 'working_dir'" in ViMax?
Define the missing attributes in Novel2MoviePipeline.__init__. The pipeline uses self.working_dir, self.embeddings, and self.novel_compressor without assigning them. Add an initializer such as:
from pathlib import Path
class Novel2MoviePipeline:
def __init__(self, embeddings, novel_compressor, working_dir="output", ...):
self.embeddings = embeddings
self.novel_compressor = novel_compressor
self.working_dir = Path(working_dir)
self.working_dir.mkdir(parents=True, exist_ok=True)
Pass the required dependencies when instantiating the pipeline, and update stale imports to use the current interfaces package. This is fixed by the PR "fix: initialize Novel2MoviePipeline dependencies" for issue #43.