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
|
(width, height) = image.size
|
||||||
buffered = io.BytesIO()
|
buffered = io.BytesIO()
|
||||||
image.save(buffered, format="PNG")
|
image.save(buffered, format="PNG")
|
||||||
img_str = base64.b64encode(buffered.getvalue())
|
img_str = base64.b64encode(buffered.getvalue()).decode('UTF-8')
|
||||||
img_base64 = bytes("data:image/jpeg;base64,", encoding='utf-8') + img_str
|
img_base64 = "data:image/jpeg;base64," + img_str
|
||||||
self.socketio.emit(
|
self.socketio.emit(
|
||||||
"intermediateResult",
|
"intermediateResult",
|
||||||
{
|
{
|
||||||
|
@ -44,13 +44,13 @@ const systemSelector = createSelector(
|
|||||||
[
|
[
|
||||||
(state: RootState) => state.system,
|
(state: RootState) => state.system,
|
||||||
(state: RootState) => state.options,
|
(state: RootState) => state.options,
|
||||||
intermediateImageSelector,
|
(state: RootState) => state.gallery,
|
||||||
activeTabNameSelector,
|
activeTabNameSelector,
|
||||||
],
|
],
|
||||||
(
|
(
|
||||||
system: SystemState,
|
system: SystemState,
|
||||||
options: OptionsState,
|
options: OptionsState,
|
||||||
intermediateImage,
|
gallery: GalleryState,
|
||||||
activeTabName
|
activeTabName
|
||||||
) => {
|
) => {
|
||||||
const { isProcessing, isConnected, isGFPGANAvailable, isESRGANAvailable } =
|
const { isProcessing, isConnected, isGFPGANAvailable, isESRGANAvailable } =
|
||||||
@ -59,6 +59,8 @@ const systemSelector = createSelector(
|
|||||||
const { upscalingLevel, facetoolStrength, shouldShowImageDetails } =
|
const { upscalingLevel, facetoolStrength, shouldShowImageDetails } =
|
||||||
options;
|
options;
|
||||||
|
|
||||||
|
const { intermediateImage } = gallery;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
isProcessing,
|
isProcessing,
|
||||||
isConnected,
|
isConnected,
|
||||||
|
Loading…
Reference in New Issue
Block a user