1
0
Fork 0

fix(api): correct order for img2img params

This commit is contained in:
Sean Sube 2023-02-05 22:48:07 -06:00
parent 35445ff0f6
commit 6fcfe4f878
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
2 changed files with 11 additions and 5 deletions

View File

@ -1,5 +1,5 @@
from logging import getLogger from logging import getLogger
from typing import Any, Tuple from typing import Any, Optional, Tuple
import numpy as np import numpy as np
from diffusers import DiffusionPipeline from diffusers import DiffusionPipeline
@ -9,9 +9,15 @@ from ..utils import run_gc
logger = getLogger(__name__) logger = getLogger(__name__)
last_pipeline_instance = None last_pipeline_instance: Any = None
last_pipeline_options = (None, None, None) last_pipeline_options: Tuple[
last_pipeline_scheduler = None Optional[DiffusionPipeline],
Optional[str],
Optional[str],
Optional[str],
Optional[bool],
] = (None, None, None, None, None)
last_pipeline_scheduler: Any = None
latent_channels = 4 latent_channels = 4
latent_factor = 8 latent_factor = 8

View File

@ -111,8 +111,8 @@ def run_img2img_pipeline(
else: else:
rng = np.random.RandomState(params.seed) rng = np.random.RandomState(params.seed)
result = pipe( result = pipe(
source_image,
params.prompt, params.prompt,
source_image,
generator=rng, generator=rng,
guidance_scale=params.cfg, guidance_scale=params.cfg,
negative_prompt=params.negative_prompt, negative_prompt=params.negative_prompt,