IMaloney
|
94a5656836
|
Merge 206760830a9c56a789a2ec59237bb655411751ce into 7a1af7154511e0ce4e4be8d62faa8c5e5a3532d2
|
2026-02-18 22:42:05 -05:00 |
|
Test User
|
206760830a
|
chore: allow tests/ directory in gitignore
|
2026-02-19 03:36:33 +00:00 |
|
Test User
|
15a4b403c4
|
test: add comprehensive tests for batch inference pipeline
|
2026-02-19 03:24:16 +00:00 |
|
Test User
|
2d3f2a4d02
|
feat: add production-grade batch inference pipeline
Implements a comprehensive batch video generation tool that addresses the #1
missing feature for production users: generating multiple videos from a single
batch file instead of one-at-a-time processing.
## New Files
### tools/batch_inference.py
Production-ready batch inference script with:
**Core Features:**
- JSONL input format (one job per line, streaming-friendly)
- Support for all generation types: t2v, i2v, v2v
- Progress tracking with tqdm (progress bar, ETA)
- Robust error handling (logs errors, continues batch)
- Resume capability (tracks completed jobs, skips on restart)
**Input Schema:**
- prompt (required): Text description
- output_name (required): Output filename
- image_path (optional): For i2v generation
- video_path (optional): For v2v generation
- num_frames, guidance_scale, num_inference_steps, seed, width, height (optional)
**Multi-GPU Support:**
- Job-level parallelism via --gpu_id and --num_gpus flags
- Each GPU processes a subset of jobs (round-robin distribution)
- State file prevents duplicate work across processes
**Memory Management:**
- Loads model once, generates sequentially
- CPU offloading enabled by default
- VAE slicing and tiling enabled
### resources/example_batch_*.jsonl
Example batch files demonstrating:
- example_batch_t2v.jsonl: Text-to-video prompts
- example_batch_i2v.jsonl: Image-to-video with image_path
- example_batch_v2v.jsonl: Video-to-video with video_path
## Design Decisions
1. **JSONL over JSON**: Better for large batches, streaming, and manual editing
2. **Reuse generation logic**: Mirrors cli_demo.py patterns for consistency
3. **Single model per batch**: Memory efficient, simpler implementation
4. **State persistence**: JSON state file enables reliable resume
5. **Error isolation**: One failed job doesn't stop the batch
## Usage Examples
# Basic text-to-video
python tools/batch_inference.py --batch_file prompts.jsonl --model_path THUDM/CogVideoX1.5-5B
# Multi-GPU (4 GPUs)
for i in {0..3}; do
CUDA_VISIBLE_DEVICES=$i python tools/batch_inference.py --batch_file batch.jsonl --gpu_id $i --num_gpus 4 &
done
|
2026-02-19 03:15:10 +00:00 |
|
tengjiayan
|
7a1af71545
|
update readme
|
2025-11-04 19:15:43 +08:00 |
|
zRzRzRzRzRzRzR
|
a3429723be
|
update readme
|
2025-11-04 18:10:07 +08:00 |
|
Yuxuan Zhang
|
0e179ee52c
|
Merge pull request #788 from yuting89830/patch-1
Update README_zh.md
|
2025-09-07 20:50:45 +08:00 |
|
311555007
|
7303927cf7
|
Update README_zh.md
|
2025-07-23 22:12:39 +08:00 |
|
Yuxuan Zhang
|
aaab2877ec
|
Merge pull request #774 from emmanuel-ferdman/main
Resolve Python Logger warnings
|
2025-06-17 10:08:33 +08:00 |
|
Emmanuel Ferdman
|
39a007a41f
|
Resolve Python Logger warnings
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
|
2025-05-14 06:23:56 -07:00 |
|
OleehyO
|
e519eced78
|
Update README_zh.md
|
2025-05-14 11:07:02 +08:00 |
|
OleehyO
|
657eee4379
|
Update README_zh.md
|
2025-05-14 11:05:17 +08:00 |
|
OleehyO
|
503a9faa93
|
Update README.md
|
2025-05-14 11:03:41 +08:00 |
|
OleehyO
|
5ab1e2449f
|
Merge pull request #719 from holma91/fix-lora-scale
fix scale bug
|
2025-03-25 18:59:49 +08:00 |
|
OleehyO
|
a01ffd9aba
|
Update cli_demo.py
|
2025-03-25 18:59:11 +08:00 |
|
OleehyO
|
9be282d461
|
Merge branch 'main' into fix-lora-scale
|
2025-03-25 18:58:33 +08:00 |
|
Yuxuan Zhang
|
c624cb0d91
|
Merge pull request #743 from THUDM/CogVideoX_dev
Format
|
2025-03-24 11:30:17 +08:00 |
|
Yuxuan Zhang
|
39c6562dc8
|
format
|
2025-03-22 15:14:06 +08:00 |
|
Yuxuan Zhang
|
b9b0539dbe
|
update
|
2025-03-15 14:27:12 +08:00 |
|
Yuxuan Zhang
|
129c375c85
|
Merge pull request #729 from zhuhz22/riflex
Add friendly link of RIFLEx
|
2025-03-03 10:57:29 +08:00 |
|
Yuxuan Zhang
|
536b705105
|
Merge pull request #730 from THUDM/CogVideoX_dev
Update wechat.jpg
|
2025-03-03 10:56:19 +08:00 |
|
Yuxuan Zhang
|
a691a6dd35
|
Update wechat.jpg
|
2025-03-03 10:52:22 +08:00 |
|
zhuhz22
|
6454293a1d
|
add friendly link of RIFLEx
|
2025-03-01 22:06:39 +08:00 |
|
Yuxuan Zhang
|
887a4c7365
|
Merge pull request #726 from THUDM/CogVideoX_dev
Readme of ddim inverse
|
2025-03-01 09:29:09 +08:00 |
|
Yuxuan Zhang
|
a494fa50cd
|
Merge branch 'CogVideoX_dev' of https://github.com/THUDM/CogVideo into CogVideoX_dev
|
2025-02-27 17:33:23 +08:00 |
|
Yuxuan Zhang
|
4fb6766d7c
|
fix import decord error
|
2025-02-27 17:33:20 +08:00 |
|
Yuxuan Zhang
|
8d90381ba8
|
Merge pull request #722 from THUDM/main
merge
|
2025-02-27 17:32:24 +08:00 |
|
Yuxuan Zhang
|
eb66c9c6dc
|
Merge pull request #709 from LittleNyima/feature/ddim-inversion
Implement DDIM Inversion for CogVideoX
|
2025-02-27 13:24:24 +08:00 |
|
LittleNyima
|
2c33c0982b
|
fix import order and deprecate for CVX 2B models
|
2025-02-26 15:54:58 +08:00 |
|
LittleNyima
|
d6bb910697
|
Merge branch 'THUDM:main' into feature/ddim-inversion
|
2025-02-26 15:22:08 +08:00 |
|
holma91
|
84766d02e8
|
fix scale bug
|
2025-02-24 20:08:27 +01:00 |
|
LittleNyima
|
e0bf395458
|
make the style of argparser consistent with repo
|
2025-02-23 19:41:21 +08:00 |
|
Yuxuan Zhang
|
e44c9f2c83
|
Merge pull request #716 from THUDM/CogVideoX_dev
Update gitignore patterns and project dependencies
|
2025-02-22 17:09:50 +08:00 |
|
OleehyO
|
5be6c0512f
|
Merge remote-tracking branch 'upstream/CogVideoX_dev' into dev
|
2025-02-22 06:06:03 +00:00 |
|
OleehyO
|
4dac252c63
|
[chore] Update gitignore patterns and project dependencies
|
2025-02-22 06:03:53 +00:00 |
|
LittleNyima
|
250a0bce45
|
stable version
|
2025-02-20 05:03:15 +00:00 |
|
LittleNyima
|
58d66c8a08
|
Implement an unverified version that should be further tested
|
2025-02-20 01:39:12 +08:00 |
|
LittleNyima
|
dd76b2b9ea
|
Initialize DDIM Inversion script
|
2025-02-18 09:50:55 +00:00 |
|
Yuxuan Zhang
|
34c6ba22ab
|
Merge pull request #682 from THUDM/main
Synchronize two branches.
|
2025-01-22 09:49:34 +08:00 |
|
Yuxuan Zhang
|
bbe909d7f7
|
Merge pull request #678 from THUDM/CogVideoX_dev
docs: clarify frame number requirements for CogVideoX models
|
2025-01-22 09:47:24 +08:00 |
|
Yuxuan Zhang
|
ea994c75c2
|
Merge pull request #652 from erfanasgari21/moviepy-v2
Update code and requirements to support Moviepy v2
|
2025-01-21 22:29:15 +08:00 |
|
Yuxuan Zhang
|
aa12ed37f5
|
Merge branch 'main' into moviepy-v2
|
2025-01-20 21:46:07 +08:00 |
|
OleehyO
|
d9e2a415e8
|
fix: fix resolution handling for different model types
|
2025-01-20 09:48:17 +00:00 |
|
OleehyO
|
0e26f54cbe
|
docs: clarify frame number requirements for CogVideoX models
Specify that frame numbers must be:
- 16N + 1 (N <= 10) for CogVideoX1.5-5B models
- 8N + 1 (N <= 6) for CogVideoX-2B/5B models
|
2025-01-20 09:43:45 +00:00 |
|
Yuxuan Zhang
|
c1ca70ba67
|
Merge pull request #654 from THUDM/CogVideoX_dev
Support SFT using ZeRO
|
2025-01-20 11:15:50 +08:00 |
|
OleehyO
|
bf73742c05
|
docs: enhance CLI demo documentation
|
2025-01-16 09:34:52 +00:00 |
|
OleehyO
|
bf9c351a10
|
deps: upgrade diffusers to >=0.32.1
|
2025-01-16 09:08:44 +00:00 |
|
OleehyO
|
0e78f20629
|
Merge remote-tracking branch 'upstream/CogVideoX_dev' into dev
|
2025-01-14 04:00:11 +00:00 |
|
Yuxuan Zhang
|
4615479b51
|
move to tools
|
2025-01-14 11:33:02 +08:00 |
|
Yuxuan Zhang
|
7993670957
|
zero_to_bf16
|
2025-01-14 11:31:25 +08:00 |
|