Skip to content

Commit f70c185

Browse files
committed
docs(flux2): explain default weight transfers
1 parent 0a6d834 commit f70c185

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

lightx2v/models/networks/flux2/weights/post_weights.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def to_cuda(self, non_blocking=True):
3535
for module in self._modules.values():
3636
if module is not None and hasattr(module, "to_cuda"):
3737
if self.mm_type == "Default":
38+
# Default uses plain transpose views; other layouts need the module's own to_cuda().
3839
move_flux2_leaf_to_cuda(module, non_blocking=non_blocking)
3940
else:
4041
module.to_cuda(non_blocking=non_blocking)

lightx2v/models/networks/flux2/weights/pre_weights.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def to_cuda(self, non_blocking=True):
4242
for module in self._modules.values():
4343
if module is not None and hasattr(module, "to_cuda"):
4444
if self.mm_type == "Default":
45+
# Default uses plain transpose views; other layouts need the module's own to_cuda().
4546
move_flux2_leaf_to_cuda(module, non_blocking=non_blocking)
4647
else:
4748
module.to_cuda(non_blocking=non_blocking)

lightx2v/models/networks/flux2/weights/transformer_weights.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ def to_cuda(self, non_blocking=True):
214214
for module in self._modules.values():
215215
if module is not None and hasattr(module, "to_cuda"):
216216
if self.mm_type == "Default":
217+
# Default uses plain transpose views; other layouts need the module's own to_cuda().
217218
move_flux2_leaf_to_cuda(module, non_blocking=non_blocking)
218219
else:
219220
module.to_cuda(non_blocking=non_blocking)

0 commit comments

Comments
 (0)