ComfyUI-全民舞王-MusePose

news2025/6/24 20:49:59

musepose-demo

项目介绍

  • https://github.com/TMElyralab/MusePose
  • 发布的模型能够根据给定的姿势序列,生成参考图中人物的舞蹈视频,结果质量超越了同一主题中几乎所有当前开源的模型。
  • 发布pose align算法,以便用户可以将任意舞蹈视频与任意参考图像对齐,这显著提高了推理性能并增强了模型的可用性

部署

cd custom_nodes
git clone https://github.com/TMElyralab/MusePose.git
pip install -r requirements.txt
pip install --no-cache-dir -U openmim 
mim install mmengine 
mim install "mmcv>=2.0.1" 
mim install "mmdet>=3.1.0" 
mim install "mmpose>=1.1.0" 

模型下载

cd MusePose
import os
import wget
from tqdm import tqdm

os.makedirs('pretrained_weights', exist_ok=True)

urls = ['https://download.openmmlab.com/mmdetection/v2.0/yolox/yolox_l_8x8_300e_coco/yolox_l_8x8_300e_coco_20211126_140236-d3bd2b23.pth',
        'https://huggingface.co/yzd-v/DWPose/resolve/main/dw-ll_ucoco_384.pth',
        'https://huggingface.co/TMElyralab/MusePose/resolve/main/MusePose/denoising_unet.pth',
        'https://huggingface.co/TMElyralab/MusePose/resolve/main/MusePose/motion_module.pth',
        'https://huggingface.co/TMElyralab/MusePose/resolve/main/MusePose/pose_guider.pth',
        'https://huggingface.co/TMElyralab/MusePose/resolve/main/MusePose/reference_unet.pth',
        'https://huggingface.co/lambdalabs/sd-image-variations-diffusers/resolve/main/unet/diffusion_pytorch_model.bin',
        'https://huggingface.co/lambdalabs/sd-image-variations-diffusers/resolve/main/image_encoder/pytorch_model.bin',
        'https://huggingface.co/stabilityai/sd-vae-ft-mse/resolve/main/diffusion_pytorch_model.bin'
        ]

paths = ['dwpose', 'dwpose', 'MusePose', 'MusePose', 'MusePose', 'MusePose', 'sd-image-variations-diffusers/unet', 'image_encoder', 'sd-vae-ft-mse']

for path in paths:
  os.makedirs(f'pretrained_weights/{path}', exist_ok=True)

# saving weights 
for url, path in tqdm(zip(urls, paths)):
    filename = wget.download(url, f'pretrained_weights/{path}')

config_urls = ['https://huggingface.co/lambdalabs/sd-image-variations-diffusers/resolve/main/unet/config.json',
           'https://huggingface.co/lambdalabs/sd-image-variations-diffusers/resolve/main/image_encoder/config.json',
           'https://huggingface.co/stabilityai/sd-vae-ft-mse/resolve/main/config.json']

config_paths = ['sd-image-variations-diffusers/unet', 'image_encoder', 'sd-vae-ft-mse']

# saving config files 
for url, path in tqdm(zip(config_urls, config_paths)):
    filename = wget.download(url, f'pretrained_weights/{path}')

# renaming model name as given in readme
os.rename('pretrained_weights/dwpose/yolox_l_8x8_300e_coco_20211126_140236-d3bd2b23.pth', 'pretrained_weights/dwpose/yolox_l_8x8_300e_coco.pth')

运行效果

在这里插入图片描述

工作流

