akhaliq HF Staff commited on
Commit
e4af04d
·
verified ·
1 Parent(s): 64a89ab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import os
2
  import sys
3
- sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
4
 
5
  import gradio as gr
6
  import torch
@@ -425,6 +425,7 @@ def load_model_and_vae(model_path, vae_path):
425
  CURRENT_MODEL_PATH = None
426
  return f"✗ Failed: {str(e)}"
427
 
 
428
  def generate_wrapper(
429
  input_image, prompt_text, model_path, vae_path, height, width,
430
  text_steps, text_gen_length, text_block_length, cfg_scale, cfg_img,
 
1
  import os
2
  import sys
3
+ import spaces
4
 
5
  import gradio as gr
6
  import torch
 
425
  CURRENT_MODEL_PATH = None
426
  return f"✗ Failed: {str(e)}"
427
 
428
+ @spaces.GPU()
429
  def generate_wrapper(
430
  input_image, prompt_text, model_path, vae_path, height, width,
431
  text_steps, text_gen_length, text_block_length, cfg_scale, cfg_img,