Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ import numpy as np
|
|
18 |
from PIL import Image
|
19 |
import spaces
|
20 |
import torch
|
21 |
-
from diffusers import DiffusionPipeline
|
22 |
from typing import Tuple
|
23 |
|
24 |
#BaseConditions--
|
@@ -246,7 +246,7 @@ ENABLE_CPU_OFFLOAD = os.getenv("ENABLE_CPU_OFFLOAD", "0") == "1"
|
|
246 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
247 |
#Compile
|
248 |
if torch.cuda.is_available():
|
249 |
-
pipe =
|
250 |
"SG161222/RealVisXL_V4.0",
|
251 |
torch_dtype=torch.float16,
|
252 |
use_safetensors=True,
|
|
|
18 |
from PIL import Image
|
19 |
import spaces
|
20 |
import torch
|
21 |
+
from diffusers import DiffusionPipeline, StableDiffusionXLPipeline, EulerAncestralDiscreteScheduler
|
22 |
from typing import Tuple
|
23 |
|
24 |
#BaseConditions--
|
|
|
246 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
247 |
#Compile
|
248 |
if torch.cuda.is_available():
|
249 |
+
pipe = StableDiffusionXLPipeline.from_pretrained(
|
250 |
"SG161222/RealVisXL_V4.0",
|
251 |
torch_dtype=torch.float16,
|
252 |
use_safetensors=True,
|