Skip to content

Commit 2a363a3

Browse files
committed
handle weight casting in conversion script
1 parent 2841ad2 commit 2a363a3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

scripts/convert_sana_to_diffusers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ def main(args):
200200
attrs=["bold"],
201201
)
202202
)
203+
transformer = transformer.to(weight_dtype)
203204
transformer.save_pretrained(
204205
os.path.join(args.dump_path, "transformer"), safe_serialization=True, max_shard_size="5GB", variant=variant
205206
)

0 commit comments

Comments
 (0)