Spaces:
Menyu
/
Running on Zero

Menyu commited on
Commit
03b5f6a
1 Parent(s): e9e02cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 StableDiffusionXLPipeline, EulerAncestralDiscreteScheduler
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 = StableDiffusionXLPipeline.from_pretrained(
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,