forked from extern/easydiffusion
poc streaming image response
This commit is contained in:
parent
6effd783c0
commit
afd8717c21
@ -44,6 +44,12 @@ const LoadingDisplay = () => {
|
|||||||
<>
|
<>
|
||||||
<h4 className="loading">Loading...</h4>
|
<h4 className="loading">Loading...</h4>
|
||||||
<p>{percent} % Complete </p>
|
<p>{percent} % Complete </p>
|
||||||
|
{progressImages.map((image, index) => {
|
||||||
|
return (
|
||||||
|
<img src={`http://localhost:9000${image}`} key={index} />
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -22,6 +22,7 @@ export const SAMPLER_OPTIONS = [
|
|||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
export interface ImageRequest {
|
export interface ImageRequest {
|
||||||
|
session_id: string;
|
||||||
prompt: string;
|
prompt: string;
|
||||||
seed: number;
|
seed: number;
|
||||||
num_outputs: number;
|
num_outputs: number;
|
||||||
@ -118,6 +119,7 @@ export const useImageCreate = create<ImageCreateState>(
|
|||||||
parallelCount: 1,
|
parallelCount: 1,
|
||||||
|
|
||||||
requestOptions: {
|
requestOptions: {
|
||||||
|
session_id: new Date().getTime().toString(),
|
||||||
prompt: "a photograph of an astronaut riding a horse",
|
prompt: "a photograph of an astronaut riding a horse",
|
||||||
seed: useRandomSeed(),
|
seed: useRandomSeed(),
|
||||||
num_outputs: 1,
|
num_outputs: 1,
|
||||||
|
Loading…
Reference in New Issue
Block a user