From 7435caaba5c162cd011401b21713592b21403d7f Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Mon, 17 Jun 2024 10:44:18 -0400 Subject: [PATCH] fix control api --- CHANGELOG.md | 1 + modules/control/run.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8d77aa81..d0fd1e531 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,7 @@ - fix compatibility with latest adetailer - fix invalid sampler warning - fix starting from non git repo +- fix control api negative prompt handling - restructure api examples: `cli/api-*` - handle theme fallback when invalid theme is specified - remove obsolete training code leftovers diff --git a/modules/control/run.py b/modules/control/run.py index 944474d50..5e0749d81 100644 --- a/modules/control/run.py +++ b/modules/control/run.py @@ -55,7 +55,7 @@ def control_set(kwargs): def control_run(units: List[unit.Unit] = [], inputs: List[Image.Image] = [], inits: List[Image.Image] = [], mask: Image.Image = None, unit_type: str = None, is_generator: bool = True, input_type: int = 0, - prompt: str = '', negative: str = '', styles: List[str] = [], + prompt: str = '', negative_prompt: str = '', styles: List[str] = [], steps: int = 20, sampler_index: int = None, seed: int = -1, subseed: int = -1, subseed_strength: float = 0, seed_resize_from_h: int = -1, seed_resize_from_w: int = -1, cfg_scale: float = 6.0, clip_skip: float = 1.0, image_cfg_scale: float = 6.0, diffusers_guidance_rescale: float = 0.7, pag_scale: float = 0.0, pag_adaptive: float = 0.5, cfg_end: float = 1.0, @@ -94,7 +94,7 @@ def control_run(units: List[unit.Unit] = [], inputs: List[Image.Image] = [], ini p = StableDiffusionProcessingControl( prompt = prompt, - negative_prompt = negative, + negative_prompt = negative_prompt, styles = styles, steps = steps, n_iter = batch_count,