diff options
author | space-nuko <24979496+space-nuko@users.noreply.github.com> | 2023-02-10 13:27:05 +0000 |
---|---|---|
committer | space-nuko <24979496+space-nuko@users.noreply.github.com> | 2023-02-10 13:27:05 +0000 |
commit | 79ffb9453f8eddbdd4e316b9d9c75812b0eea4e1 (patch) | |
tree | 03793e161ca395aa60b44c046210a8b88a8bb73a /scripts/xyz_grid.py | |
parent | c88dcc20d495dab4be2692bdff30277112dbe416 (diff) | |
download | stable-diffusion-webui-gfx803-79ffb9453f8eddbdd4e316b9d9c75812b0eea4e1.tar.gz stable-diffusion-webui-gfx803-79ffb9453f8eddbdd4e316b9d9c75812b0eea4e1.tar.bz2 stable-diffusion-webui-gfx803-79ffb9453f8eddbdd4e316b9d9c75812b0eea4e1.zip |
Add UniPC sampler settings
Diffstat (limited to 'scripts/xyz_grid.py')
-rw-r--r-- | scripts/xyz_grid.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/xyz_grid.py b/scripts/xyz_grid.py index 5982cfba..72421e0c 100644 --- a/scripts/xyz_grid.py +++ b/scripts/xyz_grid.py @@ -126,6 +126,10 @@ def apply_styles(p: StableDiffusionProcessingTxt2Img, x: str, _): p.styles.extend(x.split(','))
+def apply_uni_pc_order(p, x, xs):
+ opts.data["uni_pc_order"] = min(x, p.steps - 1)
+
+
def format_value_add_label(p, opt, x):
if type(x) == float:
x = round(x, 8)
@@ -202,6 +206,7 @@ axis_options = [ AxisOptionImg2Img("Cond. Image Mask Weight", float, apply_field("inpainting_mask_weight")),
AxisOption("VAE", str, apply_vae, cost=0.7, choices=lambda: list(sd_vae.vae_dict)),
AxisOption("Styles", str, apply_styles, choices=lambda: list(shared.prompt_styles.styles)),
+ AxisOption("UniPC Order", int, apply_uni_pc_order, cost=0.5),
]
@@ -310,9 +315,11 @@ class SharedSettingsStackHelper(object): def __enter__(self):
self.CLIP_stop_at_last_layers = opts.CLIP_stop_at_last_layers
self.vae = opts.sd_vae
+ self.uni_pc_order = opts.uni_pc_order
def __exit__(self, exc_type, exc_value, tb):
opts.data["sd_vae"] = self.vae
+ opts.data["uni_pc_order"] = self.uni_pc_order
modules.sd_models.reload_model_weights()
modules.sd_vae.reload_vae_weights()
|