yaron123 commited on
Commit
c9d72ad
·
1 Parent(s): 7ac9594
Files changed (1) hide show
  1. app.py +1 -8
app.py CHANGED
@@ -180,14 +180,7 @@ def infer_params(state_dict: dict[str, torch.Tensor]) -> tuple[int, int, int, in
180
  return in_nc, out_nc, nf, nb, scale # 3, 3, 64, 23, 4
181
 
182
  # https://github.com/philz1337x/clarity-upscaler/blob/e0cd797198d1e0e745400c04d8d1b98ae508c73b/modules/images.py#L64
183
- class Grid(namedtuple):
184
- tiles: Tiles
185
- tile_w: int
186
- tile_h: int
187
- image_w: int
188
- image_h: int
189
- overlap: int
190
-
191
 
192
  # adapted from https://github.com/philz1337x/clarity-upscaler/blob/e0cd797198d1e0e745400c04d8d1b98ae508c73b/modules/images.py#L67
193
  def split_grid(image: Image.Image, tile_w: int = 512, tile_h: int = 512, overlap: int = 64) -> Grid:
 
180
  return in_nc, out_nc, nf, nb, scale # 3, 3, 64, 23, 4
181
 
182
  # https://github.com/philz1337x/clarity-upscaler/blob/e0cd797198d1e0e745400c04d8d1b98ae508c73b/modules/images.py#L64
183
+ Grid = namedtuple("Grid", ["tiles", "tile_w", "tile_h", "image_w", "image_h", "overlap"])
 
 
 
 
 
 
 
184
 
185
  # adapted from https://github.com/philz1337x/clarity-upscaler/blob/e0cd797198d1e0e745400c04d8d1b98ae508c73b/modules/images.py#L67
186
  def split_grid(image: Image.Image, tile_w: int = 512, tile_h: int = 512, overlap: int = 64) -> Grid: