cbensimon HF Staff commited on
Commit
efb0847
·
verified ·
1 Parent(s): 3b35dc4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -4,6 +4,7 @@ from diffusers import (
4
  UNet2DConditionModel,
5
  AutoencoderTiny,
6
  )
 
7
  import torch
8
  import os
9
  from huggingface_hub import hf_hub_download
@@ -115,6 +116,7 @@ if SFAST_COMPILE:
115
  pipe = compile(pipe, config)
116
 
117
 
 
118
  def predict(prompt, seed=1231231):
119
  generator = torch.manual_seed(seed)
120
  last_time = time.time()
 
4
  UNet2DConditionModel,
5
  AutoencoderTiny,
6
  )
7
+ import spaces
8
  import torch
9
  import os
10
  from huggingface_hub import hf_hub_download
 
116
  pipe = compile(pipe, config)
117
 
118
 
119
+ @spaces.GPU
120
  def predict(prompt, seed=1231231):
121
  generator = torch.manual_seed(seed)
122
  last_time = time.time()