diff options
author | 不会画画的中医不是好程序员 <yfszzx@gmail.com> | 2022-10-10 12:21:25 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-10 12:21:25 +0000 |
commit | 1e18a5ffcc439b72adaaf425c0b79f3acb34322e (patch) | |
tree | 01f9c73c02076694a9bc3c965875646473771db8 /modules/scunet_model_arch.py | |
parent | 23f2989799ee3911d2959cfceb74b921f20c9a51 (diff) | |
parent | a3578233395e585e68c2118d3630cb2a961d4a36 (diff) | |
download | stable-diffusion-webui-gfx803-1e18a5ffcc439b72adaaf425c0b79f3acb34322e.tar.gz stable-diffusion-webui-gfx803-1e18a5ffcc439b72adaaf425c0b79f3acb34322e.tar.bz2 stable-diffusion-webui-gfx803-1e18a5ffcc439b72adaaf425c0b79f3acb34322e.zip |
Merge branch 'AUTOMATIC1111:master' into master
Diffstat (limited to 'modules/scunet_model_arch.py')
-rw-r--r-- | modules/scunet_model_arch.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/scunet_model_arch.py b/modules/scunet_model_arch.py index 972a2639..43ca8d36 100644 --- a/modules/scunet_model_arch.py +++ b/modules/scunet_model_arch.py @@ -40,7 +40,7 @@ class WMSA(nn.Module): Returns: attn_mask: should be (1 1 w p p), """ - # supporting sqaure. + # supporting square. attn_mask = torch.zeros(h, w, p, p, p, p, dtype=torch.bool, device=self.relative_position_params.device) if self.type == 'W': return attn_mask @@ -65,7 +65,7 @@ class WMSA(nn.Module): x = rearrange(x, 'b (w1 p1) (w2 p2) c -> b w1 w2 p1 p2 c', p1=self.window_size, p2=self.window_size) h_windows = x.size(1) w_windows = x.size(2) - # sqaure validation + # square validation # assert h_windows == w_windows x = rearrange(x, 'b w1 w2 p1 p2 c -> b (w1 w2) (p1 p2) c', p1=self.window_size, p2=self.window_size) |