mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): get intermediate images working but types are stubbed out
This commit is contained in:
parent
2db2c986d1
commit
7b10762ea1
@ -15,6 +15,7 @@ import {
|
|||||||
import {
|
import {
|
||||||
addImage,
|
addImage,
|
||||||
clearIntermediateImage,
|
clearIntermediateImage,
|
||||||
|
setIntermediateImage,
|
||||||
} from 'features/gallery/store/gallerySlice';
|
} from 'features/gallery/store/gallerySlice';
|
||||||
|
|
||||||
import type { RootState } from 'app/store';
|
import type { RootState } from 'app/store';
|
||||||
@ -85,6 +86,8 @@ const makeSocketIOListeners = (
|
|||||||
const sessionId = data.graph_execution_state_id;
|
const sessionId = data.graph_execution_state_id;
|
||||||
if (data.result.type === 'image') {
|
if (data.result.type === 'image') {
|
||||||
const url = `api/v1/images/${data.result.image.image_type}/${data.result.image.image_name}`;
|
const url = `api/v1/images/${data.result.image.image_type}/${data.result.image.image_name}`;
|
||||||
|
|
||||||
|
// need to update the type for this or figure out how to get these values
|
||||||
dispatch(
|
dispatch(
|
||||||
addImage({
|
addImage({
|
||||||
category: 'result',
|
category: 'result',
|
||||||
@ -124,7 +127,17 @@ const makeSocketIOListeners = (
|
|||||||
console.log('generator_progress', data);
|
console.log('generator_progress', data);
|
||||||
dispatch(setProgress(data.step / data.total_steps));
|
dispatch(setProgress(data.step / data.total_steps));
|
||||||
if (data.progress_image) {
|
if (data.progress_image) {
|
||||||
dispatch(setProgressImage(data.progress_image));
|
dispatch(
|
||||||
|
setIntermediateImage({
|
||||||
|
// need to update the type for this or figure out how to get these values
|
||||||
|
category: 'result',
|
||||||
|
uuid: uuidv4(),
|
||||||
|
mtime: new Date().getTime(),
|
||||||
|
url: data.progress_image.dataURL,
|
||||||
|
thumbnail: '',
|
||||||
|
...data.progress_image,
|
||||||
|
})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user