Poetry Backend Compare
This directory prepares a protected local comparison workflow for ancient-poetry teaching videos.
Standard Input
VGen/data/experiments/chusai_standard.json- Fixed
出塞experiment block. - Includes runtime defaults for a ~2 minute teaching video.
- Includes direct compare prompts for the same poem.
- Fixed
Safety
VGen/scripts/utils/gpu_guard.sh- Reads live GPU memory and utilization from
nvidia-smi. - Only treats a GPU as idle when both conditions pass:
memory.used <= GPU_MEM_USED_LIMIT_MButilization.gpu <= GPU_UTIL_LIMIT
- Reads live GPU memory and utilization from
- Default launch mode is
DRY_RUN=1, so the compare launcher only prepares normalized run directories andlaunch.shfiles. - Each generated
launch.shperforms the idle-GPU check again at runtime before it starts any model job. - Each generated
launch.shnow checks the local Qwen3.5 service before it spends GPU time on planning or generation. - If
QWEN35_AUTO_START=1stays enabled, each generatedlaunch.shwill auto-start the local Qwen3.5 service when127.0.0.1:8002is still down.
Qwen Service
VGen/scripts/deploy/check_qwen35_service.sh- Health-checks the local OpenAI-compatible Qwen3.5 endpoint.
- Verifies that the expected served model id is visible from
/models.
VGen/scripts/deploy/start_qwen35_27b_guarded.sh- Picks idle GPUs with the same guard rules before it starts the local vLLM service.
- Supports
FORCE_GPUS=6,7when you want to pin the planner service manually. - Supports
DETACH=1for background startup. - Supports
WAIT_FOR_READY=1to block until/modelsresponds successfully.
Multi-backend Launcher
VGen/scripts/compare/run_poetry_backend_compare.sh- Prepares compare slots for:
wan_vacewan_i2vbernini_rhunyuanvideo
- Planner variants:
agentloopbaseline
- Output layout:
VGen/outputs/compare_poetry/<compare_name>/manifest.jsonVGen/outputs/compare_poetry/<compare_name>/<planner>__<backend>/spec.jsonVGen/outputs/compare_poetry/<compare_name>/<planner>__<backend>/launch.sh
- Prepares compare slots for:
Compare Strategy
- Use the same poem
出塞across all backends. agentloopandbaselinekeep the planning logic fixed within each compare branch.wan_vaceandwan_i2vuse the existing DiffSynth-based pipeline.bernini_rreuses the generated segment reference image(s) and calls localBernini-R-Diffusersin single-GPUr2vmode.hunyuanvideoreuses the first generated segment reference image and calls the local officialHunyuanVideo-1.5/generate.pywrapper ini2vmode.
Typical Use
bash /apdcephfs_sgxy/share_304169095/hunyuan/juliayxzhu/dev/ozhang/VGen/scripts/compare/run_poetry_backend_compare.sh
To actually launch all prepared backends after confirming idle GPUs:
DRY_RUN=0 bash /apdcephfs_sgxy/share_304169095/hunyuan/juliayxzhu/dev/ozhang/VGen/scripts/compare/run_poetry_backend_compare.sh
To start the local Qwen3.5 planner service and pin it to chosen GPUs first:
DETACH=1 WAIT_FOR_READY=1 FORCE_GPUS=6,7 bash /apdcephfs_sgxy/share_304169095/hunyuan/juliayxzhu/dev/ozhang/VGen/scripts/deploy/start_qwen35_27b_guarded.sh
To verify that the planner service is healthy before launching compare jobs:
bash /apdcephfs_sgxy/share_304169095/hunyuan/juliayxzhu/dev/ozhang/VGen/scripts/deploy/check_qwen35_service.sh
To let the compare launcher auto-start the planner service on dedicated cards first:
QWEN35_FORCE_GPUS=0,1 DRY_RUN=0 bash /apdcephfs_sgxy/share_304169095/hunyuan/juliayxzhu/dev/ozhang/VGen/scripts/compare/run_poetry_backend_compare.sh
If you already know which free GPUs are safe and want to pin them manually at launch time:
FORCE_GPUS=6 bash /apdcephfs_sgxy/share_304169095/hunyuan/juliayxzhu/dev/ozhang/VGen/outputs/compare_poetry/<compare_name>/agentloop__bernini_r/launch.sh
For a 2-GPU Wan VACE run:
FORCE_GPUS=6,7 bash /apdcephfs_sgxy/share_304169095/hunyuan/juliayxzhu/dev/ozhang/VGen/outputs/compare_poetry/<compare_name>/agentloop__wan_vace/launch.sh
To summarize a prepared or completed compare run:
python3 /apdcephfs_sgxy/share_304169095/hunyuan/juliayxzhu/dev/ozhang/VGen/scripts/compare/summarize_compare.py
Notes
- The current shell here may not expose
nvidia-smi, so preparation can succeed while actual launch still needs a GPU-visible shell. Bernini-Ruses the localvenv/berniniPython by default.HunyuanVideouses the shared official repo under/apdcephfs_sgxy/share_304169095/hunyuan/juliayxzhu/dev/HunyuanVideo-1.5but is launched only from wrappers insideozhang.- Shared
/Modelsis read-only, so new model downloads must go underozhang/modelsif needed later.