82 Commits

Author SHA1 Message Date
Test User
207020afea feat(cli_demo): add native multi-GPU support via device_map
Add --device_map CLI argument to enable multi-GPU inference without
code modifications. This implements the functionality described in
existing comments at lines 92-93 and 146-150.

Changes:
- Add device_map parameter to generate_video() with options:
  - None (default): Uses sequential CPU offload (backward compatible)
  - 'balanced': Distributes model evenly across GPUs (recommended)
  - 'auto': Automatic device placement by accelerate
  - 'sequential': Fills GPUs one by one in order
- Conditionally enable CPU offload only when device_map is None
- Pass device_map to from_pretrained() for all three pipeline types:
  CogVideoXPipeline, CogVideoXImageToVideoPipeline, CogVideoXVideoToVideoPipeline
- Update module docstring with multi-GPU usage examples
- Add validation for device_map values

Backward compatibility:
- Default behavior unchanged (device_map=None uses CPU offload)
- All existing scripts work without modification

Usage:
  # Multi-GPU with balanced distribution (recommended):
  python cli_demo.py --prompt '...' --model_path THUDM/CogVideoX1.5-5b \
    --device_map balanced

  # Multi-GPU with auto placement:
  python cli_demo.py --prompt '...' --model_path THUDM/CogVideoX1.5-5b \
    --device_map auto
2026-02-19 03:15:01 +00: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
39c6562dc8 format 2025-03-22 15:14:06 +08:00
LittleNyima
2c33c0982b fix import order and deprecate for CVX 2B models 2025-02-26 15:54:58 +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
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
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
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
bf73742c05 docs: enhance CLI demo documentation 2025-01-16 09:34:52 +00:00
OleehyO
4f1cc66815 fix: correct LoRA loading and resolution dimensions
- Fix LoRA loading by specifying 'transformer' component
- Swap width/height order in RESOLUTION_MAP to match actual usage
2025-01-13 10:49:46 +00:00
Erfan Asgari
70ca65300c
upgrade to moviepy v2 2025-01-11 00:18:24 +03:30
OleehyO
36427274d6 style: format import statements across finetune module 2025-01-07 05:54:52 +00:00
OleehyO
ba85627577 [docs] improve help messages in argument parser
Fix and clarify help documentation in parser.add_argument() to better describe command-line arguments.
2025-01-01 15:10:31 +00:00
OleehyO
2508c8353b [bugfix] fix specific resolution setting
Different models use different resolutions, for example, for the CogVideoX1.5 series models, the optimal generation resolution is 1360x768, But for CogVideoX, the best resolution is 720x480.
2025-01-01 15:10:31 +00:00
OleehyO
d3a7d2dc91 Add resolution warning 2024-12-16 11:34:51 +00:00
zR
17996f11f8 update 2024-11-16 10:06:22 +08:00
zR
bb2cb130a0 add width and height 2024-11-12 00:17:19 +08:00
zR
2151a3bdfb update with diffusers 2024-11-11 22:41:28 +08:00
zR
c8c7b62aa1 update diffusers code 2024-11-09 22:07:32 +08:00
zR
b3df832bb6 req update 2024-11-02 20:47:22 +08:00
Yuxuan.Zhang
532f246d7c
Merge pull request #389 from THUDM/CogVideoX_dev
I2V Finetune of CogVIdeoX-5B-I2V
2024-10-05 22:14:52 +08:00
zR
e26c3c426f Merge branch 'CogVideoX_dev' of github.com:THUDM/CogVideo into CogVideoX_dev 2024-10-05 00:05:08 +08:00
Yuxuan.Zhang
111756a6a6
Merge pull request #358 from glide-the/rile
bug fix rife
2024-10-03 13:50:09 +08:00
glide-the
f0098c0662 padding fix 2024-10-03 13:25:55 +08:00
Alexandre Poisson
df3da996d3
Update app.py
Model was not found, so fix it by creating a global variable with the correct path : MODEL = "THUDM/CogVideoX-5b"
Fix typo 'experimental use'
2024-09-29 12:54:08 +02:00
zR
d9e75ce3f5 horse 2024-09-28 16:36:40 +08:00
glide-the
824feef38d rife 2024-09-25 16:51:48 +08:00
sculmh
51162346b6
Update cli_demo.py 2024-09-23 19:34:31 +08:00
sculmh
f7f8c35d9f
Update cli_demo.py 2024-09-23 19:32:02 +08:00
sculmh
b459bd2b00
Update cli_demo.py 2024-09-23 16:54:59 +08:00
sculmh
3e5841dbbb
fix: unexpected num_frames during v2v inference 2024-09-23 16:44:27 +08:00
zR
ee9c0b38ab release cogvlm-llama3-caption 2024-09-19 00:41:14 +08:00
zR
66369a90aa update of readme and hostfile 2024-09-17 23:42:35 +08:00
zR
b410841bcf llm-flux-cogvideox-i2v-tools 2024-09-16 23:01:37 +08:00
zR
775b0e1ba3 update req 2024-09-16 18:26:43 +08:00
zR
1b16921b2e remove streamlit demo since outdate 2024-09-16 18:25:02 +08:00
zR
0a558e0964 app done 2024-09-16 17:55:00 +08:00
zR
6e64359524 finetune and infer upload 2024-09-16 12:02:27 +08:00
zR
098640337d update I2V infer code and draft readme 2024-09-15 16:39:13 +08:00
Yuxuan.Zhang
01f19dad11
Merge pull request #287 from THUDM/CogVideoX_dev
5B-I2V finetune
2024-09-14 18:41:28 +08:00
zR
300fc75c49 diffusers converter update 2024-09-14 15:35:29 +08:00
glide-the
5f7f2e424a 修复padding后帧变化太大引起的图片大小被拉伸 2024-09-14 12:02:34 +08:00
Yuxuan.Zhang
87ad61b531
Merge pull request #272 from THUDM/CogVideoX_dev
discord link update
2024-09-12 10:12:20 +08:00
zR
b43951addd i2v draft 2024-09-10 07:45:24 +08:00
glide-the
e74e1ae52d
Update README.md 2024-09-09 10:28:03 +08:00