clothing / app.py
Shamkumar's picture
Update app.py
b4b4327 verified
Raw History Blame Contribute Delete
355 Bytes
import torch
from diffusers import DiffusionPipeline
# Change device_map="cuda" to "cpu" or auto-detect device
device = "cuda" if torch.cuda.is_available() else "cpu"
torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
pipe = DiffusionPipeline.from_pretrained(
"yisol/IDM-VTON",
dtype=torch_dtype,
device_map=device
)