Menyu commited on
Commit
52dbe21
·
verified ·
1 Parent(s): 254b8cd

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 AutoPipelineForText2Image, AutoencoderKL #,EulerDiscreteScheduler
7
 
8
  if not torch.cuda.is_available():
9
  DESCRIPTION += "\n<p>你现在运行在CPU上 但是只支持GPU.</p>"
@@ -21,7 +21,7 @@ if torch.cuda.is_available():
21
  add_watermarker=False
22
  )
23
 
24
- # pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing")
25
  pipe.to("cuda")
26
 
27
  def randomize_seed_fn(seed: int, randomize_seed: bool) -> int:
 
3
  import numpy as np
4
  import spaces
5
  import torch
6
+ from diffusers import AutoPipelineForText2Image, AutoencoderKL ,EulerDiscreteScheduler
7
 
8
  if not torch.cuda.is_available():
9
  DESCRIPTION += "\n<p>你现在运行在CPU上 但是只支持GPU.</p>"
 
21
  add_watermarker=False
22
  )
23
 
24
+ pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing")
25
  pipe.to("cuda")
26
 
27
  def randomize_seed_fn(seed: int, randomize_seed: bool) -> int: