mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Fixes b64 image sending and displaying
This commit is contained in:
parent
d1dfd257f9
commit
4013e8ad6f
@ -642,8 +642,8 @@ class InvokeAIWebServer:
|
||||
(width, height) = image.size
|
||||
buffered = io.BytesIO()
|
||||
image.save(buffered, format="PNG")
|
||||
img_str = base64.b64encode(buffered.getvalue())
|
||||
img_base64 = bytes("data:image/jpeg;base64,", encoding='utf-8') + img_str
|
||||
img_str = base64.b64encode(buffered.getvalue()).decode('UTF-8')
|
||||
img_base64 = "data:image/jpeg;base64," + img_str
|
||||
self.socketio.emit(
|
||||
"intermediateResult",
|
||||
{
|
||||
|
@ -44,13 +44,13 @@ const systemSelector = createSelector(
|
||||
[
|
||||
(state: RootState) => state.system,
|
||||
(state: RootState) => state.options,
|
||||
intermediateImageSelector,
|
||||
(state: RootState) => state.gallery,
|
||||
activeTabNameSelector,
|
||||
],
|
||||
(
|
||||
system: SystemState,
|
||||
options: OptionsState,
|
||||
intermediateImage,
|
||||
gallery: GalleryState,
|
||||
activeTabName
|
||||
) => {
|
||||
const { isProcessing, isConnected, isGFPGANAvailable, isESRGANAvailable } =
|
||||
@ -59,6 +59,8 @@ const systemSelector = createSelector(
|
||||
const { upscalingLevel, facetoolStrength, shouldShowImageDetails } =
|
||||
options;
|
||||
|
||||
const { intermediateImage } = gallery;
|
||||
|
||||
return {
|
||||
isProcessing,
|
||||
isConnected,
|
||||
|
Loading…
Reference in New Issue
Block a user