mirror of
https://github.com/modelscope/DiffSynth-Studio.git
synced 2026-03-18 22:08:13 +00:00
polish code
This commit is contained in:
@@ -91,7 +91,6 @@ def rope_apply(x, freqs, num_heads):
|
||||
x_out = torch.view_as_complex(x.to(torch.float64).reshape(
|
||||
x.shape[0], x.shape[1], x.shape[2], -1, 2))
|
||||
|
||||
print(f"x_out.shape: {x_out.shape}, freqs.shape: {freqs.shape}")
|
||||
x_out = torch.view_as_real(x_out * freqs).flatten(2)
|
||||
return x_out.to(x.dtype)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user