Add round_to_multiple function

This commit is contained in:
LEv145
2023-07-04 08:47:34 +02:00
parent 0412efe7a7
commit a420d9b357

View File

@@ -563,3 +563,7 @@ class AspectRatioScript(scripts.Script):
self.image.append(component)
if kwargs.get("elem_id") == "img_inpaint_base":
self.image.append(component)
def round_to_multiple(x, multiple):
return multiple * round(x / multiple)