1
0
Fork 0

use batch size when generating latents

This commit is contained in:
Sean Sube 2023-02-20 21:57:46 -06:00
parent f7903b53d0
commit b65e4e7cbe
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
2 changed files with 2 additions and 1 deletions

View File

@ -28,7 +28,7 @@ def run_txt2img_pipeline(
outputs: List[str], outputs: List[str],
upscale: UpscaleParams, upscale: UpscaleParams,
) -> None: ) -> None:
latents = get_latents_from_seed(params.seed, size) latents = get_latents_from_seed(params.seed, size, batch=params.batch)
pipe = load_pipeline( pipe = load_pipeline(
server, server,
OnnxStableDiffusionPipeline, OnnxStableDiffusionPipeline,

View File

@ -280,6 +280,7 @@ export function makeApiUrl(root: string, ...path: Array<string>) {
*/ */
export function makeImageURL(root: string, type: string, params: BaseImgParams): URL { export function makeImageURL(root: string, type: string, params: BaseImgParams): URL {
const url = makeApiUrl(root, type); const url = makeApiUrl(root, type);
url.searchParams.append('batch', params.batch.toFixed(FIXED_INTEGER));
url.searchParams.append('cfg', params.cfg.toFixed(FIXED_FLOAT)); url.searchParams.append('cfg', params.cfg.toFixed(FIXED_FLOAT));
url.searchParams.append('eta', params.eta.toFixed(FIXED_FLOAT)); url.searchParams.append('eta', params.eta.toFixed(FIXED_FLOAT));
url.searchParams.append('steps', params.steps.toFixed(FIXED_INTEGER)); url.searchParams.append('steps', params.steps.toFixed(FIXED_INTEGER));