[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

@@ -1258,7 +1258,6 @@ class Qwen2_5OmniToken2WavDiTModel(Qwen2_5OmniPreTrainedModel):
return output
@torch.no_grad()
def sample(
self,
conditioning_vector,
@@ -1333,7 +1332,6 @@ class Qwen2_5OmniToken2WavDiTModel(Qwen2_5OmniPreTrainedModel):
generated_mel_spectrogram = generated_waveform.permute(0, 2, 1)
return generated_mel_spectrogram
@torch.no_grad()
def fast_block_sample(
self,
conditioning_vector: torch.Tensor,