Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/util/LayerOffloadConductor.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def __init__(

def reserve_cache(self, tensors: list[torch.Tensor]):
num_bytes = sum(tensor.element_size() * tensor.numel() for tensor in tensors) \
+ len(tensors) * 4 # add enough padding for alignment
+ len(tensors) * 16 # add enough padding for alignment

if num_bytes == 0:
return
Expand Down