fix(api): correct order for img2img params
This commit is contained in:
parent
35445ff0f6
commit
6fcfe4f878
|
@ -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
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue