0x90e commited on
Commit
1b72ec5
·
1 Parent(s): 0d7de2e

Logs and cleaning.

Browse files
Files changed (2) hide show
  1. inference_manga_v2.py +2 -3
  2. process_image.py +1 -1
inference_manga_v2.py CHANGED
@@ -55,13 +55,12 @@ for root, dirs, files in os.walk(base, topdown=True):
55
  img_LR = img.unsqueeze(0)
56
  img_LR = img_LR.to(device)
57
 
58
- #print(f"Start upscaling tile {x}...")
59
  with torch.no_grad():
60
  output = model(img_LR).squeeze(dim=0).float().cpu().clamp_(0, 1).numpy()
61
  output = np.transpose(output, (1, 2, 0))
62
  output = (output * 255.0).round()
63
- #print(f"Finished upscaling tile {x}, saving tile.")
64
- #print(output_dir)
65
  cv2.imwrite(file_path, output)
66
 
67
  # Join all tiles
 
55
  img_LR = img.unsqueeze(0)
56
  img_LR = img_LR.to(device)
57
 
58
+ print(f"Start upscaling tile {x}...")
59
  with torch.no_grad():
60
  output = model(img_LR).squeeze(dim=0).float().cpu().clamp_(0, 1).numpy()
61
  output = np.transpose(output, (1, 2, 0))
62
  output = (output * 255.0).round()
63
+ print(f"Finished upscaling tile {x}, saving tile.")
 
64
  cv2.imwrite(file_path, output)
65
 
66
  # Join all tiles
process_image.py CHANGED
@@ -36,7 +36,7 @@ def inference(img, size, type):
36
  #img_out = Image.open(img_out_path)
37
 
38
  # Remove input and output image
39
- #run_cmd(f"rm -f {img_in_path}")
40
 
41
  img_out.thumbnail((600, 600), Image.ANTIALIAS)
42
 
 
36
  #img_out = Image.open(img_out_path)
37
 
38
  # Remove input and output image
39
+ run_cmd(f"rm -rf {INPUT_DIR}")
40
 
41
  img_out.thumbnail((600, 600), Image.ANTIALIAS)
42