From b67e0d6c4b6e7151ea50f2e689e674d22bf487b8 Mon Sep 17 00:00:00 2001 From: "futian.zp" Date: Fri, 19 Sep 2025 12:29:30 +0800 Subject: [PATCH] Update retarget code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 4c85e025e00b130f3b0dd1304719ab78adb1d9c3 Merge: a2c7676 be95343 Author: futian.zp Date: Fri Sep 19 12:01:50 2025 +0800 Merge branch 'HumanAIGC_main' into dev/guangyuan commit a2c7676294455fe081ccf90193a9cd0865ddf355 Author: hooks.hl Date: Fri Sep 19 11:42:46 2025 +0800 微调重定向 commit be953435b45abe0b51090c1174c38f59398f94f6 Merge: 212cbe7 29d4a35 Author: Peng Zhang Date: Fri Sep 19 11:19:23 2025 +0800 Merge branch 'Wan-Video:main' into main commit 212cbe7ccaac39a7e4c3ec4099cf951acc3fa3aa Author: futian.zp Date: Fri Sep 19 10:46:40 2025 +0800 clean codes and add copyright commit 6bf5a3454a132d283750bc14c25bab4353ee528e Author: hooks.hl Date: Fri Sep 19 10:44:30 2025 +0800 微调重定向 commit 4b162d4f6abb442349b5a5521cb56dfa606746fc Merge: b81b475 eb2128a Author: futian.zp Date: Fri Sep 19 10:19:03 2025 +0800 Merge branch 'HumanAIGC_main' into dev/guangyuan commit b81b4750edf564eb73ebe9d74fba0f5fc98dfdb1 Merge: 8c2497b f9ac8bb Author: futian.zp Date: Fri Sep 19 10:17:09 2025 +0800 Merge branch 'HumanAIGC_main' into dev/guangyuan commit eb2128aaec66afdc3a8e0868b981cc787de416fb Author: Peng Zhang Date: Fri Sep 19 10:08:34 2025 +0800 Update Wan-Animate Release date commit f9ac8bb8da21a10c45f9f1afdaafcf6fe498e486 Author: futian.zp Date: Fri Sep 19 09:55:27 2025 +0800 Add Wan-Animate Codes and examples commit 8c2497b7d4562ef0bb187457e90b5b8db38970c7 Author: hooks.hl Date: Fri Sep 19 02:31:50 2025 +0800 update readme commit d94cdd347cd8ec2fb447acee84615f3c758fd36e Author: 亦轩 Date: Fri Sep 19 02:24:56 2025 +0800 rm old examples commit 18b03c627459d3700d4001f9aa5b673afee2b2e0 Author: 亦轩 Date: Fri Sep 19 02:23:49 2025 +0800 rm old examples commit ed65598f2e108117b2d0896e2707436f4d4e1ec7 Author: 亦轩 Date: Fri Sep 19 02:20:59 2025 +0800 add examples commit 7fda5eb385a7ab4e06d1652cabbe2396e0ea42af Author: 亦轩 Date: Fri Sep 19 02:07:33 2025 +0800 update readme commit ab2e86efcb85da5819afc4d9a22e0d048a6598f0 Author: 亦轩 Date: Fri Sep 19 01:59:11 2025 +0800 update reademe commit e49eec580a51735deaafac986cc536f6a1f3bc03 Author: 亦轩 Date: Fri Sep 19 01:46:28 2025 +0800 update code commit 1d648ac350116a03bc69f8d5cbd1ef7a659aca4a Merge: d6a187f 47678d1 Author: futian.zp Date: Fri Sep 19 01:04:50 2025 +0800 Merge branch 'github_main' into dev/guangyuan commit d6a187fcc2bbdd867e26452d35120fe9f517cd9f Author: hooks.hl Date: Fri Sep 19 00:52:44 2025 +0800 pose修复后微小修改 commit 212fa1388401d0499b824e5a3694f2a960b09df9 Merge: 82d6f70 8a5ef45 Author: 亦轩 Date: Fri Sep 19 00:23:19 2025 +0800 Merge branch 'dev/guangyuan' of http://gitlab.alibaba-inc.com/AIClothes_dev/Wan2.2 into dev/guangyuan commit 82d6f70579c17301290aa9736c65750c8c4433ad Author: 亦轩 Date: Fri Sep 19 00:22:53 2025 +0800 解决和线上效果对比齐问题,pose提取器加入det commit 8a5ef458c474afaab9e28c020e28e39735c5cbf2 Author: hooks.hl Date: Thu Sep 18 20:26:41 2025 +0800 重定向scale修改,zuoyi commit f762eab6c52f1c628d1d222b445402cbd6a0c2b1 Author: baijin.xh Date: Thu Sep 18 20:17:04 2025 +0800 update README commit a696126f195f204a28594b49eb7a0da9e2ec9274 Author: 云浅 Date: Thu Sep 18 18:10:33 2025 +0800 fix outframe bug commit 312e5164ca09083db9631ef221ca0c092e28616f Author: hooks.hl Date: Thu Sep 18 17:46:16 2025 +0800 重定向scale修改,zuoyi commit 6089b2248fe979092f0b758deb3ce3f7c0efc8a2 Author: hooks.hl Date: Thu Sep 18 17:24:15 2025 +0800 重定向scale修改,zuoyi commit 23dbe3ba08f6d08cabe9a34e1e1cf4bd7430cbef Author: hooks.hl Date: Thu Sep 18 17:20:00 2025 +0800 重定向scale修改,zuoyi commit 9cb1b5be3f2b004274349cde423dda786b27d836 Merge: 55936cc f01768b Author: 剑匣 Date: Thu Sep 18 17:07:46 2025 +0800 Merge branch 'dev/guangyuan' of http://gitlab.alibaba-inc.com/AIClothes_dev/Wan2.2 into dev/guangyuan commit 55936cc8627081508f51826b41cf7b73e27fcbe4 Author: 剑匣 Date: Thu Sep 18 17:07:23 2025 +0800 修改retarget和sam commit f01768b4088e9c69d0728fa507e9215f2f4c9e54 Author: hooks.hl Date: Thu Sep 18 17:02:17 2025 +0800 重定向scale修改,zuoyi commit 5ec6a7405286a0312dc055c99d3b8f52ccbd7037 Author: hooks.hl Date: Thu Sep 18 15:14:34 2025 +0800 重定向scale修改,zuoyi commit 251fb849aea50499b606beb07343a5fdce4413bc Author: hooks.hl Date: Thu Sep 18 15:13:43 2025 +0800 重定向scale修改,zuoyi commit 5768c56114e2e4f12a060597fd000a110d2ff50e Author: hooks.hl Date: Thu Sep 18 13:58:42 2025 +0800 重定向改,zuoyi commit d780c64e0e82dfa9a21700182a5bb182f446a7e3 Author: hooks.hl Date: Thu Sep 18 10:30:23 2025 +0800 一些改进,zuoyi commit 11716370a69d1533d3ba7524c993478528defcb0 Author: futian.zp Date: Wed Sep 17 22:03:05 2025 +0800 add refer to preprocessing userguider.md commit eb9b6138e0a0ba8dae302e8b744e5d6f16a46dc4 Author: futian.zp Date: Wed Sep 17 21:59:40 2025 +0800 update wan-animate project page url commit ae4000c2c5637641d19780d08ce214321408a3c9 Author: hooks.hl Date: Wed Sep 17 19:55:52 2025 +0800 增加一些重定向设置 commit a155c16a6bac3cd959bcc2b1c7a61728272fd00b Author: hooks.hl Date: Wed Sep 17 17:55:13 2025 +0800 预处理指导2 commit 9445672e5e4c7e3ebdead52c62951e6be9397626 Author: hooks.hl Date: Wed Sep 17 17:53:06 2025 +0800 预处理指导2 commit 03c8b4e8cbd9025857efaa3efde70d517d0fdfc9 Merge: e316950 ef20425 Author: 亦轩 Date: Wed Sep 17 17:48:25 2025 +0800 Merge branch 'dev/guangyuan' of http://gitlab.alibaba-inc.com/AIClothes_dev/Wan2.2 into dev/guangyuan commit e316950433546b6eb4ec1f4ac4e6ba6646cedb21 Author: 亦轩 Date: Wed Sep 17 17:47:52 2025 +0800 修复bug测试通过 commit ef204254bce7b876b142ac939b89eebcbb36e23c Author: hooks.hl Date: Wed Sep 17 17:35:08 2025 +0800 预处理指导 commit 4076a331b8258bb9752939a9efb154eb18dbeae8 Author: hooks.hl Date: Wed Sep 17 15:01:23 2025 +0800 针对预处理,修改了文件组织,修改了接口参数,增加了注释.zuoyi commit cd44ab808d5ae1420b89ab8d965b172d5bb6b7ec Author: futian.zp Date: Tue Sep 16 18:02:25 2025 +0800 update readme commit 5fc8f56c68160f10917864a2114bbcbf56314fd1 Author: kelseyee <971704395@qq.com> Date: Tue Sep 16 17:48:49 2025 +0800 update readme commit 98b76aab7687a3f1b0af0d6be51534b71b7d83f7 Author: kelseyee <971704395@qq.com> Date: Tue Sep 16 17:44:13 2025 +0800 update readme commit 12611b104ba5bd22a371e637cb5d2cacb573bcdf Author: 亦轩 Date: Mon Sep 15 20:12:01 2025 +0800 添加预处理需要的环境及examples commit 2831e3c8c4630e5cbe25d4805c3e7b92d97837ed Author: 亦轩 Date: Mon Sep 15 19:59:38 2025 +0800 添加预处理流程 commit 939d6a4167c0e57baabb14e412135cc303d277ff Author: 亦轩 Date: Thu Sep 11 16:16:31 2025 +0800 task name animate_14B->animate-14B commit c1db00e9a21073fd70260751517cd735bf8f1f96 Author: 亦轩 Date: Thu Sep 11 09:54:44 2025 +0800 update code commit 88efac73b0257a7d446b9c236a9de3abd991a58e Author: root Date: Tue Sep 9 23:46:52 2025 +0800 update readme and add example commit d1e8e534023bbc8936a5a3debe70566bdf4ea154 Author: hooks.hl Date: Tue Sep 9 17:08:48 2025 +0800 代码整理,注释,by 佐弋 commit c1a755743a48409d0191262b6e6b5374b84f4400 Author: futian.zp Date: Mon Sep 8 21:11:31 2025 +0800 Update README.md with Wan-Animate info commit c6ce43b251f81571662a52a465ee9ab4a33e6c13 Merge: 0f79b26 13d3d84 Author: futian.zp Date: Mon Sep 8 14:59:35 2025 +0800 Merge commits from github main branch commit 0f79b2644907e615486d1c4eadc5cae29922016f Merge: 1cd067f ee56ce8 Author: suruoxi Date: Mon Sep 8 14:38:48 2025 +0800 merge main into dev/guangyuan commit 1cd067ff1eaaae5fb6e95a366caf196823e952ed Author: root Date: Mon Sep 8 13:59:09 2025 +0800 wan-animate code update commit c132bd21d633757c8de11b18ffd8c781f031a021 Author: root Date: Mon Sep 8 10:23:47 2025 +0800 wan-animate update commit d423fcaa62361f58c5888f9550bc47de5c03424a Author: ranqing.rq Date: Thu Aug 28 14:37:25 2025 +0800 update code --- wan/modules/animate/preprocess/retarget_pose.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wan/modules/animate/preprocess/retarget_pose.py b/wan/modules/animate/preprocess/retarget_pose.py index a011f69f..5a2a0b10 100644 --- a/wan/modules/animate/preprocess/retarget_pose.py +++ b/wan/modules/animate/preprocess/retarget_pose.py @@ -635,6 +635,13 @@ def retarget_pose(src_skeleton, dst_skeleton, all_src_skeleton, src_skeleton_edi scale_min_edit = np.sqrt(src_skeleton_edit['height'] * src_skeleton_edit['width']) / np.sqrt(dst_skeleton_edit['height'] * dst_skeleton_edit['width']) scale_ratio_flag = True + if dst_skeleton_edit['keypoints_body'][0] != None and dst_skeleton_edit['keypoints_body'][8] != None and dst_skeleton_edit['keypoints_body'][11] != None and \ + dst_skeleton_edit['keypoints_body'][0][1] < 1 and dst_skeleton_edit['keypoints_body'][8][1] < 1 and dst_skeleton_edit['keypoints_body'][11][1] < 1 and \ + dst_skeleton_edit['keypoints_body'][0][2] > 0.5 and dst_skeleton_edit['keypoints_body'][8][2] > 0.5 and dst_skeleton_edit['keypoints_body'][11][2] > 0.5: + if dst_skeleton['keypoints_body'][8] == None or dst_skeleton['keypoints_body'][11] == None or \ + dst_skeleton['keypoints_body'][8][2] < 0.5 or dst_skeleton['keypoints_body'][11][2] < 0.5: + scale_ratio_flag = True + # Flux may change the scale, compensate for it here ratio_src = calculate_scale_ratio(src_skeleton, src_skeleton_edit, scale_ratio_flag) ratio_dst = calculate_scale_ratio(dst_skeleton, dst_skeleton_edit, scale_ratio_flag)