feat: Add Scale Before Processing To Canvas Txt2Img / Img2Img (w/ SDXL)

This commit is contained in:
blessedcoolant
2023-08-27 08:26:23 +12:00
parent 3f8d17d6b7
commit 71c3955530
8 changed files with 350 additions and 201 deletions

View File

@ -375,6 +375,11 @@ class ImageResizeInvocation(BaseInvocation):
width: int = InputField(default=512, ge=64, multiple_of=8, description="The width to resize to (px)")
height: int = InputField(default=512, ge=64, multiple_of=8, description="The height to resize to (px)")
resample_mode: PIL_RESAMPLING_MODES = InputField(default="bicubic", description="The resampling mode")
metadata: CoreMetadata = InputField(
default=None,
description=FieldDescriptions.core_metadata,
ui_hidden=True,
)
def invoke(self, context: InvocationContext) -> ImageOutput:
image = context.services.images.get_pil_image(self.image.image_name)