{
  "last_node_id": 16,
  "last_link_id": 11,
  "nodes": [
    {
      "id": 5,
      "type": "filenamestring",
      "pos": [
        983,
        765
      ],
      "size": {
        "0": 210,
        "1": 26
      },
      "flags": {},
      "order": 3,
      "mode": 0,
      "inputs": [
        {
          "name": "filenames",
          "type": "VHS_FILENAMES",
          "link": 6,
          "slot_index": 0,
          "label": "filenames"
        }
      ],
      "outputs": [
        {
          "name": "STRING",
          "type": "STRING",
          "links": [
            3
          ],
          "shape": 3,
          "slot_index": 0,
          "label": "STRING"
        }
      ],
      "properties": {
        "Node name for S&R": "filenamestring"
      }
    },
    {
      "id": 13,
      "type": "filenamestring",
      "pos": [
        1241,
        768
      ],
      "size": {
        "0": 210,
        "1": 26
      },
      "flags": {},
      "order": 6,
      "mode": 0,
      "inputs": [
        {
          "name": "filenames",
          "type": "VHS_FILENAMES",
          "link": 8,
          "slot_index": 0,
          "label": "filenames"
        }
      ],
      "outputs": [
        {
          "name": "STRING",
          "type": "STRING",
          "links": [
            9
          ],
          "shape": 3,
          "slot_index": 0,
          "label": "STRING"
        }
      ],
      "properties": {
        "Node name for S&R": "filenamestring"
      }
    },
    {
      "id": 4,
      "type": "museposealign",
      "pos": [
        1077,
        542
      ],
      "size": {
        "0": 315,
        "1": 150
      },
      "flags": {},
      "order": 4,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "link": 4,
          "slot_index": 0,
          "label": "image"
        },
        {
          "name": "video",
          "type": "STRING",
          "link": 3,
          "widget": {
            "name": "video"
          },
          "slot_index": 1,
          "label": "video"
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            7
          ],
          "shape": 3,
          "slot_index": 0,
          "label": "IMAGE"
        }
      ],
      "properties": {
        "Node name for S&R": "museposealign"
      },
      "widgets_values": [
        "",
        512,
        700,
        300,
        0
      ]
    },
    {
      "id": 10,
      "type": "VHS_VideoCombine",
      "pos": [
        371,
        810
      ],
      "size": [
        210,
        641.7777777777778
      ],
      "flags": {},
      "order": 2,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 5,
          "label": "images"
        },
        {
          "name": "audio",
          "type": "VHS_AUDIO",
          "link": null,
          "label": "audio"
        },
        {
          "name": "meta_batch",
          "type": "VHS_BatchManager",
          "link": null,
          "label": "batch_manager"
        }
      ],
      "outputs": [
        {
          "name": "Filenames",
          "type": "VHS_FILENAMES",
          "links": [
            6
          ],
          "shape": 3,
          "slot_index": 0,
          "label": "Filenames"
        }
      ],
      "properties": {
        "Node name for S&R": "VHS_VideoCombine"
      },
      "widgets_values": {
        "frame_rate": 24,
        "loop_count": 0,
        "filename_prefix": "AnimateDiff",
        "format": "video/h264-mp4",
        "pix_fmt": "yuv420p",
        "crf": 19,
        "save_metadata": true,
        "pingpong": false,
        "save_output": false,
        "videopreview": {
          "hidden": false,
          "paused": false,
          "params": {
            "filename": "AnimateDiff_00028.mp4",
            "subfolder": "",
            "type": "temp",
            "format": "video/h264-mp4"
          }
        }
      }
    },
    {
      "id": 11,
      "type": "VHS_VideoCombine",
      "pos": [
        973,
        807
      ],
      "size": [
        390,
        896
      ],
      "flags": {},
      "order": 5,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 7,
          "label": "images"
        },
        {
          "name": "audio",
          "type": "VHS_AUDIO",
          "link": null,
          "label": "audio"
        },
        {
          "name": "meta_batch",
          "type": "VHS_BatchManager",
          "link": null,
          "label": "batch_manager"
        }
      ],
      "outputs": [
        {
          "name": "Filenames",
          "type": "VHS_FILENAMES",
          "links": [
            8
          ],
          "shape": 3,
          "slot_index": 0,
          "label": "Filenames"
        }
      ],
      "properties": {
        "Node name for S&R": "VHS_VideoCombine"
      },
      "widgets_values": {
        "frame_rate": 24,
        "loop_count": 0,
        "filename_prefix": "AnimateDiff",
        "format": "video/h264-mp4",
        "pix_fmt": "yuv420p",
        "crf": 19,
        "save_metadata": true,
        "pingpong": false,
        "save_output": false,
        "videopreview": {
          "hidden": false,
          "paused": false,
          "params": {
            "filename": "AnimateDiff_00029.mp4",
            "subfolder": "",
            "type": "temp",
            "format": "video/h264-mp4"
          }
        }
      }
    },
    {
      "id": 6,
      "type": "LoadImage",
      "pos": [
        592,
        1014
      ],
      "size": {
        "0": 368.78228759765625,
        "1": 444.1121826171875
      },
      "flags": {},
      "order": 0,
      "mode": 0,
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            4,
            10
          ],
          "shape": 3,
          "slot_index": 0,
          "label": "IMAGE"
        },
        {
          "name": "MASK",
          "type": "MASK",
          "links": null,
          "shape": 3,
          "label": "MASK"
        }
      ],
      "properties": {
        "Node name for S&R": "LoadImage"
      },
      "widgets_values": [
        "pic (4).png",
        "image"
      ]
    },
    {
      "id": 9,
      "type": "VHS_LoadVideo",
      "pos": [
        7,
        837
      ],
      "size": [
        357.83404541015625,
        876.5938585069445
      ],
      "flags": {},
      "order": 1,
      "mode": 0,
      "inputs": [
        {
          "name": "meta_batch",
          "type": "VHS_BatchManager",
          "link": null,
          "label": "batch_manager"
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            5
          ],
          "shape": 3,
          "slot_index": 0,
          "label": "IMAGE"
        },
        {
          "name": "frame_count",
          "type": "INT",
          "links": null,
          "shape": 3,
          "label": "frame_count"
        },
        {
          "name": "audio",
          "type": "VHS_AUDIO",
          "links": null,
          "shape": 3,
          "label": "audio"
        },
        {
          "name": "video_info",
          "type": "VHS_VIDEOINFO",
          "links": null,
          "shape": 3,
          "label": "video_info"
        }
      ],
      "properties": {
        "Node name for S&R": "VHS_LoadVideo"
      },
      "widgets_values": {
        "video": "dance.mp4",
        "force_rate": 40,
        "force_size": "Disabled",
        "custom_width": 512,
        "custom_height": 512,
        "frame_load_cap": 0,
        "skip_first_frames": 100,
        "select_every_nth": 1,
        "choose video to upload": "image",
        "videopreview": {
          "hidden": false,
          "paused": false,
          "params": {
            "frame_load_cap": 0,
            "skip_first_frames": 100,
            "force_rate": 40,
            "filename": "dance.mp4",
            "type": "input",
            "format": "video/mp4",
            "select_every_nth": 1
          }
        }
      }
    },
    {
      "id": 14,
      "type": "VHS_VideoCombine",
      "pos": [
        1376,
        803
      ],
      "size": [
        390,
        896
      ],
      "flags": {},
      "order": 8,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 11,
          "label": "images"
        },
        {
          "name": "audio",
          "type": "VHS_AUDIO",
          "link": null,
          "label": "audio"
        },
        {
          "name": "meta_batch",
          "type": "VHS_BatchManager",
          "link": null,
          "label": "batch_manager"
        }
      ],
      "outputs": [
        {
          "name": "Filenames",
          "type": "VHS_FILENAMES",
          "links": [],
          "shape": 3,
          "slot_index": 0,
          "label": "Filenames"
        }
      ],
      "properties": {
        "Node name for S&R": "VHS_VideoCombine"
      },
      "widgets_values": {
        "frame_rate": 60,
        "loop_count": 0,
        "filename_prefix": "AnimateDiff",
        "format": "video/h264-mp4",
        "pix_fmt": "yuv420p",
        "crf": 19,
        "save_metadata": true,
        "pingpong": false,
        "save_output": false,
        "videopreview": {
          "hidden": false,
          "paused": false,
          "params": {
            "filename": "AnimateDiff_00034.mp4",
            "subfolder": "",
            "type": "temp",
            "format": "video/h264-mp4"
          }
        }
      }
    },
    {
      "id": 12,
      "type": "musepose",
      "pos": [
        1465,
        509
      ],
      "size": {
        "0": 315,
        "1": 246
      },
      "flags": {},
      "order": 7,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "link": 10,
          "label": "image"
        },
        {
          "name": "video",
          "type": "STRING",
          "link": 9,
          "widget": {
            "name": "video"
          },
          "label": "video"
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            11
          ],
          "shape": 3,
          "slot_index": 0,
          "label": "IMAGE"
        }
      ],
      "properties": {
        "Node name for S&R": "musepose"
      },
      "widgets_values": [
        "",
        512,
        512,
        1000,
        48,
        4,
        3,
        10,
        12
      ]
    }
  ],
  "links": [
    [
      3,
      5,
      0,
      4,
      1,
      "STRING"
    ],
    [
      4,
      6,
      0,
      4,
      0,
      "IMAGE"
    ],
    [
      5,
      9,
      0,
      10,
      0,
      "IMAGE"
    ],
    [
      6,
      10,
      0,
      5,
      0,
      "VHS_FILENAMES"
    ],
    [
      7,
      4,
      0,
      11,
      0,
      "IMAGE"
    ],
    [
      8,
      11,
      0,
      13,
      0,
      "VHS_FILENAMES"
    ],
    [
      9,
      13,
      0,
      12,
      1,
      "STRING"
    ],
    [
      10,
      6,
      0,
      12,
      0,
      "IMAGE"
    ],
    [
      11,
      12,
      0,
      14,
      0,
      "IMAGE"
    ]
  ],
  "groups": [],
  "config": {},
  "extra": {
    "ds": {
      "scale": 0.6303940863128529,
      "offset": {
        "0": 746.0277438571095,
        "1": 34.665619475590915
      }
    }
  },
  "version": 0.4
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1823022.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

