From b445dd3af3874788cbfd5650be82c343f8230569 Mon Sep 17 00:00:00 2001 From: "Yousef R. Gamaleldin" <81116377+yousef-rafat@users.noreply.github.com> Date: Sun, 29 Jun 2025 14:10:56 +0300 Subject: [PATCH] Update moe.py fixed not returning y in the forward method of MoEBlock --- comfy/ldm/hunyuan3d/model/moe.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/comfy/ldm/hunyuan3d/model/moe.py b/comfy/ldm/hunyuan3d/model/moe.py index f6ea7db3c..93becdfbb 100644 --- a/comfy/ldm/hunyuan3d/model/moe.py +++ b/comfy/ldm/hunyuan3d/model/moe.py @@ -152,6 +152,8 @@ class MoEBlock(nn.Module): y = y + self.shared_experts(identity) + return y + @torch.no_grad() def moe_infer(self, x, flat_expert_indices, flat_expert_weights): @@ -200,4 +202,4 @@ def test_moe(): print(timing) if __name__ == "__main__": - test_moe() \ No newline at end of file + test_moe()