Fannovel16 / ComfyUI-MotionDiff

Implementation of MDM, MotionDiffuse and ReMoDiffuse into ComfyUI
MIT License
174 stars 14 forks source link

ComfyUI MotionDiff

Implementation of 4DHuman, MotionGPT, MDM, MotionDiffuse and ReMoDiffuse into ComfyUI

Installation:

Installing prerequisites on Ubuntu (and maybe other Linux distros)

sudo apt-get install libglfw3-dev libgles2-mesa-dev freeglut3-dev

Using ComfyUI Manager (recommended):

Install ComfyUI Manager and do steps introduced there to install this repo.

Alternative:

If you're running on Linux, or non-admin account on windows you'll want to ensure /ComfyUI/custom_nodes and comfyui_controlnet_aux has write permissions.

There is now a install.bat you can run to install to portable if detected. Otherwise it will default to system and assume you followed ConfyUI's manual installation steps.

If you can't run install.bat (e.g. you are a Linux user). Open the CMD/Shell and do the following:

Examples

3D Pose Estimation from 4DHuman

https://github.com/Fannovel16/ComfyUI-MotionDiff/assets/16047777/cc885946-331b-4a9d-a138-717b40572404

https://github.com/Fannovel16/ComfyUI-MotionDiff/blob/main/examples/4dhuman.json

Generate and render

https://github.com/Fannovel16/ComfyUI-MotionDiff/blob/main/examples/full_motiondiff_example.json

https://github.com/Fannovel16/ComfyUI-MotionDiff/assets/16047777/842a6720-5f5d-4f14-813f-f25ccc2d8a72

There are two stickmen outputs: pseudo-openpose and real openpose. The former costs less time but doesn't have head, lacks depth and doesn't exactly match Openpose format while the real one is better overall but requires gradient-based optimization. Some important parameters:

P/s: Depth map from SMPL render might create half-naked women when used with ControlNet. My theory is that it learned half-naking pattern in the depth map

Saving and loading SMPL

Workflow: https://github.com/Fannovel16/ComfyUI-MotionDiff/blob/main/examples/save_and_load.json

Save SMPL node saves SMPL data as .pt file

Export SMPL to 3DCGI Software saves meshes to a folder containing mesh files can be imported to softwares like Blender, Unreal Engine, Unity, etc

Both nodes save the result in Comfy's output folder

Load SMPL get the files from Comfy's input folder. You have to copy .pt files from input folder to output folder