Download scripts/run_pipeline.py from julius119/verseflow_studio: direct link, hf CLI and curl.
- Browser
- Download file 2.13 kB
-
https://huggingface.co/julius119/verseflow_studio/resolve/main/scripts/run_pipeline.py
- Command line
-
hf download hf://julius119/verseflow_studio/scripts/run_pipeline.py
-
curl -L -o run_pipeline.py https://huggingface.co/julius119/verseflow_studio/resolve/main/scripts/run_pipeline.py
2.13 kB
| """ | |
| VerseFlow Studio v5.0 - 端到端运行测试 | |
| Author: XiaoZhe (Commercial Contact: janejulius119@gmail.com / WeChat: julius119) | |
| """ | |
| import asyncio | |
| import logging | |
| from verseflow.core.orchestrator import VerseFlowV5TaskContext, TaskState | |
| from verseflow.core.dag_engine import DAGWorkflowEngine | |
| from verseflow.kernel.paged_latent_pool import PagedVideoLatentMemoryPool | |
| from verseflow.core.latent_graph_cache import LatentGraphCacheEngine | |
| from verseflow.core.hitl_time_travel import HITLTimeTravelDirector | |
| from verseflow.director.agentic_director import AgenticDirector | |
| logging.basicConfig(level=logging.INFO) | |
| logger = logging.getLogger("VerseFlow.Main") | |
| async def run_pipeline(): | |
| logger.info("==========================================================") | |
| logger.info(" VerseFlow Studio v5.0 次世代 AI 视频操作系统") | |
| logger.info(" Author: XiaoZhe (XiaoZhe AIGC工作室)") | |
| logger.info(" 商用联系: janejulius119@gmail.com / WeChat: julius119") | |
| logger.info("==========================================================") | |
| ctx = VerseFlowV5TaskContext(priority=9) | |
| await ctx.transition_to(TaskState.QUEUED, "任务入队") | |
| # 1. Paged Latent 池化分配 (vLLM Style) | |
| pool = PagedVideoLatentMemoryPool() | |
| allocated_blocks = pool.allocate(ctx.task_id, num_frames=81) | |
| logger.info(f"Paged 显存池分配成功 Blocks: {allocated_blocks}") | |
| # 2. DAG 增量缓存 (ComfyUI Style) | |
| cache = LatentGraphCacheEngine() | |
| node_hash = cache.compute_node_hash("shot_001", {"prompt": "Luxury Watch"}, {}) | |
| cache.store_latent(node_hash, {"latent_tensor": "mock_data"}) | |
| # 3. Agentic Director 拆解 | |
| director = AgenticDirector() | |
| storyboard = director.parse_script_to_storyboard("高端腕表商业广告") | |
| logger.info(f"分镜生成成功: {storyboard[0].prompt}") | |
| # 4. HITL 断点测试 (LangGraph Style) | |
| hitl = HITLTimeTravelDirector() | |
| logger.info("HITL 模块对齐完毕") | |
| pool.free_sequence(ctx.task_id) | |
| await ctx.transition_to(TaskState.SUCCESS, "v5.0 全流程顺利跑通") | |
| if __name__ == "__main__": | |
| asyncio.run(run_pipeline()) |