mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
do not try to save base64 intermediates in gallery on cancellation
This commit is contained in:
parent
4013e8ad6f
commit
7c5305ccba
@ -642,12 +642,12 @@ class InvokeAIWebServer:
|
||||
(width, height) = image.size
|
||||
buffered = io.BytesIO()
|
||||
image.save(buffered, format="PNG")
|
||||
img_str = base64.b64encode(buffered.getvalue()).decode('UTF-8')
|
||||
img_base64 = "data:image/jpeg;base64," + img_str
|
||||
img_base64 = "data:image/jpeg;base64," + base64.b64encode(buffered.getvalue()).decode('UTF-8')
|
||||
self.socketio.emit(
|
||||
"intermediateResult",
|
||||
{
|
||||
"url": img_base64,
|
||||
"isBase64": True,
|
||||
"mtime": 0,
|
||||
"metadata": {},
|
||||
"width": width,
|
||||
|
829
frontend/dist/assets/index.4488003f.js
vendored
829
frontend/dist/assets/index.4488003f.js
vendored
File diff suppressed because one or more lines are too long
517
frontend/dist/assets/index.e2832fd4.js
vendored
Normal file
517
frontend/dist/assets/index.e2832fd4.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
frontend/dist/index.html
vendored
2
frontend/dist/index.html
vendored
@ -6,7 +6,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>InvokeAI - A Stable Diffusion Toolkit</title>
|
||||
<link rel="shortcut icon" type="icon" href="./assets/favicon.0d253ced.ico" />
|
||||
<script type="module" crossorigin src="./assets/index.4488003f.js"></script>
|
||||
<script type="module" crossorigin src="./assets/index.e2832fd4.js"></script>
|
||||
<link rel="stylesheet" href="./assets/index.52c8231e.css">
|
||||
</head>
|
||||
|
||||
|
1
frontend/src/app/invokeai.d.ts
vendored
1
frontend/src/app/invokeai.d.ts
vendored
@ -116,6 +116,7 @@ export declare type Image = {
|
||||
width: number;
|
||||
height: number;
|
||||
category: GalleryCategory;
|
||||
isBase64: boolean;
|
||||
};
|
||||
|
||||
// GalleryImages is an array of Image.
|
||||
|
@ -261,6 +261,7 @@ const makeSocketIOListeners = (
|
||||
const { intermediateImage } = getState().gallery;
|
||||
|
||||
if (intermediateImage) {
|
||||
if (!intermediateImage.isBase64) {
|
||||
dispatch(
|
||||
addImage({
|
||||
category: 'result',
|
||||
@ -273,6 +274,7 @@ const makeSocketIOListeners = (
|
||||
message: `Intermediate image saved: ${intermediateImage.url}`,
|
||||
})
|
||||
);
|
||||
}
|
||||
dispatch(clearIntermediateImage());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user