基于Matlab的纸币币值检测系统设计(GUI界面) 【含Matlab源码 MX_004期】

简介: 基于Matlab的纸币币值检测系统是一种利用数字图像处理技术来自动识别和鉴别纸币面额的系统。 图像获取:获取纸币的图像。 预处理:对获取到的图像进行预处理,包括去噪、灰度化、边缘检测等操作,以便后续的处理。…

电脑找不到vcruntime140_1.dll的原因分析及5种解决方法分享

电脑已经成为我们生活和工作中不可或缺的工具。然而,在使用电脑的过程中,我们常常会遇到一些常见的问题,其中之一就是电脑显示vcruntime140_1.dll丢失。那么,这个问题是怎么回事呢?又有哪些解决方法呢?如何…

首期“软件企业 AI 开发提效实战营”成功举办

人工智能是国家战略的重要组成部分,是未来国际竞争的焦点和经济发展的新引擎。随着人工智能科技的飞速发展,软件企业如何借助 AI 工具辅助编程,提升开发效率,成为业界关注的焦点。此前,浙江省软件行业协会携手阿里云成…

GitCode热门开源项目推荐:Spider网络爬虫框架

在数字化高速发展时代,数据已成为企业决策和个人研究的重要资源。网络爬虫作为一种强大的数据采集工具受到了广泛的关注和应用。在GitCode这一优秀的开源平台上,Spider网络爬虫框架凭借其简洁、高效和易用性,成为了众多开发者的首选。 一、系…

