From afd8717c213cb9cdfedc506a6287af9ed1248444 Mon Sep 17 00:00:00 2001 From: caranicas Date: Mon, 26 Sep 2022 17:06:42 -0400 Subject: [PATCH] poc streaming image response --- .../organisms/displayPanel/currentDisplay/index.tsx | 6 ++++++ ui/frontend/build_src/src/stores/imageCreateStore.ts | 2 ++ 2 files changed, 8 insertions(+) diff --git a/ui/frontend/build_src/src/components/organisms/displayPanel/currentDisplay/index.tsx b/ui/frontend/build_src/src/components/organisms/displayPanel/currentDisplay/index.tsx index 050c75b6..f8218ced 100644 --- a/ui/frontend/build_src/src/components/organisms/displayPanel/currentDisplay/index.tsx +++ b/ui/frontend/build_src/src/components/organisms/displayPanel/currentDisplay/index.tsx @@ -44,6 +44,12 @@ const LoadingDisplay = () => { <>

Loading...

{percent} % Complete

+ {progressImages.map((image, index) => { + return ( + + ) + }) + } ); }; diff --git a/ui/frontend/build_src/src/stores/imageCreateStore.ts b/ui/frontend/build_src/src/stores/imageCreateStore.ts index 055176a1..d2aca528 100644 --- a/ui/frontend/build_src/src/stores/imageCreateStore.ts +++ b/ui/frontend/build_src/src/stores/imageCreateStore.ts @@ -22,6 +22,7 @@ export const SAMPLER_OPTIONS = [ ] as const; export interface ImageRequest { + session_id: string; prompt: string; seed: number; num_outputs: number; @@ -118,6 +119,7 @@ export const useImageCreate = create( parallelCount: 1, requestOptions: { + session_id: new Date().getTime().toString(), prompt: "a photograph of an astronaut riding a horse", seed: useRandomSeed(), num_outputs: 1,