Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import gradio as gr
|
|
3 |
import numpy as np
|
4 |
import spaces
|
5 |
import torch
|
6 |
-
from diffusers import
|
7 |
|
8 |
if not torch.cuda.is_available():
|
9 |
DESCRIPTION += "\n<p>你现在运行在CPU上 但是只支持GPU.</p>"
|
@@ -14,7 +14,7 @@ USE_TORCH_COMPILE = "1"
|
|
14 |
ENABLE_CPU_OFFLOAD = "1"
|
15 |
|
16 |
if torch.cuda.is_available():
|
17 |
-
pipe =
|
18 |
"John6666/noobai-xl-nai-xl-epsilonpred075version-sdxl",
|
19 |
torch_dtype=torch.float16,
|
20 |
use_safetensors=True,
|
|
|
3 |
import numpy as np
|
4 |
import spaces
|
5 |
import torch
|
6 |
+
from diffusers import AutoPipelineForText2Image, EulerAncestralDiscreteScheduler
|
7 |
|
8 |
if not torch.cuda.is_available():
|
9 |
DESCRIPTION += "\n<p>你现在运行在CPU上 但是只支持GPU.</p>"
|
|
|
14 |
ENABLE_CPU_OFFLOAD = "1"
|
15 |
|
16 |
if torch.cuda.is_available():
|
17 |
+
pipe = AutoPipelineForText2Image.from_pretrained(
|
18 |
"John6666/noobai-xl-nai-xl-epsilonpred075version-sdxl",
|
19 |
torch_dtype=torch.float16,
|
20 |
use_safetensors=True,
|