1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-02 15:04:50 +08:00

use comfy progress bar

This commit is contained in:
pythongosssss
2023-05-03 18:19:22 +01:00
parent fdf57325f4
commit 8912623ea9
2 changed files with 5 additions and 5 deletions

View File

@@ -41,8 +41,8 @@ class ImageUpscaleWithModel:
tile = 128 + 64
overlap = 8
its = -(in_img.shape[2] // -(tile - overlap)) * -(in_img.shape[3] // -(tile - overlap))
pbar = tqdm(total=its)
steps = -(in_img.shape[2] // -(tile - overlap)) * -(in_img.shape[3] // -(tile - overlap))
pbar = comfy.utils.ProgressBar(steps)
s = comfy.utils.tiled_scale(in_img, lambda a: upscale_model(a), tile_x=tile, tile_y=tile, overlap=overlap, upscale_amount=upscale_model.scale, pbar=pbar)
upscale_model.cpu()
s = torch.clamp(s.movedim(-3,-1), min=0, max=1.0)