fix secondary sampler

This commit is contained in:
Vladimir Mandic
2023-07-21 10:20:53 -04:00
parent b31fa98669
commit dd1d4bcffa
6 changed files with 8 additions and 8 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 18 KiB

+1
View File
@@ -612,6 +612,7 @@ def set_environment():
os.environ.setdefault('NUMEXPR_MAX_THREADS', '16')
os.environ.setdefault('PYTHONHTTPSVERIFY', '0')
os.environ.setdefault('HF_HUB_DISABLE_TELEMETRY', '1')
os.environ.setdefault('HF_HUB_DISABLE_EXPERIMENTAL_WARNING', '1')
os.environ.setdefault('UVICORN_TIMEOUT_KEEP_ALIVE', '60')
if sys.platform == 'darwin':
os.environ.setdefault('PYTORCH_ENABLE_MPS_FALLBACK', '1')
+4
View File
@@ -103,6 +103,9 @@ svg.feather.feather-image, .feather .feather-image { display: none }
#txt2img_checkboxes, #img2img_checkboxes { background-color: transparent; }
#txt2img_checkboxes, #img2img_checkboxes { margin-bottom: 0.2em; }
#txt2img_gallery, #img2img_gallery, #extras_gallery { padding: 0; margin: 0; object-fit: contain; box-shadow: none; min-height: 0; }
#txt2img_actions_column, #img2img_actions_column { display: -webkit-box; -webkit-box-pack: justify; }
#txt2img_enqueue_wrapper, #img2img_enqueue_wrapper { min-width: unset; width: 48%; }
#txt2img_generate_box, #img2img_generate_box { min-width: unset; width: 48%; }
#extras_upscale { margin-top: 10px }
#txt2img_progress_row > div { min-width: var(--left-column); max-width: var(--left-column); }
@@ -115,6 +118,7 @@ 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; }
/* custom elements overrides */
#steps-animation, #controlnet { border-width: 0; }
-1
View File
@@ -110,7 +110,6 @@ button.custom-button{
#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; }
#txt2img_tools > div > button, #img2img_tools > div > button { scale: 120%; }
#refresh_txt2img_styles, #refresh_img2img_styles { height: 2.46em; margin-left: -8px; }
.interrogate-col{
min-width: 0 !important;
+3 -7
View File
@@ -950,13 +950,9 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing):
samples = self.sd_model.get_first_stage_encoding(self.sd_model.encode_first_stage(decoded_samples))
image_conditioning = self.img2img_image_conditioning(decoded_samples, samples)
shared.state.nextjob()
img2img_sampler_name = self.sampler_name
force_latent_upscaler = shared.opts.data.get('force_latent_sampler')
if force_latent_upscaler != 'None' and force_latent_upscaler != 'PLMS':
img2img_sampler_name = force_latent_upscaler
if img2img_sampler_name == 'PLMS':
img2img_sampler_name = shared.opts.fallback_sampler if shared.opts.fallback_sampler != 'PLMS' else 'UniPC'
self.sampler = sd_samplers.create_sampler(img2img_sampler_name, self.sd_model)
if self.latent_sampler == "PLMS":
self.latent_sampler = 'UniPC'
self.sampler = sd_samplers.create_sampler(self.latent_sampler or self.sampler_name, self.sd_model)
samples = samples[:, :, self.truncate_y//2:samples.shape[2]-(self.truncate_y+1)//2, self.truncate_x//2:samples.shape[3]-(self.truncate_x+1)//2]
noise = create_random_tensors(samples.shape[1:], seeds=seeds, subseeds=subseeds, subseed_strength=subseed_strength, p=self)
x = None