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

Refinement for gpu settings #119

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

CodeLyokoscj
Copy link

@CodeLyokoscj CodeLyokoscj commented Aug 5, 2024

This PR is to provide a unified interface for gpu settings.
One can change the value of "device" in default_values of EchoMimic/webgui.py to modify gpu settings easily.

default_values = {
"width": 512,
"height": 512,
"length": 1200,
"seed": 420,
"facemask_dilation_ratio": 0.1,
"facecrop_dilation_ratio": 0.5,
"context_frames": 12,
"context_overlap": 3,
"cfg": 2.5,
"steps": 30,
"sample_rate": 16000,
"fps": 24,
"device": "cuda"
}

modify "cuda -> device" to provide unified format for changing gpu settings
gpu settings have already written in webgui.py:
pipe = Audio2VideoPipeline(
    vae=vae,
    reference_unet=reference_unet,
    denoising_unet=denoising_unet,
    audio_guider=audio_processor,
    face_locator=face_locator,
    scheduler=scheduler,
).to(device, dtype=weight_dtype)
Thus, redundant device settings for tensors are not needed in mutual_self_attention.py (which may cause index error on tensors).
@medalawi
Copy link

how to change batch size or lower the settings?

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

Successfully merging this pull request may close these issues.

2 participants