Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/lllyasviel/Omost
/ numpy2pytorch
Function
numpy2pytorch
gradio_app.py:102–105 ·
view source on GitHub ↗
(imgs)
Source
from the content-addressed store, hash-verified
100
101
@torch.inference_mode()
102
def
numpy2pytorch(imgs):
103
h = torch.from_numpy(np.stack(imgs, axis=0)).float() / 127.5 - 1.0
104
h = h.movedim(-1, 1)
105
return
h
106
107
108
def
resize_without_crop(image, target_width, target_height):
Callers
1
diffusion_fn
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected