Skip to content

Commit fdc924d

Browse files
committed
Don't crop preview image #2418 #2419
* always use generated image extent * only apply offset from bounds * custom workflows may choose a different arbitrary output size * non-custom workflow output should always match bounds anyway?
1 parent 258e371 commit fdc924d

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

ai_diffusion/model.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -722,9 +722,7 @@ def show_preview(self, job_id: str, index: int, name_prefix="Preview"):
722722

723723
name = f"[{name_prefix}] {trim_text(job.params.name, 77)}"
724724
image = job.results[index]
725-
bounds = job.params.bounds
726-
if image.extent != bounds.extent:
727-
image = Image.crop(image, Bounds(0, 0, *Extent.min(bounds.extent, image.extent)))
725+
bounds = Bounds(*job.params.bounds.offset, *image.extent)
728726
if self._layer and self._layer.was_removed:
729727
self._layer = None # layer was removed by user
730728
if self._layer is not None:

0 commit comments

Comments
 (0)