Skip to content

Commit 1c14e25

Browse files
feat(app): do not pull PIL image from disk in image primitive
1 parent fe24217 commit 1c14e25

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

invokeai/app/invocations/primitives.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -265,13 +265,9 @@ class ImageInvocation(BaseInvocation):
265265
image: ImageField = InputField(description="The image to load")
266266

267267
def invoke(self, context: InvocationContext) -> ImageOutput:
268-
image = context.images.get_pil(self.image.image_name)
268+
image_dto = context.images.get_dto(self.image.image_name)
269269

270-
return ImageOutput(
271-
image=ImageField(image_name=self.image.image_name),
272-
width=image.width,
273-
height=image.height,
274-
)
270+
return ImageOutput.build(image_dto=image_dto)
275271

276272

277273
@invocation(

0 commit comments

Comments
 (0)