Skip to content

Commit a946052

Browse files
fix(ui): progress image renders at physical size
1 parent faf8f0f commit a946052

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

invokeai/frontend/web/src/features/controlLayers/konva/CanvasStagingAreaModule.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,12 @@ export class CanvasStagingAreaModule extends CanvasModuleBase {
233233
this.image = new CanvasObjectImage({ id: 'staging-area-image', type: 'image', image }, this, {
234234
// Some models do not make guarantees about their output dimensions. This flag allows the staged images to
235235
// render at their real dimensions, instead of the bbox size.
236-
usePhysicalDimensions: true,
236+
//
237+
// When the image source is an image name, it is a final output image. In that case, we should use its
238+
// physical dimensions. Otherwise, if it is a dataURL, that means it is a progress image. These come in at
239+
// a smaller resolution and need to be stretched to fill the bbox, so we do not use the physical
240+
// dimensions in that case.
241+
usePhysicalDimensions: imageSrc.type === 'imageName',
237242
});
238243
await this.image.update(this.image.state, true);
239244
this.konva.group.add(this.image.konva.group);

0 commit comments

Comments
 (0)