Missing def choose_torch_device

This commit is contained in:
mickr777 2023-07-19 15:15:55 +10:00 committed by GitHub
parent 632346b2e2
commit 52e7e0b31b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,6 +38,10 @@ from diffusers.models.attention_processor import (
XFormersAttnProcessor,
)
def choose_torch_device() -> str:
# Your device selection logic here
device = "cuda" if torch.cuda.is_available() else "cpu"
return device
class LatentsField(BaseModel):
"""A latents field used for passing latents between invocations"""