From d8556238b01c8b935fb75f085c32aa2072eaf33a Mon Sep 17 00:00:00 2001 From: Jason Schleifer Date: Thu, 21 Nov 2024 14:27:15 +1300 Subject: [PATCH] check to insure aspect ratio values are ints --- .../drivers/black_forest_image_generation_driver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/griptape/black_forest/drivers/black_forest_image_generation_driver.py b/griptape/black_forest/drivers/black_forest_image_generation_driver.py index 444de92..062d352 100644 --- a/griptape/black_forest/drivers/black_forest_image_generation_driver.py +++ b/griptape/black_forest/drivers/black_forest_image_generation_driver.py @@ -32,7 +32,7 @@ def safety_validator(instance, attribute, value): def aspect_ratio_validator(instance, attribute, value): if value: width, height = value.split(":") - if width < 9 or width > 21 or height < 9 or height > 21: + if int(width) < 9 or int(width) > 21 or int(height) < 9 or int(height) > 21: raise ValueError("aspect_ratio must be between 9:21 and 21:9")