Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,6 +33,7 @@ def preprocess_image(image, target_width, target_height):
|
|
| 33 |
image = image.resize((target_width, target_height), Image.LANCZOS)
|
| 34 |
return image
|
| 35 |
|
|
|
|
| 36 |
def generate_image(prompt, control_image, control_mode, controlnet_conditioning_scale, num_steps, guidance, width, height, seed, random_seed):
|
| 37 |
if random_seed:
|
| 38 |
seed = np.random.randint(0, 10000)
|
|
|
|
| 33 |
image = image.resize((target_width, target_height), Image.LANCZOS)
|
| 34 |
return image
|
| 35 |
|
| 36 |
+
@spaces.GPU(duration=120)
|
| 37 |
def generate_image(prompt, control_image, control_mode, controlnet_conditioning_scale, num_steps, guidance, width, height, seed, random_seed):
|
| 38 |
if random_seed:
|
| 39 |
seed = np.random.randint(0, 10000)
|