h1t commited on
Commit
719e8a8
β€’
1 Parent(s): c7e05d9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import random
2
-
3
  import gradio as gr
4
  import torch
5
  from diffusers import StableDiffusionXLPipeline
@@ -20,7 +20,7 @@ pipe.scheduler = TCDScheduler.from_config(pipe.scheduler.config)
20
  pipe.load_lora_weights(tcd_lora_id)
21
  pipe.fuse_lora()
22
 
23
-
24
  def inference(prompt, num_inference_steps=4, seed=-1, eta=0.3):
25
  if seed is None or seed == '' or seed == -1:
26
  seed = int(random.randrange(4294967294))
 
1
  import random
2
+ import spaces
3
  import gradio as gr
4
  import torch
5
  from diffusers import StableDiffusionXLPipeline
 
20
  pipe.load_lora_weights(tcd_lora_id)
21
  pipe.fuse_lora()
22
 
23
+ @spaces.GPU
24
  def inference(prompt, num_inference_steps=4, seed=-1, eta=0.3):
25
  if seed is None or seed == '' or seed == -1:
26
  seed = int(random.randrange(4294967294))