From c5950f36e0862de68400429833e1261810639e8d Mon Sep 17 00:00:00 2001 From: Gavin Johnson Date: Wed, 12 Oct 2022 10:52:35 -0700 Subject: [PATCH 1/2] added height and width size options up to 1024px Signed-off-by: Gavin Johnson --- electron_app/src/components/ImgGenerate.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/electron_app/src/components/ImgGenerate.vue b/electron_app/src/components/ImgGenerate.vue index 17b13e84..1ba34e24 100644 --- a/electron_app/src/components/ImgGenerate.vue +++ b/electron_app/src/components/ImgGenerate.vue @@ -42,7 +42,7 @@ @@ -51,7 +51,7 @@ From 5fb6a0073443d61c780f5de41a51ca0f193d2bf8 Mon Sep 17 00:00:00 2001 From: Gavin Johnson Date: Wed, 12 Oct 2022 15:36:06 -0700 Subject: [PATCH 2/2] changes to accomodate up to 1024x1024 images Signed-off-by: Gavin Johnson --- backends/stable_diffusion_tf/stable_diffusion_tf/layers.py | 3 ++- electron_app/src/components/ImgGenerate.vue | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/backends/stable_diffusion_tf/stable_diffusion_tf/layers.py b/backends/stable_diffusion_tf/stable_diffusion_tf/layers.py index 0d14c3a6..3e385515 100644 --- a/backends/stable_diffusion_tf/stable_diffusion_tf/layers.py +++ b/backends/stable_diffusion_tf/stable_diffusion_tf/layers.py @@ -47,5 +47,6 @@ def td_dot(a, b): bb = tf.reshape(b, (-1, b.shape[2], b.shape[3])) cc = tf.keras.backend.batch_dot(aa, bb) ans = tf.reshape(cc, (-1, a.shape[1], cc.shape[1], cc.shape[2])) - assert ans.shape[1] * ans.shape[2] * ans.shape[3] < 8*4096*4096 - 1000 , "Shape too large" + # Gavin, 20221012: Updated from `8*4096*4096 - 1000` to `16*4096*4096 + 1` to accomodate up to 1024x1024 images + assert ans.shape[1] * ans.shape[2] * ans.shape[3] < 16*4096*4096 + 1 , "Shape too large" return ans diff --git a/electron_app/src/components/ImgGenerate.vue b/electron_app/src/components/ImgGenerate.vue index 1ba34e24..702d0b39 100644 --- a/electron_app/src/components/ImgGenerate.vue +++ b/electron_app/src/components/ImgGenerate.vue @@ -40,6 +40,7 @@ + +