The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Use comfy kitchen apply rope in omnigen2 model. (#14442)
comfyanonymous7277d99d3ab9
diff --git a/comfy/ldm/omnigen/omnigen2.py b/comfy/ldm/omnigen/omnigen2.pyindex 82edc92da..e9ca5229d 100644--- a/comfy/ldm/omnigen/omnigen2.py+++ b/comfy/ldm/omnigen/omnigen2.py@@ -8,6 +8,7 @@ import torch.nn.functional as Ffrom einops import rearrange, repeatfrom comfy.ldm.lightricks.model import Timestepsfrom comfy.ldm.flux.layers import EmbedND+from comfy.ldm.flux.math import apply_rope1from comfy.ldm.modules.attention import optimized_attention_maskedimport comfy.model_managementimport comfy.ldm.common_dit@@ -17,9 +18,7 @@ def apply_rotary_emb(x, freqs_cis):if x.shape[1] == 0:return x- t_ = x.reshape(*x.shape[:-1], -1, 1, 2)- t_out = freqs_cis[..., 0] * t_[..., 0] + freqs_cis[..., 1] * t_[..., 1]- return t_out.reshape(*x.shape).to(dtype=x.dtype)+ return apply_rope1(x, freqs_cis)def swiglu(x: torch.Tensor, y: torch.Tensor) -> torch.Tensor: