The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Try to fix flash attention related issue on AMD. (#14880)
comfyanonymous69ea58697bb2
diff --git a/comfy/ldm/modules/attention.py b/comfy/ldm/modules/attention.pyindex 2411aff5c..e6500cff4 100644--- a/comfy/ldm/modules/attention.py+++ b/comfy/ldm/modules/attention.py@@ -709,7 +709,7 @@ def attention3_sage(q, k, v, heads, mask=None, attn_precision=None, skip_reshapereturn outtry:- @torch.library.custom_op("flash_attention::flash_attn", mutates_args=())+ @torch.library.custom_op("comfy::flash_attn", mutates_args=())def flash_attn_wrapper(q: torch.Tensor, k: torch.Tensor, v: torch.Tensor,dropout_p: float = 0.0, causal: bool = False, softmax_scale: float = -1.0) -> torch.Tensor:softmax_scale_arg = None if softmax_scale == -1.0 else softmax_scale