Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
import os
|
| 2 |
import sys
|
| 3 |
-
|
| 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,
|