SadTalker
SadTalker copied to clipboard
How do you change options like --pose_style & --expression_scale with webui?
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
How do you run inference.py manually?
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.
Thanks for your attention. We will try to update all the available functions in the future release.
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 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?
ModuleNotFoundError: No module named 'realesrgan
add a line of code and use it before running inference
!pip install realesrgan
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