Fix lowvram issue with ltxv2 text encoder. (#11675)

This commit is contained in:
comfyanonymous
2026-01-06 14:33:03 -08:00
committed by GitHub
parent c3566c0d76
commit 023cf13721
2 changed files with 4 additions and 2 deletions

View File

@@ -276,7 +276,7 @@ class Embeddings1DConnector(nn.Module):
max(1024, hidden_states.shape[1]) / self.num_learnable_registers
)
learnable_registers = torch.tile(
self.learnable_registers, (num_registers_duplications, 1)
self.learnable_registers.to(hidden_states), (num_registers_duplications, 1)
)
hidden_states = torch.cat((hidden_states, learnable_registers[hidden_states.shape[1]:].unsqueeze(0).repeat(hidden_states.shape[0], 1, 1)), dim=1)