mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
remove split-attention and add attention slicing option
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
@@ -20,6 +20,7 @@ from scripts.xyz.xyz_grid_shared import ( # pylint: disable=no-name-in-module, u
|
||||
apply_lora,
|
||||
apply_lora_strength,
|
||||
apply_te,
|
||||
apply_guidance,
|
||||
apply_styles,
|
||||
apply_upscaler,
|
||||
apply_context,
|
||||
@@ -223,6 +224,7 @@ axis_options = [
|
||||
AxisOption("[Sampler] Shift", float, apply_setting("schedulers_shift")),
|
||||
AxisOption("[Sampler] eta delta", float, apply_setting("eta_noise_seed_delta")),
|
||||
AxisOption("[Sampler] eta multiplier", float, apply_setting("scheduler_eta")),
|
||||
AxisOption("[Guidance] Guidance name", str, apply_guidance, choices=lambda: ['Default', 'CFG', 'Auto', 'Zero', 'PAG', 'APG', 'SLG', 'SEG', 'TCFG', 'FDG']),
|
||||
AxisOption("[Refine] Upscaler", str, apply_field("hr_upscaler"), cost=0.3, choices=lambda: [x.name for x in shared.sd_upscalers]),
|
||||
AxisOption("[Refine] Sampler", str, apply_hr_sampler_name, fmt=format_value_add_label, confirm=confirm_samplers, choices=lambda: [x.name for x in sd_samplers.samplers]),
|
||||
AxisOption("[Refine] Denoising strength", float, apply_field("denoising_strength")),
|
||||
|
||||
@@ -254,6 +254,13 @@ def apply_te(p, x, xs):
|
||||
shared.log.debug(f'XYZ grid apply text-encoder: "{x}"')
|
||||
|
||||
|
||||
def apply_guidance(p, x, xs):
|
||||
from modules.modular_guiders import guiders
|
||||
guiders = list(guiders.keys())
|
||||
p.guidance_name = [g for g in guiders if g.lower().startswith(x.lower())][0]
|
||||
shared.log.debug(f'XYZ grid apply guidance: "{p.guidance_name}"')
|
||||
|
||||
|
||||
def apply_styles(p: processing.StableDiffusionProcessingTxt2Img, x: str, _):
|
||||
p.styles.extend(x.split(','))
|
||||
shared.log.debug(f'XYZ grid apply style: "{x}"')
|
||||
|
||||
@@ -324,6 +324,7 @@ class Script(scripts_manager.Script):
|
||||
|
||||
def cell(x, y, z, ix, iy, iz):
|
||||
if shared.state.interrupted:
|
||||
shared.log.warning('XYZ grid: Interrupted')
|
||||
return processing.Processed(p, [], p.seed, ""), 0
|
||||
p.xyz = True
|
||||
pc = copy(p)
|
||||
|
||||
Reference in New Issue
Block a user