Skip to content
代码片段 群组 项目
提交 c27ebeb1 编辑于 作者: comfyanonymous's avatar comfyanonymous
浏览文件

Fix onnx export not working on flux.

上级 0c7c98a9
No related branches found
No related tags found
无相关合并请求
......@@ -14,7 +14,7 @@ except:
rms_norm_torch = None
def rms_norm(x, weight, eps=1e-6):
if rms_norm_torch is not None:
if rms_norm_torch is not None and not (torch.jit.is_tracing() or torch.jit.is_scripting()):
return rms_norm_torch(x, weight.shape, weight=comfy.ops.cast_to(weight, dtype=x.dtype, device=x.device), eps=eps)
else:
rrms = torch.rsqrt(torch.mean(x**2, dim=-1, keepdim=True) + eps)
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册