补充上次提交

This commit is contained in:
qhy
2026-02-11 16:24:40 +08:00
parent 352a79035f
commit f386a5810b
4 changed files with 26 additions and 15 deletions

View File

@@ -2457,7 +2457,17 @@ class DiffusionWrapper(pl.LightningModule):
Returns:
Output from the inner diffusion model (tensor or tuple, depending on the model).
"""
with torch.cuda.amp.autocast(dtype=torch.float16):
return self._forward_impl(x, x_action, x_state, t,
c_concat, c_crossattn, c_crossattn_action,
c_adm, s, mask, **kwargs)
def _forward_impl(
self,
x, x_action, x_state, t,
c_concat=None, c_crossattn=None, c_crossattn_action=None,
c_adm=None, s=None, mask=None, **kwargs,
):
if self.conditioning_key is None:
out = self.diffusion_model(x, t)
elif self.conditioning_key == 'concat':