Skip to content

Commit

Permalink
[release] a superior model checkpoint is added.
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Gu committed Jul 8, 2024
1 parent fa0da08 commit 0af6dab
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ In recent years, generative artificial intelligence has achieved significant adv

## News

* `[2024-07-01]`: Project page, code, technical report and a basic model checkpoint are released. A better checkpoint supporting higher quality video generation will be released very soon. Stay tuned!
* `[2024-07-08]`: 🔥 [A superior model checkpoint](https://huggingface.co/ixaac/MimicMotion/blob/main/MimicMotion_1-1.pth) has been released as version 1.1. The maximum number of video frames has now been expanded from 16 to 72, significantly enhancing the video quality!
* `[2024-07-01]`: Project page, code, technical report and [a basic model checkpoint](https://huggingface.co/ixaac/MimicMotion/blob/main/MimicMotion_1.pth) are released. A better checkpoint supporting higher quality video generation will be released very soon. Stay tuned!

## Quickstart

For the initial released version of the model checkpoint, it supports generating videos with a maximum of 16 frames at a 576x1024 resolution. If you encounter insufficient memory issues, you can appropriately reduce the number of frames.
For the initial released version of the model checkpoint, it supports generating videos with a maximum of 72 frames at a 576x1024 resolution. If you encounter insufficient memory issues, you can appropriately reduce the number of frames.

### Environment setup

Expand Down Expand Up @@ -67,7 +68,7 @@ mkdir models
```
3. Download the pre-trained checkpoint of MimicMotion from [Huggingface](https://huggingface.co/ixaac/MimicMotion)
```
curl -o models/MimicMotion.pth https://huggingface.co/ixaac/MimicMotion/resolve/main/MimicMotion.pth
wget -P models/ https://huggingface.co/ixaac/MimicMotion/resolve/main/MimicMotion_1-1.pth
```
Finally, all the weights should be organized in models as follows
Expand All @@ -79,7 +80,7 @@ models/
│   └── yolox_l.onnx
├── SVD
│  └──stable-video-diffusion-img2vid-xt-1-1
└── MimicMotion.pth
└── MimicMotion_1-1.pth
```
### Model inference
Expand Down
4 changes: 2 additions & 2 deletions configs/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
base_model_path: models/SVD/stable-video-diffusion-img2vid-xt-1-1

# checkpoint path
ckpt_path: models/MimicMotion.pth
ckpt_path: models/MimicMotion_1-1.pth

test_case:
- ref_video_path: assets/example_data/videos/pose1.mp4
ref_image_path: assets/example_data/images/demo1.jpg
num_frames: 16
num_frames: 72
resolution: 576
frames_overlap: 6
num_inference_steps: 25
Expand Down
4 changes: 2 additions & 2 deletions mimicmotion/dwpose/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ def get_video_pose(
"""
# select ref-keypoint from reference pose for pose rescale
ref_pose = dwprocessor(ref_image)
ref_keypoint_id = [0, 1, 2, 5, 8, 11, 14, 15, 16, 17]
ref_keypoint_id = [0, 1, 2, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
ref_keypoint_id = [i for i in ref_keypoint_id \
if ref_pose['bodies']['score'].shape[0] > 0 and ref_pose['bodies']['score'][0][i] > 0.3]
if len(ref_pose['bodies']['subset']) > 0 and ref_pose['bodies']['subset'][0][i] >= .0]
ref_body = ref_pose['bodies']['candidate'][ref_keypoint_id]

height, width, _ = ref_image.shape
Expand Down

0 comments on commit 0af6dab

Please sign in to comment.