mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-12-18 02:23:06 +08:00
Fix rope scaling. (#10560)
This commit is contained in:
parent
614cf9805e
commit
27d1bd8829
@ -605,9 +605,9 @@ class WanModel(torch.nn.Module):
|
||||
w_start = 0
|
||||
rope_options = transformer_options.get("rope_options", None)
|
||||
if rope_options is not None:
|
||||
t_len = t_len * rope_options.get("scale_t", 1.0)
|
||||
h_len = h_len * rope_options.get("scale_y", 1.0)
|
||||
w_len = w_len * rope_options.get("scale_x", 1.0)
|
||||
t_len = (t_len - 1.0) * rope_options.get("scale_t", 1.0) + 1.0
|
||||
h_len = (h_len - 1.0) * rope_options.get("scale_y", 1.0) + 1.0
|
||||
w_len = (w_len - 1.0) * rope_options.get("scale_x", 1.0) + 1.0
|
||||
|
||||
t_start += rope_options.get("shift_t", 0.0)
|
||||
h_start += rope_options.get("shift_y", 0.0)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user