The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Remove old useless no comfy kitchen fallback. (#14245)
comfyanonymousd4c7ebff9c31
diff --git a/comfy/ldm/flux/math.py b/comfy/ldm/flux/math.pyindex 6d0aed827..891dea7dd 100644--- a/comfy/ldm/flux/math.py+++ b/comfy/ldm/flux/math.py@@ -4,7 +4,7 @@ from torch import Tensorfrom comfy.ldm.modules.attention import optimized_attentionimport comfy.model_management-import logging+import comfy.quant_opsdef attention(q: Tensor, k: Tensor, v: Tensor, pe: Tensor, mask=None, transformer_options={}) -> Tensor:@@ -44,21 +44,15 @@ def _apply_rope(xq: Tensor, xk: Tensor, freqs_cis: Tensor):return apply_rope1(xq, freqs_cis), apply_rope1(xk, freqs_cis)-try:- import comfy.quant_ops- q_apply_rope = comfy.quant_ops.ck.apply_rope- q_apply_rope1 = comfy.quant_ops.ck.apply_rope1- def apply_rope(xq, xk, freqs_cis):- if comfy.model_management.in_training:- return _apply_rope(xq, xk, freqs_cis)- else:- return apply_rope1(xq, freqs_cis), apply_rope1(xk, freqs_cis)- def apply_rope1(x, freqs_cis):- if comfy.model_management.in_training:- return _apply_rope1(x, freqs_cis)- else:- return q_apply_rope1(x, freqs_cis)-except:- logging.warning("No comfy kitchen, using old apply_rope functions.")- apply_rope = _apply_rope- apply_rope1 = _apply_rope1+def apply_rope(xq, xk, freqs_cis):+ if comfy.model_management.in_training:+ return _apply_rope(xq, xk, freqs_cis)+ else:+ return comfy.quant_ops.ck.apply_rope(xq, xk, freqs_cis)+++def apply_rope1(x, freqs_cis):+ if comfy.model_management.in_training:+ return _apply_rope1(x, freqs_cis)+ else:+ return comfy.quant_ops.ck.apply_rope1(x, freqs_cis)