网络编程---Java飞机大战联机

解析服务器端代码 代码是放在app/lib下的src下的main/java,而与之前放在app/src/main下路径不同 Main函数 Main函数里只放着创建MyServer类的一行 public static void main(String args[]){new MyServer();} MyServer构造函数 1.获取本机IP地址 //获取本机IP地…

上网行为管理的作用是什么?有哪些上网行为管理软件?

上网行为管理在现代企业及家庭环境中扮演着至关重要的角色,其作用不仅限于提升网络安全性,还涉及保护企业信息安全、提高员工工作效率等多个方面。以下将详细阐述上网行为管理的作用,并介绍几款主流的上网行为管理软件。 一、上网行为管理的作…

CANoe连接Option Scope使用方法

系列文章目录 文章目录 系列文章目录前言一、前提条件二、CANoe配置三、PicoScope接线四、CANoe捕捉报文五、眼图功能前言 本文档主要介绍如何使用CANoe Option .Scope捕获CAN总线上的物理波形,并利用眼图进行分析。 一、前提条件 使用CANoe Option .Scope,需要具备以下条件…

Folx软件下载及安装教程

简介: Folx Pro是一款适合Mac的专业下载工具也是一款BT下载器,Folx中文版有一个支持Retina显示的现代界面,提供独特的系统排序、存储下载内容与预览下载文件。Folx中文官网提供Folx教程、激活码、下载。 安 装 包 获 取 地 址: …

c->c++(一):部分KeyWord

本文主要探讨c相关关键字的使用。 char char默认是unsigned/signed取决平台,wchar_t宽字符:用于Unicode编码(超过一个字节),用wcin和wcout输入输出,字符串为wstring char8_t(20),char16_t(11起),char32_t(11):指定占用字节数且是无符号,字符串类u8string,u16s…

