MCPcopy Create free account
hub / github.com/TencentARC/BrushNet / coerce_resolution

Function coerce_resolution

scripts/convert_vq_diffusion_to_diffusers.py:157–164  ·  view source on GitHub ↗
(resolution)

Source from the content-addressed store, hash-verified

155
156
157def coerce_resolution(resolution):
158 if isinstance(resolution, int):
159 resolution = [resolution, resolution] # H, W
160 elif isinstance(resolution, (tuple, list)):
161 resolution = list(resolution)
162 else:
163 raise ValueError("Unknown type of resolution:", resolution)
164 return resolution
165
166
167# done vqvae model

Callers 2

get_down_block_typesFunction · 0.85
get_up_block_typesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected