SadTalker icon indicating copy to clipboard operation
SadTalker copied to clipboard

How do you change options like --pose_style & --expression_scale with webui?

Open protox opened this issue 2 years ago • 2 comments

First I want to say great job on SadTalker. Second I was wondering I noticed you have tons of extra options in inference.py, I'm running SadTalker as an extension through Stable Diffusion's webui, but changing settings in inference.py has no effect. I see you have to add the parameters such as --pose_style & --expression_scale etc via arguments when running inference.py manually.

Is there a way to run these options via webui some how?

Thanks

protox avatar Apr 27 '23 22:04 protox

How do you run inference.py manually?

CTLN7 avatar Apr 28 '23 10:04 CTLN7

You'd have to install SadTalker manually, you cannot run the SD installation through inference.py as far as I can tell.

You'd run like: python inference.py --driven_audio audio.wav --source_image video.mp4 --pose_style 10 --enhancer gfpgan in a terminal for example.

I ran into some issues installing it myself (due to pip or requirements.txt not sure) so I can't really test the custom pose styles and such except from colab which is way too slow.

I'm trying to figure out if you can do that stuff through sd install some how.

protox avatar Apr 28 '23 15:04 protox

Thanks for your attention. We will try to update all the available functions in the future release.

vinthony avatar May 04 '23 03:05 vinthony

I use annaconda to install it as a vitual enviroment using the following method, once I installed annaconda I opened the annaconda terminal (which is different to the cmd terminal you would normally use) git clone https://github.com/OpenTalker/SadTalker.git

cd SadTalker

conda create -n sadtalker python=3.8

conda activate sadtalker

pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113

conda install ffmpeg

pip install -r requirements.txt

I then created a checkpoints folder and put all the checkpoints inside, then anytime i need to use sadtalker I open the annaconda terminal and do:

cd C:\Users\leolo\SadTalker

activate SadTalker

python inference.py --driven_audio examples/driven_audio/bus_chinese.wav --source_image examples/source_image/sad1.png --ref_pose examples/ref_video/zoom768vid.mp4 --ref_eyeblink examples/ref_video/zoom768vid.mp4 --result_dir results --preprocess crop --enhancer gfpgan --background_enhancer realesrgan

I havent tried the rolls or editing the poses yet as i'm using reference vids and reference blinking, it will take me a while to get through it all

Inferencer avatar May 08 '23 08:05 Inferencer

@Inferencer do you mind answering my question? I just tried --background_enhancer realesrgan (using a google collab) and got this error (File "/content/SadTalker/src/utils/face_enhancer.py", line 80, in enhancer_generator_no_len from realesrgan import RealESRGANer ModuleNotFoundError: No module named 'realesrgan') What can I do to solve it?

AIhasArrived avatar Dec 08 '23 18:12 AIhasArrived

ModuleNotFoundError: No module named 'realesrgan

add a line of code and use it before running inference !pip install realesrgan

Inferencer avatar Dec 09 '23 18:12 Inferencer

I did that (figured that after writing the comment), but still got an error, I did not run again the download models code, should I have re run all codes after the line of code you provided me?

And you guessed RIGHT, i was using a collab

AIhasArrived avatar Dec 09 '23 19:12 AIhasArrived