NokiMo
Furkan Gözükara
Furkan Gözükara

patreon


Magic Animate Automatic Installer and Video to DensePose Auto Converter For Windows And RunPod

Patreon exclusive posts index

Join discord and tell me your discord username to get a special rank : SECourses Discord

Fully automatic installers for Windows using pip and VENV - not even Conda necessary,

This tutorial video made for this video. Watch it to learn how to install Python, Visual C++ tools properly > https://youtu.be/-NjNy7afOQ0

1 January 2024 Update

9 December 2023 Update

8 December 2023 Update

Pre Requirements

Current Status

5 December 2023 Huge Update

compose_dense_pose

compose_magic_animate

pre_shared_densepose

code_former_improve_face

RunPod / Linux Install Instructions For Magic Animate Gradio

https://runpod.io?ref=1aka98lq

After installation has been complete run with below command

RunPod / Linux Install Instructions DensePose Maker

Upload all files inside compose_dense_pose (inside magic_animate. zip) folder except densepose folder into workspace/dense_pose folder. You need to compose dense_pose folder in workspace manually. Enter inside it and upload there as shown in video.

After installation

Upload your video file into anywhere

Edit make_dense_video. py and set video file and folder paths

Then run make_dense_video. py file as below

apt update line 1 time necessary after each restart

ffmpeg line 1 time necessary after each restart

Then download generated DensePose video and use from your magic-animate gradio

RunPod / Linux Install Instructions CodeFormer Improve Face

Upload all files inside code_former_improve_face (inside magic_animate. zip) folder into workspace/code_former folder. You need to generate code_former folder manually.

After install run CodeFormer Gradio Web APP as below

update and ffmpeg lines 1 time necessary each time after Pod restart

To make it work on Linux system just change folder paths

The result videos will be automatically saved inside workspace/CodeFormer/results folder

Extras

Example video : https://www.pexels.com/video/a-man-walking-inside-a-production-plant-3209176/

To auto crop with center

Extract only first second of video to test quicker

Hopefully a full tutorial coming soon

Install inside e.g. G:\magic_animate - do not have any spaces

Comments

hi give more info. what is your python version? did you install c++ tools? your folder path and video file name?

Furkan Gözükara

Hi, I have the following error when trying to import apply_net Aborted (core dumped)

hypily123

Hello. please download magic_animate_v6.zip file which is in the attachments of the post

Furkan Gözükara

where is history magic-animate-x.zip

kack bob

hi do you see frames in the folders? looks like it wasnt able to determine your input video dimensions. i would reencode input video with ffmpeg and provide that way

Furkan Gözükara

Hi, I am receiving this error at the end of the codeformer completing the processing -- Video Saving... Traceback (most recent call last): File "C:\Users\clien\Documents\MagicVideo\code_former_improve_face\CodeFormer\inference_codeformer.py", line 264, in height, width = video_frames[0].shape[:2] IndexError: list index out of range

Huey

I agree with that. I will keep my eye on hopefully future stuff. Thank you for support

Furkan Gözükara

Thanks for the really great video and explanation! All of the installs worked flawlessly! Unfortunately Magic Animate is so inferior in quality, no matter how much up-scaling you throw at it, it is a throw-away app. Maybe when they develop an SDXL version it might be worth looking at again. It is good to have the Code Former setup for up-scaling other videos, so thank you for that!

PTMarks

ye i didn't bother with multi gpu scripts. sadly don't know even if they are working or not. but since libraries are installed they should work if original authors made them work

Furkan Gözükara

Question, seems like it's only using one GPU (magic-animate), and since you modified the start scripts that they are not the standard ones I don't see a _dist variation to run multi gpu? Any quick pointers?

Mark Burazin

it could be due to missing c++ tools. i am editing a video right now. follow that video and install Python and c++ tools like that. hopefully will be published tomorrow on channel

Furkan Gözükara

Hi, good job, it works I can generate videos from samples and pictures I need, except I can't get compose_dense_pose to install correctly. It's failing on 'No module named torch'. Any suggestions? I installed the build tools and in them Desktop development and Universal Windows Platform build tools is checked. but when running install_detectron.bat it fails.

Mark Burazin

i doubt so. now supporting SD 1.5 custom models but i didnt see any difference yet

Furkan Gözükara

Can we use a SDXL checkpoint?

Arcon Septim

wow nice i definitely must make an auto installer and a video

Furkan Gözükara

Can you develop a one-click installation of DEMOFUSION? https://github.com/PRIS-CV/DemoFusion

