mirror of
https://github.com/THUDM/CogVideo.git
synced 2025-04-05 19:41:59 +08:00
padding fix
This commit is contained in:
parent
98466e674c
commit
202484e77f
@ -19,7 +19,7 @@ def pad_image(img, scale):
|
||||
tmp = max(32, int(32 / scale))
|
||||
ph = ((h - 1) // tmp + 1) * tmp
|
||||
pw = ((w - 1) // tmp + 1) * tmp
|
||||
padding = (0, 0, pw - w, ph - h)
|
||||
padding = (0, pw - w, 0, ph - h)
|
||||
return F.pad(img, padding)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user