Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you make a gradio demo app that has the all features of the paper? #1

Open
FurkanGozukara opened this issue Nov 27, 2024 · 13 comments

Comments

@FurkanGozukara
Copy link

Also video input + image > turned into pose > and then animated

Would be great

@Francis-Rings
Copy link
Owner

Thank you for your suggestions! An online Gradio demo app will be released in the future. Stay tuned!

@FurkanGozukara
Copy link
Author

awesome @Francis-Rings

@eoffermann
Copy link

@FurkanGozukara I have a WIP gradio app in my fork https://github.com/eoffermann/StableAnimator/tree/gradio

@FurkanGozukara
Copy link
Author

@eoffermann awesome

@lior007
Copy link

lior007 commented Nov 29, 2024

@FurkanGozukara I have a WIP gradio app in my fork https://github.com/eoffermann/StableAnimator/tree/gradio

when i run python gradio_basic.py
i have error:

Traceback (most recent call last):
File "H:\GITHUB\StableAnimator\gradio_basic.py", line 6, in
from inference_basic import seed_everything, load_images_from_folder, save_frames_as_png, export_to_gif
File "H:\GITHUB\StableAnimator\inference_basic.py", line 11, in
from animation.modules.attention_processor import AnimationAttnProcessor
File "H:\GITHUB\StableAnimator\animation\modules\attention_processor.py", line 11, in
print(1/0)
ZeroDivisionError: division by zero

@Francis-Rings
Copy link
Owner

@FurkanGozukara I have a WIP gradio app in my fork https://github.com/eoffermann/StableAnimator/tree/gradio

Cool Gradio App! Thank you for your contribution!

@Francis-Rings
Copy link
Owner

@FurkanGozukara I have a WIP gradio app in my fork https://github.com/eoffermann/StableAnimator/tree/gradio

when i run python gradio_basic.py i have error:

Traceback (most recent call last): File "H:\GITHUB\StableAnimator\gradio_basic.py", line 6, in from inference_basic import seed_everything, load_images_from_folder, save_frames_as_png, export_to_gif File "H:\GITHUB\StableAnimator\inference_basic.py", line 11, in from animation.modules.attention_processor import AnimationAttnProcessor File "H:\GITHUB\StableAnimator\animation\modules\attention_processor.py", line 11, in print(1/0) ZeroDivisionError: division by zero

You should first download xFormer from https://github.com/facebookresearch/xformers. For installation instructions, refer to the README file in the project or the official xFormer GitHub repository. Please make sure that xFormer is properly installed and functional. You can verify if xFormer is available by running 'python -m xformers.info'.

@lior007
Copy link

lior007 commented Nov 30, 2024

python -m xformers.info

I HAVE WINDOWS
IN YOUE LINK ITS FOR LINUX

@lior007
Copy link

lior007 commented Nov 30, 2024

@FurkanGozukara I have a WIP gradio app in my fork https://github.com/eoffermann/StableAnimator/tree/gradio

when i run python gradio_basic.py i have error:
Traceback (most recent call last): File "H:\GITHUB\StableAnimator\gradio_basic.py", line 6, in from inference_basic import seed_everything, load_images_from_folder, save_frames_as_png, export_to_gif File "H:\GITHUB\StableAnimator\inference_basic.py", line 11, in from animation.modules.attention_processor import AnimationAttnProcessor File "H:\GITHUB\StableAnimator\animation\modules\attention_processor.py", line 11, in print(1/0) ZeroDivisionError: division by zero

You should first download xFormer from https://github.com/facebookresearch/xformers. For installation instructions, refer to the README file in the project or the official xFormer GitHub repository. Please make sure that xFormer is properly installed and functional. You can verify if xFormer is available by running 'python -m xformers.info'.

ok. start over
now gradio in loading
start to work...and then: got error

this is the error:

