* maintain clip vision device
* update links in troubleshoot
This commit is contained in:
lllyasviel
2023-12-16 10:34:47 -08:00
committed by GitHub
parent 776e080b3f
commit 3a727fd240
10 changed files with 113 additions and 77 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ def create_blur_map(x0, attn, sigma=3.0, threshold=1.0):
attn = attn.reshape(b, -1, hw1, hw2)
# Global Average Pool
mask = attn.mean(1, keepdim=False).sum(1, keepdim=False) > threshold
ratio = round(math.sqrt(lh * lw / hw1))
ratio = math.ceil(math.sqrt(lh * lw / hw1))
mid_shape = [math.ceil(lh / ratio), math.ceil(lw / ratio)]
# Reshape