aboutsummaryrefslogtreecommitdiffstats
path: root/modules/sd_vae_approx.py
diff options
context:
space:
mode:
authorhidenorly <twitte.harold@gmail.com>2023-11-28 19:07:48 +0000
committerhidenorly <twitte.harold@gmail.com>2023-11-28 19:07:48 +0000
commit39eae9f009c8302eed77b0942e1e634f6125d53e (patch)
tree3fb55d556d0a2366514b783d55804d61fbcd7b64 /modules/sd_vae_approx.py
parent58c19545c83fa6925c9ce2216ee64964eb5129ce (diff)
downloadstable-diffusion-webui-gfx803-39eae9f009c8302eed77b0942e1e634f6125d53e.tar.gz
stable-diffusion-webui-gfx803-39eae9f009c8302eed77b0942e1e634f6125d53e.tar.bz2
stable-diffusion-webui-gfx803-39eae9f009c8302eed77b0942e1e634f6125d53e.zip
Revert "Add FP32 fallback support on sd_vae_approx"
This reverts commit 58c19545c83fa6925c9ce2216ee64964eb5129ce. Since the modification is expected to move to mac_specific.py (https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/14046#issuecomment-1826731532)
Diffstat (limited to 'modules/sd_vae_approx.py')
-rw-r--r--modules/sd_vae_approx.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/modules/sd_vae_approx.py b/modules/sd_vae_approx.py
index 8370493f..3965e223 100644
--- a/modules/sd_vae_approx.py
+++ b/modules/sd_vae_approx.py
@@ -21,13 +21,7 @@ class VAEApprox(nn.Module):
def forward(self, x):
extra = 11
- try:
- x = nn.functional.interpolate(x, (x.shape[2] * 2, x.shape[3] * 2))
- except RuntimeError as e:
- if "not implemented for" in str(e) and "Half" in str(e):
- x = nn.functional.interpolate(x.to(torch.float32), (x.shape[2] * 2, x.shape[3] * 2)).to(x.dtype)
- else:
- print(f"An unexpected RuntimeError occurred: {str(e)}")
+ x = nn.functional.interpolate(x, (x.shape[2] * 2, x.shape[3] * 2))
x = nn.functional.pad(x, (extra, extra, extra, extra))
for layer in [self.conv1, self.conv2, self.conv3, self.conv4, self.conv5, self.conv6, self.conv7, self.conv8, ]: