MCPcopy Create free account
hub / github.com/CompVis/zigma / array2grid_pixel

Function array2grid_pixel

wandb_utils.py:108–112  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

106
107
108def array2grid_pixel(x):
109 nrow = round(math.sqrt(x.size(0)))
110 x = make_grid(x, nrow=nrow, normalize=False)
111 x = x.permute(1, 2, 0).to("cpu", torch.uint8).numpy()
112 return x
113
114
115def test_sd_1_5():

Callers 1

mainFunction · 0.90

Calls 1

toMethod · 0.80

Tested by

no test coverage detected