This commit is contained in:
lllyasviel
2023-10-03 16:08:06 -07:00
committed by GitHub
parent 80632d5eb3
commit 6c56b580d7
5 changed files with 15 additions and 7 deletions
+4 -2
View File
@@ -47,7 +47,7 @@ def worker():
execution_start_time = time.perf_counter()
prompt, negative_prompt, style_selections, performance_selction, \
aspect_ratios_selction, image_number, image_seed, sharpness, adm_scaler_positive, adm_scaler_negative, guidance_scale, adaptive_cfg, sampler_name, \
aspect_ratios_selction, image_number, image_seed, sharpness, adm_scaler_positive, adm_scaler_negative, guidance_scale, adaptive_cfg, sampler_name, scheduler_name, \
base_model_name, refiner_model_name, \
l1, w1, l2, w2, l3, w3, l4, w4, l5, w5, \
input_image_checkbox, current_tab, \
@@ -241,7 +241,7 @@ def worker():
sampler_name = 'dpmpp_fooocus_2m_sde_inpaint_seamless'
print(f'[Parameters] Sampler = {sampler_name}')
print(f'[Parameters] Sampler = {sampler_name} - {scheduler_name}')
progressbar(1, 'Initializing ...')
@@ -360,6 +360,7 @@ def worker():
image_seed=task['task_seed'],
callback=callback,
sampler_name=sampler_name,
scheduler_name=scheduler_name,
latent=initial_latent,
denoise=denoising_strength,
tiled=tiled,
@@ -383,6 +384,7 @@ def worker():
('Base Model', base_model_name),
('Refiner Model', refiner_model_name),
('Sampler', sampler_name),
('Scheduler', scheduler_name),
('Seed', task['task_seed'])
]
for n, w in loras_user_raw_input:
+5 -3
View File
@@ -198,7 +198,7 @@ expansion = FooocusExpansion()
@torch.no_grad()
@torch.inference_mode()
def process_diffusion(positive_cond, negative_cond, steps, switch, width, height, image_seed, callback, sampler_name, latent=None, denoise=1.0, tiled=False, cfg_scale=7.0):
def process_diffusion(positive_cond, negative_cond, steps, switch, width, height, image_seed, callback, sampler_name, scheduler_name, latent=None, denoise=1.0, tiled=False, cfg_scale=7.0):
if latent is None:
empty_latent = core.generate_empty_latent(width=width, height=height, batch_size=1)
else:
@@ -219,7 +219,8 @@ def process_diffusion(positive_cond, negative_cond, steps, switch, width, height
denoise=denoise,
callback_function=callback,
cfg=cfg_scale,
sampler_name=sampler_name
sampler_name=sampler_name,
scheduler=scheduler_name
)
else:
sampled_latent = core.ksampler(
@@ -232,7 +233,8 @@ def process_diffusion(positive_cond, negative_cond, steps, switch, width, height
denoise=denoise,
callback_function=callback,
cfg=cfg_scale,
sampler_name=sampler_name
sampler_name=sampler_name,
scheduler=scheduler_name
)
decoded_latent = core.decode_vae(vae=xl_base_patched.vae, latent_image=sampled_latent, tiled=tiled)
+3
View File
@@ -18,3 +18,6 @@ sampler_list = ["euler", "euler_ancestral", "heun", "dpm_2", "dpm_2_ancestral",
# "dpmpp_fooocus_2m_sde_inpaint_seamless"
]
default_sampler = 'dpmpp_2m_sde_gpu'
scheduler_list = ["normal", "karras", "exponential", "sgm_uniform", "simple", "ddim_uniform"]
default_scheduler = "karras"