Skip to content

Sd3 safetensors merge #1960

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 5, 2025
Merged

Sd3 safetensors merge #1960

merged 6 commits into from
Mar 5, 2025

Conversation

kohya-ss
Copy link
Owner

@kohya-ss kohya-ss commented Feb 28, 2025

Currently all models are loaded into the main RAM before saving, so it uses the total size of .safetensor files main RAM.

@kohya-ss kohya-ss mentioned this pull request Feb 28, 2025
25 tasks
@kohya-ss
Copy link
Owner Author

kohya-ss commented Mar 1, 2025

Fixed a bug that caused tensors to be converted to float32, and now saves as it is. Also, add --save_precision option, convert tensors to the specified type.

@FurkanGozukara Thanks for reporting it. I will merge this PR if you confirm the fix.

@FurkanGozukara
Copy link

Fixed a bug that caused tensors to be converted to float32, and now saves as it is. Also, add --save_precision option, convert tensors to the specified type.

@FurkanGozukara Thanks for reporting it. I will merge this PR if you confirm the fix.

Just tested and works great

FP16 half size :) please merge as soon as possible

@FurkanGozukara
Copy link

@kohya-ss can you merge this today so i can start new trainings with this feature and auto save with clip l and clip g while training?

@kohya-ss kohya-ss merged commit 75933d7 into sd3 Mar 5, 2025
2 checks passed
@kohya-ss kohya-ss deleted the sd3_safetensors_merge branch March 5, 2025 14:28
@kohya-ss
Copy link
Owner Author

kohya-ss commented Mar 5, 2025

Thank you for testing, and sorry for the delay!

@FurkanGozukara
Copy link

Thank you for testing, and sorry for the delay!

thank you

so what parameter do i need to give training to automatically merge during training? or you will add it separately?

@kohya-ss
Copy link
Owner Author

kohya-ss commented Mar 5, 2025

There is no automatic merging, so please run the script separately.

@FurkanGozukara
Copy link

There is no automatic merging, so please run the script separately.

can you please implement automatic merge?

running this script is on each file extremely tiresome and impossible for many people

@FurkanGozukara
Copy link

@kohya-ss which file i would need to modify to achieve this?

which file saves checkpoint and clip l and clip g during training so i can modify it to generate merged output and delete other outputs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants