Improve documentation of CropLatentsInvocation.

This commit is contained in:
Ryan Dick 2023-11-27 11:30:00 -05:00 committed by Kent Keirsey
parent 18c6ff427e
commit 7cab51745b

View File

@ -1182,31 +1182,33 @@ class BlendLatentsInvocation(BaseInvocation):
version="1.0.0",
)
class CropLatentsInvocation(BaseInvocation):
"""Crops latents"""
"""Crops a latent-space tensor to a box specified in image-space. The box dimensions and coordinates must be
divisible by the latent scale factor of 8.
"""
latents: LatentsField = InputField(
description=FieldDescriptions.latents,
input=Input.Connection,
)
width: int = InputField(
ge=64,
ge=1,
multiple_of=LATENT_SCALE_FACTOR,
description=FieldDescriptions.width,
description="The width (in px) of the crop rectangle in image space. This value will be converted to a dimension in latent space.",
)
height: int = InputField(
ge=64,
ge=1,
multiple_of=LATENT_SCALE_FACTOR,
description=FieldDescriptions.width,
description="The height (in px) of the crop rectangle in image space. This value will be converted to a dimension in latent space.",
)
x_offset: int = InputField(
ge=0,
multiple_of=LATENT_SCALE_FACTOR,
description="x-coordinate",
description="The left x coordinate (in px) of the crop rectangle in image space. This value will be converted to a dimension in latent space.",
)
y_offset: int = InputField(
ge=0,
multiple_of=LATENT_SCALE_FACTOR,
description="y-coordinate",
description="The top y coordinate (in px) of the crop rectangle in image space. This value will be converted to a dimension in latent space.",
)
def invoke(self, context: InvocationContext) -> LatentsOutput: