MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / _tile2latent_indices

Function _tile2latent_indices

diffusers/examples/community/mixture_tiling.py:72–84  ·  view source on GitHub ↗

Given a tile row and column numbers returns the range of latents affected by that tiles in the overall image Returns a tuple with: - Starting coordinates of rows in latent space - Ending coordinates of rows in latent space - Starting coordinates of columns in latent spac

(tile_row, tile_col, tile_width, tile_height, tile_row_overlap, tile_col_overlap)

Source from the content-addressed store, hash-verified

70
71
72def _tile2latent_indices(tile_row, tile_col, tile_width, tile_height, tile_row_overlap, tile_col_overlap):
73 """Given a tile row and column numbers returns the range of latents affected by that tiles in the overall image
74
75 Returns a tuple with:
76 - Starting coordinates of rows in latent space
77 - Ending coordinates of rows in latent space
78 - Starting coordinates of columns in latent space
79 - Ending coordinates of columns in latent space
80 """
81 px_row_init, px_row_end, px_col_init, px_col_end = _tile2pixel_indices(
82 tile_row, tile_col, tile_width, tile_height, tile_row_overlap, tile_col_overlap
83 )
84 return _pixel2latent_indices(px_row_init, px_row_end, px_col_init, px_col_end)
85
86
87def _tile2latent_exclusive_indices(

Callers 2

__call__Method · 0.85

Calls 2

_tile2pixel_indicesFunction · 0.85
_pixel2latent_indicesFunction · 0.85

Tested by

no test coverage detected