MCPcopy Create free account
hub / github.com/TencentARC/AnimeGamer / isimage

Function isimage

VDM_Decoder/vae_modules/utils.py:198–201  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

196
197
198def isimage(x):
199 if not isinstance(x, torch.Tensor):
200 return False
201 return (len(x.shape) == 4) and (x.shape[1] == 3 or x.shape[1] == 1)
202
203
204def isheatmap(x):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected