Update app.py
Browse files
app.py
CHANGED
@@ -97,7 +97,7 @@ MAX_SEED = 1000000
|
|
97 |
MAX_PIXEL_BUDGET = 1024 * 1024
|
98 |
|
99 |
|
100 |
-
|
101 |
def process_input(input_image, upscale_factor):
|
102 |
w, h = input_image.size
|
103 |
aspect_ratio = w / h
|
@@ -121,7 +121,7 @@ def process_input(input_image, upscale_factor):
|
|
121 |
|
122 |
return input_image.resize((w, h)), was_resized
|
123 |
|
124 |
-
|
125 |
def run_inference(process_id, input_image, upscale_factor, seed, num_inference_steps, controlnet_conditioning_scale):
|
126 |
logger.info("Processing inference for process_id: %s", process_id)
|
127 |
input_image, was_resized = process_input(input_image, upscale_factor)
|
|
|
97 |
MAX_PIXEL_BUDGET = 1024 * 1024
|
98 |
|
99 |
|
100 |
+
#@spaces.GPU
|
101 |
def process_input(input_image, upscale_factor):
|
102 |
w, h = input_image.size
|
103 |
aspect_ratio = w / h
|
|
|
121 |
|
122 |
return input_image.resize((w, h)), was_resized
|
123 |
|
124 |
+
#@spaces.GPU
|
125 |
def run_inference(process_id, input_image, upscale_factor, seed, num_inference_steps, controlnet_conditioning_scale):
|
126 |
logger.info("Processing inference for process_id: %s", process_id)
|
127 |
input_image, was_resized = process_input(input_image, upscale_factor)
|