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 {
|
||||
addImage,
|
||||
clearIntermediateImage,
|
||||
setIntermediateImage,
|
||||
} from 'features/gallery/store/gallerySlice';
|
||||
|
||||
import type { RootState } from 'app/store';
|
||||
@ -85,6 +86,8 @@ const makeSocketIOListeners = (
|
||||
const sessionId = data.graph_execution_state_id;
|
||||
if (data.result.type === 'image') {
|
||||
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(
|
||||
addImage({
|
||||
category: 'result',
|
||||
@ -124,7 +127,17 @@ const makeSocketIOListeners = (
|
||||
console.log('generator_progress', data);
|
||||
dispatch(setProgress(data.step / data.total_steps));
|
||||
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) {
|
||||
console.error(e);
|
||||
|
Loading…
Reference in New Issue
Block a user