(StableAnimator) PS H:\GITHUB\StableAnimator> python gradio_basic.py
C:\Users\LIOR0\miniconda3\envs\StableAnimator\lib\site-packages\transformers\utils\generic.py:441: FutureWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.
_torch_pytree._register_pytree_node(
C:\Users\LIOR0\miniconda3\envs\StableAnimator\lib\site-packages\transformers\utils\generic.py:309: FutureWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.
_torch_pytree._register_pytree_node(
C:\Users\LIOR0\miniconda3\envs\StableAnimator\lib\site-packages\transformers\utils\generic.py:309: FutureWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.
_torch_pytree._register_pytree_node(

To create a public link, set share=True in launch().
download_path: .\models\antelopev2
Downloading .\models\antelopev2.zip from https://github.com/deepinsight/insightface/releases/download/v0.7/antelopev2.zip...
100%|███████████████████████████████████████████████████████████████████████| 352210/352210 [00:07<00:00, 48528.70KB/s]
Traceback (most recent call last):
File "C:\Users\LIOR0\miniconda3\envs\StableAnimator\lib\site-packages\gradio\queueing.py", line 624, in process_events
response = await route_utils.call_process_api(
File "C:\Users\LIOR0\miniconda3\envs\StableAnimator\lib\site-packages\gradio\route_utils.py", line 323, in call_process_api
output = await app.get_blocks().process_api(
File "C:\Users\LIOR0\miniconda3\envs\StableAnimator\lib\site-packages\gradio\blocks.py", line 2019, in process_api
result = await self.call_function(
File "C:\Users\LIOR0\miniconda3\envs\StableAnimator\lib\site-packages\gradio\blocks.py", line 1566, in call_function
prediction = await anyio.to_thread.run_sync( # type: ignore
File "C:\Users\LIOR0\miniconda3\envs\StableAnimator\lib\site-packages\anyio\to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "C:\Users\LIOR0\miniconda3\envs\StableAnimator\lib\site-packages\anyio_backends_asyncio.py", line 2441, in run_sync_in_worker_thread
return await future
File "C:\Users\LIOR0\miniconda3\envs\StableAnimator\lib\site-packages\anyio_backends_asyncio.py", line 943, in run
result = context.run(func, *args)
File "C:\Users\LIOR0\miniconda3\envs\StableAnimator\lib\site-packages\gradio\utils.py", line 865, in wrapper
response = f(*args, **kwargs)
File "H:\GITHUB\StableAnimator\gradio_basic.py", line 45, in run_inference
face_model = FaceModel()
File "H:\GITHUB\StableAnimator\animation\modules\face_model.py", line 11, in init
self.app = FaceAnalysis(
File "C:\Users\LIOR0\miniconda3\envs\StableAnimator\lib\site-packages\insightface\app\face_analysis.py", line 43, in init
assert 'detection' in self.models
AssertionError

@Francis-Rings
Copy link
Owner

@FurkanGozukara I have a WIP gradio app in my fork https://github.com/eoffermann/StableAnimator/tree/gradio

when i run python gradio_basic.py i have error:
Traceback (most recent call last): File "H:\GITHUB\StableAnimator\gradio_basic.py", line 6, in from inference_basic import seed_everything, load_images_from_folder, save_frames_as_png, export_to_gif File "H:\GITHUB\StableAnimator\inference_basic.py", line 11, in from animation.modules.attention_processor import AnimationAttnProcessor File "H:\GITHUB\StableAnimator\animation\modules\attention_processor.py", line 11, in print(1/0) ZeroDivisionError: division by zero

You should first download xFormer from https://github.com/facebookresearch/xformers. For installation instructions, refer to the README file in the project or the official xFormer GitHub repository. Please make sure that xFormer is properly installed and functional. You can verify if xFormer is available by running 'python -m xformers.info'.

ok. start over now gradio in loading start to work...and then: got error

this is the error:

(StableAnimator) PS H:\GITHUB\StableAnimator> python gradio_basic.py C:\Users\LIOR0\miniconda3\envs\StableAnimator\lib\site-packages\transformers\utils\generic.py:441: FutureWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead. _torch_pytree._register_pytree_node( C:\Users\LIOR0\miniconda3\envs\StableAnimator\lib\site-packages\transformers\utils\generic.py:309: FutureWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead. _torch_pytree._register_pytree_node( C:\Users\LIOR0\miniconda3\envs\StableAnimator\lib\site-packages\transformers\utils\generic.py:309: FutureWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead. _torch_pytree._register_pytree_node(

To create a public link, set share=True in launch(). download_path: .\models\antelopev2 Downloading .\models\antelopev2.zip from https://github.com/deepinsight/insightface/releases/download/v0.7/antelopev2.zip... 100%|███████████████████████████████████████████████████████████████████████| 352210/352210 [00:07<00:00, 48528.70KB/s] Traceback (most recent call last): File "C:\Users\LIOR0\miniconda3\envs\StableAnimator\lib\site-packages\gradio\queueing.py", line 624, in process_events response = await route_utils.call_process_api( File "C:\Users\LIOR0\miniconda3\envs\StableAnimator\lib\site-packages\gradio\route_utils.py", line 323, in call_process_api output = await app.get_blocks().process_api( File "C:\Users\LIOR0\miniconda3\envs\StableAnimator\lib\site-packages\gradio\blocks.py", line 2019, in process_api result = await self.call_function( File "C:\Users\LIOR0\miniconda3\envs\StableAnimator\lib\site-packages\gradio\blocks.py", line 1566, in call_function prediction = await anyio.to_thread.run_sync( # type: ignore File "C:\Users\LIOR0\miniconda3\envs\StableAnimator\lib\site-packages\anyio\to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( File "C:\Users\LIOR0\miniconda3\envs\StableAnimator\lib\site-packages\anyio_backends_asyncio.py", line 2441, in run_sync_in_worker_thread return await future File "C:\Users\LIOR0\miniconda3\envs\StableAnimator\lib\site-packages\anyio_backends_asyncio.py", line 943, in run result = context.run(func, *args) File "C:\Users\LIOR0\miniconda3\envs\StableAnimator\lib\site-packages\gradio\utils.py", line 865, in wrapper response = f(*args, **kwargs) File "H:\GITHUB\StableAnimator\gradio_basic.py", line 45, in run_inference face_model = FaceModel() File "H:\GITHUB\StableAnimator\animation\modules\face_model.py", line 11, in init self.app = FaceAnalysis( File "C:\Users\LIOR0\miniconda3\envs\StableAnimator\lib\site-packages\insightface\app\face_analysis.py", line 43, in init assert 'detection' in self.models AssertionError

Hi! Could you share the file structure of your project? The issue might be related to an incorrect file structure in the face extraction model. I'll include more details about the file structure in the README file.

@flrngel
Copy link

flrngel commented Dec 11, 2024

fyi

mv ./models/antelopev2/antelopev2 ./models/tmp
rm -rf ./models/antelopev2
mv ./models/tmp ./models/antelopev2

@EnochYe
Copy link

EnochYe commented Dec 11, 2024

fyi

mv ./models/antelopev2/antelopev2 ./models/tmp
rm -rf ./models/antelopev2
mv ./models/tmp ./models/antelopev2

Encountered the same problem, and it works 🎉

@404-xianjin
Copy link

@eoffermannHi, bro. I tried to deploy using your requirements_win.txt file and encountered error reporting.

Collecting tokenizers==0.15.2 (from -r .\requirements_win.txt (line 98))
  Downloading tokenizers-0.15.2-cp310-none-win_amd64.whl.metadata (6.8 kB)
Requirement already satisfied: tomlkit==0.12.0 in c:\users\sinobio\appdata\roaming\python\python310\site-packages (from -r .\requirements_win.txt (line 99)) (0.12.0)
ERROR: Ignored the following versions that require a different python version: 0.36.0 Requires-Python >=3.6,<3.10; 0.37.0 Requires-Python >=3.7,<3.10; 0.52.0 Requires-Python >=3.6,<3.9; 0.52.0rc3 Requires-Python >=3.6,<3.9; 0.53.0 Requires-Python >=3.6,<3.10; 0.53.0rc1.post1 Requires-Python >=3.6,<3.10; 0.53.0rc2 Requires-Python >=3.6,<3.10; 0.53.0rc3 Requires-Python >=3.6,<3.10; 0.53.1 Requires-Python >=3.6,<3.10; 0.54.0 Requires-Python >=3.7,<3.10; 0.54.0rc2 Requires-Python >=3.7,<3.10; 0.54.0rc3 Requires-Python >=3.7,<3.10; 0.54.1 Requires-Python >=3.7,<3.10; 1.6.2 Requires-Python >=3.7,<3.10; 1.6.3 Requires-Python >=3.7,<3.10; 1.7.0 Requires-Python >=3.7,<3.10; 1.7.1 Requires-Python >=3.7,<3.10
ERROR: Could not find a version that satisfies the requirement torch==2.5.1+cu118 (from versions: 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.4.0, 2.4.1, 2.5.0, 2.5.1)
ERROR: No matching distribution found for torch==2.5.1+cu118
(StableAnimator-gradio) PS D:\StableAnimator-gradio\StableAnimator-gradio>

My python version is 3.10.11
image
Can you help me out? Bro, thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants