Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import argparse
|
2 |
import os
|
3 |
import time
|
@@ -52,6 +53,7 @@ with gr.Blocks() as demo:
|
|
52 |
with gr.Column():
|
53 |
output = gr.Gallery(height=768)
|
54 |
|
|
|
55 |
def process_image(steps, prompt, controlnet_scale, eta, seed, scribble, num_images):
|
56 |
global pipe
|
57 |
with torch.inference_mode(), torch.autocast("cuda", dtype=torch.float16), timer("inference"):
|
|
|
1 |
+
import spaces
|
2 |
import argparse
|
3 |
import os
|
4 |
import time
|
|
|
53 |
with gr.Column():
|
54 |
output = gr.Gallery(height=768)
|
55 |
|
56 |
+
@spaces.GPU
|
57 |
def process_image(steps, prompt, controlnet_scale, eta, seed, scribble, num_images):
|
58 |
global pipe
|
59 |
with torch.inference_mode(), torch.autocast("cuda", dtype=torch.float16), timer("inference"):
|