Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

Commit

Permalink
🔄 Synced local 'scripts/webui.py' with remote 'webui.py'
Browse files Browse the repository at this point in the history
  • Loading branch information
hlky authored and hlky committed Aug 29, 2022
1 parent e2c609e commit 594a72f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scripts/webui.py
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ def process_images(
save_sample(image, sample_path_i, gfpgan_filename, jpg_sample, prompts, seeds, width, height, steps, cfg_scale,
normalize_prompt_weights, use_GFPGAN, write_info_files, prompt_matrix, init_img, uses_loopback, uses_random_seed_loopback, skip_save,
skip_grid, sort_samples, sampler_name, ddim_eta, n_iter, batch_size, i, denoising_strength, resize_mode)
x_sample = original_sample
x_sample = gfpgan_sample

if use_RealESRGAN and RealESRGAN is not None and not use_GFPGAN:
torch_gc()
Expand All @@ -817,7 +817,7 @@ def process_images(
save_sample(image, sample_path_i, esrgan_filename, jpg_sample, prompts, seeds, width, height, steps, cfg_scale,
normalize_prompt_weights, use_GFPGAN, write_info_files, prompt_matrix, init_img, uses_loopback, uses_random_seed_loopback, skip_save,
skip_grid, sort_samples, sampler_name, ddim_eta, n_iter, batch_size, i, denoising_strength, resize_mode)
x_sample = original_sample
x_sample = esrgan_sample

if use_RealESRGAN and RealESRGAN is not None and use_GFPGAN and GFPGAN is not None:
torch_gc()
Expand All @@ -826,13 +826,13 @@ def process_images(
if RealESRGAN.model.name != realesrgan_model_name:
try_loading_RealESRGAN(realesrgan_model_name)
output, img_mode = RealESRGAN.enhance(gfpgan_sample[:,:,::-1])
esrgan_filename = original_filename + '-gfpgan-esrgan4x'
esrgan_sample = output[:,:,::-1]
image = Image.fromarray(esrgan_sample)
save_sample(image, sample_path_i, esrgan_filename, jpg_sample, prompts, seeds, width, height, steps, cfg_scale,
gfpgan_esrgan_filename = original_filename + '-gfpgan-esrgan4x'
gfpgan_esrgan_sample = output[:,:,::-1]
image = Image.fromarray(gfpgan_esrgan_sample)
save_sample(image, sample_path_i, gfpgan_esrgan_filename, jpg_sample, prompts, seeds, width, height, steps, cfg_scale,
normalize_prompt_weights, use_GFPGAN, write_info_files, prompt_matrix, init_img, uses_loopback, uses_random_seed_loopback, skip_save,
skip_grid, sort_samples, sampler_name, ddim_eta, n_iter, batch_size, i, denoising_strength, resize_mode)
x_sample = original_sample
x_sample = gfpgan_esrgan_sample

image = Image.fromarray(x_sample)
if init_mask:
Expand Down

0 comments on commit 594a72f

Please sign in to comment.