传闻Google谷歌代投印度slots游戏广告效果备受关注

传闻Google谷歌代投印度slots游戏广告效果备受关注 在印度,随着互联网的普及和移动设备的广泛使用,网络游戏和在线娱乐产业逐渐兴起。其中,“slots游戏”作为一种受欢迎的在线博彩形式,吸引了大量玩家。对于广告主而言&#xff0…

这世上又多了一只爬虫(spiderflow)

让我们一起默念: 爬虫爬虫爬虫爬虫爬虫爬虫爬虫爬虫爬虫爬虫爬虫爬虫爬虫爬虫爬虫爬虫爬虫爬虫爬虫爬虫爬虫爬虫爬虫 接着大声喊出来: 一!只!爬!虫!呀!爬!呀!爬&#xf…

解析FTP服务器:从基础知识到vsftpd实战操作

✨✨ 欢迎大家来访Srlua的博文(づ ̄3 ̄)づ╭❤~✨✨ 🌟🌟 欢迎各位亲爱的读者,感谢你们抽出宝贵的时间来阅读我的文章。 我是Srlua小谢,在这里我会分享我的知识和经验。&am…

惠海 H6213L降压恒压IC 支持3.3V5V12V30V40V60V100V电动车仪表供电稳压芯片方案

H6213L高压降压开关控制器是一款功性能良好的电源管理解决方案。它集成了众多先进的功能,使其在各种高压输入的应用场景中都能表现出色。 首先,H6213L具备高达150V的耐压能力,并支持高达120V的宽压输入范围。这意味着它可以轻松应对各种高压…

时间卷积网络与膨胀卷积:深入理解其原理与应用

TCN, Temporal Convolutional Networks 时间卷积网络与膨胀卷积:深入理解其原理与应用一、时间卷积网络(TCN)简介二、膨胀卷积的核心概念1. **膨胀卷积(Dilated Convolution)**2. **Kernel(卷积核&#xff…

Rejetto HTTP文件服务器 未授权RCE漏洞复现(CVE-2024-23692)

0x01 产品简介 Rejetto HTTP File Server(HFS)是一个基于HTTP协议的文件服务器软件,旨在为用户提供简单、轻量级且易于使用的文件共享解决方案。功能强大、易于使用的文件服务器软件,无论是个人使用还是团队协作,HFS都能满足用户的需求,提高工作效率。 0x02 漏洞概述 …

Zig标准库:最全数据结构深度解析(2)

1.1 queue structures LinearFifo:缓冲区是FIFO内部的一个组成部分,其大小按照指定的尺寸设定。初始化时,这个缓冲区是以切片的形式传递给初始化函数的。为了动态管理缓冲区,使用了一个名为mem.Allocator的内存分配器。 fifo.zi…

鸿蒙轻内核Kconfig使用笔记

鸿蒙轻内核使用Kconfig进行图形化配置,本文专门讲解下鸿蒙轻内核LiteOS-M和LiteOS-A的图形化配置方法。本文中所涉及的源码,均可以在开源站点 https://gitee.com/openharmony/kernel_liteos_a 、 https://gitee.com/openharmony/kernel_liteos_m 获取。本…

【NLP练习】Transformer中的位置编码

🍨 本文为🔗365天深度学习训练营 中的学习记录博客🍖 原作者:K同学啊 一、什么是位置编码 1. 位置编码定义 Transformer 模型中的位置编码是为了在处理序列数据时引入位置信息,以便模型能够分辨输入序列中不同位置的词…

Cask ‘oraclexxx‘ is unavailable: No Cask with this name exists.

brew search oracle-jdk或brew search --cask oracle-jdk 原因:Homebrew官方仓库不再维护多个旧版本的OracleJDK 不推荐使用Homebrew环境安装JDK //指定版本安装 brew install --cask temurin17 //设置 JAVA_HOME 环境变量 //找到安装的JDK 版本的路径 /usr/lib…

Pytorch环境配置的方法

Pytorch虚拟环境配置全流程 以安装pytorch1.9.1为例 1. 创建虚拟环境 安装Anaconda3,打开 PowerShell 创建虚拟环境并进入: conda create -n torch1.9.1 python3.8 conda activate torch1.9.1 conda create -n torch1.9.1 python3.8 conda activate to…