Skip to content

Refinement for gpu settings#119

Open
CodeLyokoscj wants to merge 2 commits intoantgroup:mainfrom
CodeLyokoscj:main
Open

Refinement for gpu settings#119
CodeLyokoscj wants to merge 2 commits intoantgroup:mainfrom
CodeLyokoscj:main

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