We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 051ebc3 commit 97abdd2Copy full SHA for 97abdd2
src/diffusers/models/modeling_utils.py
@@ -549,7 +549,7 @@ def save_pretrained(
549
os.remove(full_filename)
550
551
for filename, tensors in state_dict_split.filename_to_tensors.items():
552
- shard = {tensor: state_dict[tensor] for tensor in tensors}
+ shard = {tensor: state_dict[tensor].contiguous() for tensor in tensors}
553
filepath = os.path.join(save_directory, filename)
554
if safe_serialization:
555
# At some point we will need to deal better with save_function (used for TPU and other distributed
0 commit comments