Update app.py
Browse files
app.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
import os
|
| 2 |
import datetime
|
| 3 |
import einops
|
|
@@ -83,6 +84,7 @@ def resize_image(image_path, target_height):
|
|
| 83 |
#resized_img.save(output_path)
|
| 84 |
return resized_img
|
| 85 |
|
|
|
|
| 86 |
def inference(input_image, prompt, a_prompt, n_prompt, denoise_steps, upscale, alpha, cfg, seed):
|
| 87 |
input_image = resize_image(input_image, 512)
|
| 88 |
process_size = 768
|
|
|
|
| 1 |
+
import spaces
|
| 2 |
import os
|
| 3 |
import datetime
|
| 4 |
import einops
|
|
|
|
| 84 |
#resized_img.save(output_path)
|
| 85 |
return resized_img
|
| 86 |
|
| 87 |
+
@spaces.GPU(enable_queue=True)
|
| 88 |
def inference(input_image, prompt, a_prompt, n_prompt, denoise_steps, upscale, alpha, cfg, seed):
|
| 89 |
input_image = resize_image(input_image, 512)
|
| 90 |
process_size = 768
|