楠 陈

probably detectron weren't installed properly. did you install c++ tools? did you see any error while installing?

Furkan Gözükara

yes i ignore all working great

Furkan Gözükara

can you show me screenshot of your folder?

Furkan Gözükara

Hello! I'm getting this error while trying to generate densepose: ModuleNotFoundError: No module named 'detectron2.config

San Milano

resolved: a pip install after process ended managed to install

Edmund Kudzayi

I experienced an error during the installation of 'nvidia-pyindex', which causes the build process to fail. Specifically, the error occurs while building the wheel for nvidia-pyindex. The process is interrupted by a 'subprocess.CalledProcessError', indicating that a subprocess command returned a non-zero exit status. This error is associated with the failure to locate the 'pip' module, essential for the installation. The implication is that even after script completion, the virtual environment may not successfully run the application, as the necessary Nvidia package index is not properly installed. Any ideas on how to resolve?

Edmund Kudzayi

Should i ignore all this? C:\Users\Jamie\Desktop\MagicAnimate\compose_magic_animate\magic-animate\magicanimate\pipelines\pipeline_animation.py:43: FutureWarning: Importing `DiffusionPipeline` or `ImagePipelineOutput` from diffusers.pipeline_utils is deprecated. Please import from diffusers.pipelines.pipeline_utils instead. from diffusers.pipeline_utils import DiffusionPipeline Initializing MagicAnimate Pipeline... loaded temporal unet's pretrained weights from magicanimate/pretrained_models/stable-diffusion-v1-5\unet ... ### missing keys: 560; ### unexpected keys: 0; ### Temporal Module Parameters: 417.1376 M The config attributes {'addition_embed_type': None, 'addition_embed_type_num_heads': 64, 'addition_time_embed_dim': None, 'conditioning_channels': 3, 'encoder_hid_dim': None, 'encoder_hid_dim_type': None, 'global_pool_conditions': False, 'num_attention_heads': None, 'transformer_layers_per_block': 1} were passed to ControlNetModel, but are not expected and will be ignored. Please verify your config.json configuration file. It is recommended to provide `attention_head_dim` when calling `get_down_block`. Defaulting `attention_head_dim` to 8. It is recommended to provide `attention_head_dim` when calling `get_down_block`. Defaulting `attention_head_dim` to 8. It is recommended to provide `attention_head_dim` when calling `get_down_block`. Defaulting `attention_head_dim` to 8. It is recommended to provide `attention_head_dim` when calling `get_down_block`. Defaulting `attention_head_dim` to 8. A matching Triton is not available, some optimizations will not be enabled. Error caught was: No module named 'triton' C:\Users\Jamie\Desktop\MagicAnimate\compose_magic_animate\magic-animate\magicanimate\pipelines\pipeline_animation.py:103: FutureWarning: The configuration file of this scheduler: DDIMScheduler { "_class_name": "DDIMScheduler", "_diffusers_version": "0.21.4", "beta_end": 0.012, "beta_schedule": "linear", "beta_start": 0.00085, "clip_sample": true, "clip_sample_range": 1.0, "dynamic_thresholding_ratio": 0.995, "num_train_timesteps": 1000, "prediction_type": "epsilon", "rescale_betas_zero_snr": false, "sample_max_value": 1.0, "set_alpha_to_one": true, "steps_offset": 0, "thresholding": false, "timestep_spacing": "leading", "trained_betas": null } is outdated. `steps_offset` should be set to 1 instead of 0. Please make sure to update the config accordingly as leaving `steps_offset` might led to incorrect results in future versions. If you have downloaded this checkpoint from the Hugging Face Hub, it would be very nice if you could open a Pull request for the `scheduler/scheduler_config.json` file deprecate("steps_offset!=1", "1.0.0", deprecation_message, standard_warn=False) C:\Users\Jamie\Desktop\MagicAnimate\compose_magic_animate\magic-animate\magicanimate\pipelines\pipeline_animation.py:116: FutureWarning: The configuration file of this scheduler: DDIMScheduler { "_class_name": "DDIMScheduler", "_diffusers_version": "0.21.4", "beta_end": 0.012, "beta_schedule": "linear", "beta_start": 0.00085, "clip_sample": true, "clip_sample_range": 1.0, "dynamic_thresholding_ratio": 0.995, "num_train_timesteps": 1000, "prediction_type": "epsilon", "rescale_betas_zero_snr": false, "sample_max_value": 1.0, "set_alpha_to_one": true, "steps_offset": 1, "thresholding": false, "timestep_spacing": "leading", "trained_betas": null } has not set the configuration `clip_sample`. `clip_sample` should be set to False in the configuration file. Please make sure to update the config accordingly as not setting `clip_sample` in the config might lead to incorrect results in future versions. If you have downloaded this checkpoint from the Hugging Face Hub, it would be very nice if you could open a Pull request for the `scheduler/scheduler_config.json` file deprecate("clip_sample not set", "1.0.0", deprecation_message, standard_warn=False) Initialization Done!

