poc streaming image response

This commit is contained in:
caranicas 2022-09-26 17:06:42 -04:00
parent 6effd783c0
commit afd8717c21
2 changed files with 8 additions and 0 deletions

View File

@ -44,6 +44,12 @@ const LoadingDisplay = () => {
<>
<h4 className="loading">Loading...</h4>
<p>{percent} % Complete </p>
{progressImages.map((image, index) => {
return (
<img src={`http://localhost:9000${image}`} key={index} />
)
})
}
</>
);
};

View File

@ -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<ImageCreateState>(
parallelCount: 1,
requestOptions: {
session_id: new Date().getTime().toString(),
prompt: "a photograph of an astronaut riding a horse",
seed: useRandomSeed(),
num_outputs: 1,