From bf81df156966b18da775738b545bae985cd7cc6a Mon Sep 17 00:00:00 2001 From: kazmon <157670726+kazmon@users.noreply.github.com> Date: Sun, 28 Jan 2024 13:36:32 -0800 Subject: [PATCH] Initialize grid before attempting to rearrange --- scripts/demo/streamlit_helpers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/demo/streamlit_helpers.py b/scripts/demo/streamlit_helpers.py index 6c5760e26..d2d271e51 100644 --- a/scripts/demo/streamlit_helpers.py +++ b/scripts/demo/streamlit_helpers.py @@ -775,7 +775,8 @@ def denoiser(x, sigma, c): if filter is not None: samples = filter(samples) - + + grid = torch.stack([samples]) grid = rearrange(grid, "n b c h w -> (n h) (b w) c") outputs.image(grid.cpu().numpy()) if return_latents: