clean reqs

This commit is contained in:
kijai
2024-04-02 00:37:30 +03:00
parent 34c1b14bf1
commit 8213dadf1b
2 changed files with 6 additions and 5 deletions
+3 -2
View File
@@ -148,6 +148,7 @@ class APISR_upscale:
def upscale(self, ckpt_name, dtype, images, per_batch):
device = mm.get_torch_device()
offload_device = mm.unet_offload_device()
model_path = folder_paths.get_full_path("upscale_models", ckpt_name)
custom_config = {
'dtype': dtype,
@@ -170,7 +171,7 @@ class APISR_upscale:
W = (W // 8) * 8
if images.shape[2] != H or images.shape[3] != W:
images = F.interpolate(images, size=(H, W), mode="bicubic")
images = F.interpolate(images, size=(H, W), mode="bilinear")
images = images.to(device = device, dtype = dtype)
self.model.to(device)
pbar = comfy.utils.ProgressBar(B)
@@ -184,7 +185,7 @@ class APISR_upscale:
batch_count = sub_images.shape[0]
# Update the progress bar by the number of images processed in this batch
pbar.update(batch_count)
self.model.cpu()
self.model.to(offload_device)
t = torch.cat(t, dim=0).permute(0, 2, 3, 1).cpu().to(torch.float32)
+3 -3
View File
@@ -1,4 +1,4 @@
numpy>=1.26.0
scipy>=1.11.3
omegaconf>=2.3.0
numpy
scipy
omegaconf
timm>=0.9.7