ironjr commited on
Commit
0b55aa3
β€’
1 Parent(s): 82bf0c3

add zerogpu support

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -38,6 +38,7 @@ import torch
38
 
39
  import gradio as gr
40
  from huggingface_hub import snapshot_download
 
41
 
42
  from model import StableMultiDiffusionSDXLPipeline
43
  from util import seed_everything
@@ -302,6 +303,7 @@ def import_state(state, json_text):
302
 
303
  ### Main worker
304
 
 
305
  def generate(state, *args, **kwargs):
306
  return models[state.model_id](*args, **kwargs)
307
 
 
38
 
39
  import gradio as gr
40
  from huggingface_hub import snapshot_download
41
+ import spaces
42
 
43
  from model import StableMultiDiffusionSDXLPipeline
44
  from util import seed_everything
 
303
 
304
  ### Main worker
305
 
306
+ @spaces.GPU
307
  def generate(state, *args, **kwargs):
308
  return models[state.model_id](*args, **kwargs)
309