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 typing import Any, Tuple
from typing import Any, Optional, Tuple
import numpy as np
from diffusers import DiffusionPipeline
@ -9,9 +9,15 @@ from ..utils import run_gc
logger = getLogger(__name__)
last_pipeline_instance = None
last_pipeline_options = (None, None, None)
last_pipeline_scheduler = None
last_pipeline_instance: Any = None
last_pipeline_options: Tuple[
Optional[DiffusionPipeline],
Optional[str],
Optional[str],
Optional[str],
Optional[bool],
] = (None, None, None, None, None)
last_pipeline_scheduler: Any = None
latent_channels = 4
latent_factor = 8

View File

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