Jamie Hudson

Whenever I try to run "generate_dense_video" I get this error: Traceback (most recent call last): File "I:\AI\MagicAnimate\magic_animate\compose_dense_pose\make_dense_video.py", line 5, in import apply_net # Import the modified apply_net script File "I:\AI\MagicAnimate\magic_animate\compose_dense_pose\apply_net.py", line 13, in from detectron2.config import CfgNode, get_cfg ModuleNotFoundError: No module named 'detectron2.config'

Hermokrates

or a God shines through him

Marcel Kuiper

yes i just made it. please download latest file. now automatic dense pose maker is included. spent like 12 hours straight to make it work

Furkan Gözükara

Thanks !! can you please do a one click installer for "detectron2" too it's allow to generate the animation video for MagicAnimate https://github.com/facebookresearch/detectron2 There's DensePose too https://github.com/facebookresearch/DensePose

alex

There is only 1 God. I am just a mere mortal. I am about to complete DensePose generator script as well.

Furkan Gözükara

You are a GOD!!!

Aldo Jones

let me update it for runpod installer. sadly i couldn't still make DensePose generator

Furkan Gözükara

How can i run this on runpod? 🤔

Jorge Reverte Sevillano

updated zip file. please use updated one

Furkan Gözükara

that is my today work hopefully

Furkan Gözükara

you have 0 chance to make this work on mac. it depends on so many nvidia libraries. i plan to make script for RunPod hopefully soon

Furkan Gözükara

it works with like 10 GB. not sure 8 GB VRAM

Furkan Gözükara

i have error Traceback (most recent call last): File "D:\AI\magic_animate_installer\magic-animate\venv\lib\site-packages\gradio\routes.py", line 488, in run_predict output = await app.get_blocks().process_api( File "D:\AI\magic_animate_installer\magic-animate\venv\lib\site-packages\gradio\blocks.py", line 1434, in process_api data = self.postprocess_data(fn_index, result["prediction"], state) File "D:\AI\magic_animate_installer\magic-animate\venv\lib\site-packages\gradio\blocks.py", line 1335, in postprocess_data prediction_value = block.postprocess(prediction_value) File "D:\AI\magic_animate_installer\magic-animate\venv\lib\site-packages\gradio\components\video.py", line 281, in postprocess processed_files = (self._format_video(y), None) File "D:\AI\magic_animate_installer\magic-animate\venv\lib\site-packages\gradio\components\video.py", line 355, in _format_video video = self.make_temp_copy_if_needed(video) File "D:\AI\magic_animate_installer\magic-animate\venv\lib\site-packages\gradio\components\base.py", line 226, in make_temp_copy_if_needed temp_dir = self.hash_file(file_path) File "D:\AI\magic_animate_installer\magic-animate\venv\lib\site-packages\gradio\components\base.py", line 190, in hash_file with open(file_path, "rb") as f: FileNotFoundError: [Errno 2] No such file or directory: 'D:\\AI\\magic_animate_installer\\magic-animate\\demo\\demo\\outputs\\2023-12-05T15-09-08.mp4'

polaraju p

In downloader.py, put a comma at the end of the section: os.path.join("magic-animate", "magicanimate", "pretrained_models", "stable-diffusion-v1-5","unet"): [ "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/unet/config.json", "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/unet/diffusion_pytorch_model.bin" ]

Al H

How can we make pre prepared motion sequences?

Erosi

Could you please also add a MacOS script?

Carsten Li

downloading model files File "F:\magic_animate_installer\downloader.py", line 47 os.path.join("magic-animate", "magicanimate", "pretrained_models", "stable-diffusion-v1-5","unet"): [ ^ SyntaxError: invalid syntax. Perhaps you forgot a comma? Virtual environment made and installed properly

Alex Chu

thanks for the quickupdate, I have rtx 3070 ti with 8 vram, any chance of running this ?

Rashid Omar


Related Creators