aboutsummaryrefslogtreecommitdiffstats
path: root/modules/processing.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2022-09-14 14:56:21 +0000
committerAUTOMATIC <16777216c@gmail.com>2022-09-14 14:56:21 +0000
commit9f267af3f7404d8d8a9123e8e1c07a6557eba54d (patch)
tree2e4a0c310f8f78377f295edf7867f2a70b39fa96 /modules/processing.py
parent6153d9d9e9d51708e8f96eb8aaecf168adfcf4b7 (diff)
downloadstable-diffusion-webui-gfx803-9f267af3f7404d8d8a9123e8e1c07a6557eba54d.tar.gz
stable-diffusion-webui-gfx803-9f267af3f7404d8d8a9123e8e1c07a6557eba54d.tar.bz2
stable-diffusion-webui-gfx803-9f267af3f7404d8d8a9123e8e1c07a6557eba54d.zip
added a second style field
added the ability to use {prompt} in styles added a button to apply style to textbox rearranged top row for UI
Diffstat (limited to 'modules/processing.py')
-rw-r--r--modules/processing.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/processing.py b/modules/processing.py
index ca32c610..38e74fe2 100644
--- a/modules/processing.py
+++ b/modules/processing.py
@@ -46,14 +46,14 @@ def apply_color_correction(correction, image):
class StableDiffusionProcessing:
- def __init__(self, sd_model=None, outpath_samples=None, outpath_grids=None, prompt="", prompt_style="None", seed=-1, subseed=-1, subseed_strength=0, seed_resize_from_h=-1, seed_resize_from_w=-1, sampler_index=0, batch_size=1, n_iter=1, steps=50, cfg_scale=7.0, width=512, height=512, restore_faces=False, tiling=False, do_not_save_samples=False, do_not_save_grid=False, extra_generation_params=None, overlay_images=None, negative_prompt=None):
+ def __init__(self, sd_model=None, outpath_samples=None, outpath_grids=None, prompt="", styles=None, seed=-1, subseed=-1, subseed_strength=0, seed_resize_from_h=-1, seed_resize_from_w=-1, sampler_index=0, batch_size=1, n_iter=1, steps=50, cfg_scale=7.0, width=512, height=512, restore_faces=False, tiling=False, do_not_save_samples=False, do_not_save_grid=False, extra_generation_params=None, overlay_images=None, negative_prompt=None):
self.sd_model = sd_model
self.outpath_samples: str = outpath_samples
self.outpath_grids: str = outpath_grids
self.prompt: str = prompt
self.prompt_for_display: str = None
self.negative_prompt: str = (negative_prompt or "")
- self.prompt_style: str = prompt_style
+ self.styles: str = styles
self.seed: int = seed
self.subseed: int = subseed
self.subseed_strength: float = subseed_strength
@@ -182,7 +182,7 @@ def process_images(p: StableDiffusionProcessing) -> Processed:
comments = []
- modules.styles.apply_style(p, shared.prompt_styles[p.prompt_style])
+ shared.prompt_styles.apply_styles(p)
if type(p.prompt) == list:
all_prompts = p.prompt