Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,8 @@ import cv2
|
|
15 |
from matplotlib import pyplot as plt
|
16 |
from torchvision import transforms
|
17 |
from diffusers import DiffusionPipeline
|
18 |
-
|
|
|
19 |
pipe = DiffusionPipeline.from_pretrained(
|
20 |
"Fantasy-Studio/Paint-by-Example",
|
21 |
torch_dtype=torch.float16,
|
|
|
15 |
from matplotlib import pyplot as plt
|
16 |
from torchvision import transforms
|
17 |
from diffusers import DiffusionPipeline
|
18 |
+
import torch
|
19 |
+
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
20 |
pipe = DiffusionPipeline.from_pretrained(
|
21 |
"Fantasy-Studio/Paint-by-Example",
|
22 |
torch_dtype=torch.float16,
|