Skip to content

Commit 63c944d

Browse files
committed
Try to fix crash in tests (windows CI)
1 parent 9141283 commit 63c944d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ai_diffusion/image.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,8 @@ def from_packed_bytes(data: QByteArray, extent: Extent, channels: int | None = N
338338
)
339339
stride = extent.width * channels
340340
format = QImage.Format.Format_ARGB32 if channels == 4 else QImage.Format.Format_Grayscale8
341-
qimg = QImage(data, extent.width, extent.height, stride, format)
342-
return Image(qimg)
341+
qimg = QImage(data.data(), extent.width, extent.height, stride, format)
342+
return Image(qimg.copy())
343343

344344
@staticmethod
345345
def copy(image: Image):

0 commit comments

Comments
 (0)