Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -86,10 +86,10 @@ def apply_canny(image, low_threshold, high_threshold):
|
|
| 86 |
def generate_image(prompt, input_image, low_threshold, high_threshold, strength, guidance, controlnet_conditioning_scale):
|
| 87 |
|
| 88 |
print(pipe.get_active_adapters())
|
| 89 |
-
print(input_image)
|
| 90 |
|
| 91 |
## execute if an image is provided
|
| 92 |
-
if input_image
|
| 93 |
# Apply edge detection
|
| 94 |
edge_detected = apply_canny(input_image, low_threshold, high_threshold)
|
| 95 |
|
|
|
|
| 86 |
def generate_image(prompt, input_image, low_threshold, high_threshold, strength, guidance, controlnet_conditioning_scale):
|
| 87 |
|
| 88 |
print(pipe.get_active_adapters())
|
| 89 |
+
print(str(type(input_image)))
|
| 90 |
|
| 91 |
## execute if an image is provided
|
| 92 |
+
if str(type(input_image)) != "NoneType":
|
| 93 |
# Apply edge detection
|
| 94 |
edge_detected = apply_canny(input_image, low_threshold, high_threshold)
|
| 95 |
|