Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/IceClear/StableSR
/ isimage
Function
isimage
ldm/util.py:47–50 ·
view source on GitHub ↗
(x)
Source
from the content-addressed store, hash-verified
45
46
47
def
isimage(x):
48
if
not isinstance(x, torch.Tensor):
49
return
False
50
return
(len(x.shape) == 4) and (x.shape[1] == 3 or x.shape[1] == 1)
51
52
53
def
exists(x):
Callers
1
log_images
Method · 0.90
Calls
no outgoing calls
Tested by
no test coverage detected