diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2024-01-02 03:47:26 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2024-01-02 03:47:26 +0000 |
commit | 1341b2208185cd89b0019bda2df63b406ec0cb5e (patch) | |
tree | bf117ec8bc0d738ef819fdcc97e7e5e0ea635642 /modules/upscaler_utils.py | |
parent | 6f9fcfdbb72e9dd4bee6e63d78b1b2df08cff98b (diff) | |
download | stable-diffusion-webui-gfx803-1341b2208185cd89b0019bda2df63b406ec0cb5e.tar.gz stable-diffusion-webui-gfx803-1341b2208185cd89b0019bda2df63b406ec0cb5e.tar.bz2 stable-diffusion-webui-gfx803-1341b2208185cd89b0019bda2df63b406ec0cb5e.zip |
add an option to hide upscaling progressbar
Diffstat (limited to 'modules/upscaler_utils.py')
-rw-r--r-- | modules/upscaler_utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/upscaler_utils.py b/modules/upscaler_utils.py index f5cb92d5..9379f512 100644 --- a/modules/upscaler_utils.py +++ b/modules/upscaler_utils.py @@ -47,7 +47,7 @@ def upscale_with_model( grid = images.split_grid(img, tile_size, tile_size, tile_overlap) newtiles = [] - with tqdm.tqdm(total=grid.tile_count, desc=desc) as p: + with tqdm.tqdm(total=grid.tile_count, desc=desc, disable=not shared.opts.enable_upscale_progressbar) as p: for y, h, row in grid.tiles: newrow = [] for x, w, tile in row: @@ -103,7 +103,7 @@ def tiled_upscale_2( ).type_as(img) weights = torch.zeros_like(result) logger.debug("Upscaling %s to %s with tiles", img.shape, result.shape) - with tqdm.tqdm(total=len(h_idx_list) * len(w_idx_list), desc=desc) as pbar: + with tqdm.tqdm(total=len(h_idx_list) * len(w_idx_list), desc=desc, disable=not shared.opts.enable_upscale_progressbar) as pbar: for h_idx in h_idx_list: if shared.state.interrupted or shared.state.skipped: break |