Added more functionality for ip adapters

This commit is contained in:
Jaret Burkett
2023-12-19 09:54:56 -07:00
parent b653906715
commit 82098e5d6e
3 changed files with 200 additions and 31 deletions

View File

@@ -480,7 +480,12 @@ class ControlFileItemDTOMixin:
print(f"Error: {e}")
print(f"Error loading image: {self.control_path}")
if not self.full_size_control_images:
if self.full_size_control_images:
# we just scale them to 512x512:
w, h = img.size
img = img.resize((512, 512), Image.BICUBIC)
else:
w, h = img.size
if w > h and self.scale_to_width < self.scale_to_height:
# throw error, they should match