diff --git a/api/onnx_web/pipeline.py b/api/onnx_web/pipeline.py index 0d7701e2..58cab46c 100644 --- a/api/onnx_web/pipeline.py +++ b/api/onnx_web/pipeline.py @@ -37,7 +37,7 @@ def get_latents_from_seed(seed: int, size: Size) -> np.ndarray: From https://www.travelneil.com/stable-diffusion-updates.html ''' # 1 is batch size - latents_shape = (1, 4, size.width // 8, size.height // 8) + latents_shape = (1, 4, size.height // 8, size.width // 8) # Gotta use numpy instead of torch, because torch's randn() doesn't support DML rng = np.random.default_rng(seed) image_latents = rng.standard_normal(latents_shape).astype(np.float32) @@ -92,8 +92,8 @@ def run_txt2img_pipeline( image = pipe( params.prompt, - size.width, - size.height, + height=size.height, + width=size.width, generator=rng, guidance_scale=params.cfg, latents=latents, diff --git a/api/params.json b/api/params.json index b35d21bf..6d19eea0 100644 --- a/api/params.json +++ b/api/params.json @@ -21,7 +21,7 @@ "height": { "default": 512, "min": 64, - "max": 512, + "max": 1024, "step": 8 }, "model": { @@ -77,7 +77,7 @@ "width": { "default": 512, "min": 64, - "max": 512, + "max": 1024, "step": 8 } } \ No newline at end of file