mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Missing def choose_torch_device
This commit is contained in:
parent
632346b2e2
commit
52e7e0b31b
@ -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"""
|
||||
|
Loading…
Reference in New Issue
Block a user