From c4642e20749aea1750ff61dadca686443387c09b Mon Sep 17 00:00:00 2001 From: Jason Schleifer Date: Fri, 22 Nov 2024 04:23:32 +1300 Subject: [PATCH] check to insure aspect ratio values are ints (#7) --- .../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")