mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
fix refiner batch size
This commit is contained in:
Submodule extensions-builtin/stable-diffusion-webui-images-browser updated: 6386e0c8f5...b984cdd169
@@ -118,7 +118,8 @@ svg.feather.feather-image, .feather .feather-image { display: none }
|
||||
#txtimg_hr_finalres { max-width: 200px; }
|
||||
#pnginfo_html2_info { margin-top: -18px; background-color: var(--input-background-fill); padding: var(--input-padding) }
|
||||
#txt2img_tools > div > button, #img2img_tools > div > button { filter: hue-rotate(180deg) saturate(0.5); }
|
||||
#txt2img_tools, #img2img_tools { margin-top: -5px; margin-bottom: -5px; }
|
||||
#txt2img_tools, #img2img_tools { margin-top: -4px; margin-bottom: -4px; }
|
||||
#txt2img_styles_row { margin-top: -6px; }
|
||||
|
||||
/* custom elements overrides */
|
||||
#steps-animation, #controlnet { border-width: 0; }
|
||||
|
||||
@@ -103,9 +103,9 @@ button.custom-button{
|
||||
#txt2img_gallery img, #img2img_gallery img, #extras_gallery img { object-fit: scale-down; width: -webkit-fill-available !important; }
|
||||
#txt2img_footer, #img2img_footer, #extras_footer { height: fit-content; }
|
||||
#txt2img_footer, #img2img_footer { height: fit-content; display: none; }
|
||||
#txt2img_generate_box, #img2img_generate_box { gap: 0.5em; flex-wrap: wrap-reverse; }
|
||||
#txt2img_actions_column, #img2img_actions_column { gap: 0.5em; }
|
||||
#txt2img_generate_box > button, #img2img_generate_box > button { min-height: 36px; max-height: 42px; }
|
||||
#txt2img_generate_box, #img2img_generate_box { gap: 0.5em; flex-wrap: wrap-reverse; height: fit-content; }
|
||||
#txt2img_actions_column, #img2img_actions_column { gap: 0.5em; height: fit-content; }
|
||||
#txt2img_generate_box > button, #img2img_generate_box > button { min-height: 42px; max-height: 42px; }
|
||||
#txt2img_generate_line2, #img2img_generate_line2 { display: flex; }
|
||||
#txt2img_generate_line2 > button, #img2img_generate_line2 > button, #extras_generate_box > button { height: 2.2em; line-height: 0; min-width: unset; display: block !important; }
|
||||
#txt2img_tools > div, #img2img_tools > div { justify-content: space-around; margin-top: 0.5em; margin-bottom: 0em; }
|
||||
|
||||
@@ -150,6 +150,7 @@ class StableDiffusionProcessing:
|
||||
self.is_hr_pass = False
|
||||
self.enable_hr = None
|
||||
self.refiner_denoise_start = 0
|
||||
self.ops = []
|
||||
shared.opts.data['clip_skip'] = clip_skip
|
||||
|
||||
@property
|
||||
@@ -480,6 +481,7 @@ def create_infotext(p: StableDiffusionProcessing, all_prompts, all_seeds, all_su
|
||||
"Denoise end": p.refiner_denoise_end if p.enable_hr else None,
|
||||
# restore_faces
|
||||
"Face restoration": shared.opts.face_restoration_model if p.restore_faces else None,
|
||||
"Operations": ', '.join(p.ops),
|
||||
}
|
||||
token_merging_ratio = p.get_token_merging_ratio()
|
||||
token_merging_ratio_hr = p.get_token_merging_ratio(for_hr=True) if p.enable_hr else None
|
||||
|
||||
@@ -171,8 +171,8 @@ def process_diffusers(p: StableDiffusionProcessing, seeds, prompts, negative_pro
|
||||
for i in range(len(output.images)):
|
||||
pipe_args = set_pipeline_args(
|
||||
model=shared.sd_refiner,
|
||||
prompt=[p.refiner_prompt] if len(p.refiner_prompt) > 0 else prompts,
|
||||
negative_prompt=[p.refiner_negative] if len(p.refiner_negative) > 0 else negative_prompts,
|
||||
prompt=[p.refiner_prompt] if len(p.refiner_prompt) > 0 else prompts[i],
|
||||
negative_prompt=[p.refiner_negative] if len(p.refiner_negative) > 0 else negative_prompts[i],
|
||||
num_inference_steps=p.hr_second_pass_steps,
|
||||
eta=shared.opts.eta_ddim,
|
||||
strength=p.denoising_strength,
|
||||
@@ -184,10 +184,10 @@ def process_diffusers(p: StableDiffusionProcessing, seeds, prompts, negative_pro
|
||||
image=output.images[i],
|
||||
output_type='latent' if hasattr(shared.sd_refiner, 'vae') else 'np',
|
||||
)
|
||||
output = shared.sd_refiner(**pipe_args) # pylint: disable=not-callable
|
||||
refiner_output = shared.sd_refiner(**pipe_args) # pylint: disable=not-callable
|
||||
if not shared.state.interrupted and not shared.state.skipped:
|
||||
output.images = vae_decode(output.images, shared.sd_refiner)
|
||||
results.append(output.images[i])
|
||||
refiner_images = vae_decode(refiner_output.images, shared.sd_refiner)
|
||||
results.append(refiner_images[0])
|
||||
|
||||
if shared.opts.diffusers_move_refiner:
|
||||
shared.log.debug('Diffusers: Moving refiner model to CPU')
|
||||
|
||||
Reference in New Issue
Block a user