[NFC] Remove redundant torch.no_grad in models and pipelines (#854)

Signed-off-by: yuanheng <jonathan.zhaoyh@gmail.com>
This commit is contained in:
Yuanheng Zhao authored and GitHub committed 2026-01-27 12:36:54 +00:00
1 parent 16be03b909
commit 2f5e32477c
9 files changed
-14

No files matched your search

@@ -278,7 +278,6 @@ class Wan22Pipeline(nn.Module):
def current_timestep(self):
return self._current_timestep
@torch.no_grad()
def forward(
self,
req: OmniDiffusionRequest,
@@ -254,7 +254,6 @@ class Wan22I2VPipeline(nn.Module, SupportImageInput):
image_embeds = self.image_encoder(pixel_values, output_hidden_states=True)
return image_embeds.hidden_states[-2]
@torch.no_grad()
def forward(
self,
req: OmniDiffusionRequest,
@@ -193,7 +193,6 @@ class Wan22TI2VPipeline(nn.Module, SupportImageInput):
def current_timestep(self):
return self._current_timestep
@torch.no_grad()
def forward(
self,
req: OmniDiffusionRequest,