Skip to content
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

[Bug]: SD 3.5 Medium fine-tune safetensors size too large #598

Open
ronlamb opened this issue Dec 3, 2024 · 1 comment
Open

[Bug]: SD 3.5 Medium fine-tune safetensors size too large #598

ronlamb opened this issue Dec 3, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ronlamb
Copy link

ronlamb commented Dec 3, 2024

What happened?

When saving the safetensors file for a SD3.5 Medium finetune the size is coming as 15.39 GB instead of the basemodel size of 4.99 GB.

For the options I chose the sd 3 config, with the following changes. Set the model dropdown to Stable Diffusion 3.5 and Fine Tune.

Only options changes I made was:
Weight Data Type: bfloat16,
Train DataType: bfloat16
Optimizer: ADAMW_8BIT.
Attention: SDP
Model: stabilityai/stable-diffusion-3-medium-diffusers

What did you expect would happen?

The file size should be about the same as the base model of 4.99GB

Relevant log output

No response

Output of pip freeze

absl-py==2.1.0
accelerate==1.0.1
aiohappyeyeballs==2.4.4
aiohttp==3.11.8
aiosignal==1.3.1
annotated-types==0.7.0
antlr4-python3-runtime==4.9.3
async-timeout==5.0.1
attrs==24.2.0
bitsandbytes==0.44.1
certifi==2024.8.30
charset-normalizer==3.4.0
cloudpickle==3.1.0
colorama==0.4.6
coloredlogs==15.0.1
contourpy==1.3.1
customtkinter==5.2.2
cycler==0.12.1
dadaptation==3.2
darkdetect==0.8.0
-e git+https://github.com/huggingface/diffusers.git@e45c25d03aeb0a967d8aaa0f6a79f280f6838e1f#egg=diffusers
filelock==3.16.1
flatbuffers==24.3.25
fonttools==4.55.0
frozenlist==1.5.0
fsspec==2024.10.0
ftfy==6.3.1
grpcio==1.68.0
huggingface-hub==0.26.2
humanfriendly==10.0
idna==3.10
importlib_metadata==8.5.0
intel-openmp==2021.4.0
invisible-watermark==0.2.0
Jinja2==3.1.4
kiwisolver==1.4.7
lightning-utilities==0.11.9
lion-pytorch==0.2.2
Markdown==3.7
markdown-it-py==3.0.0
MarkupSafe==3.0.2
matplotlib==3.9.2
mdurl==0.1.2
-e git+https://github.com/Nerogar/mgds.git@0723e42ceff37f3527e7e7f7dfaf7ad8f7252719#egg=mgds
mkl==2021.4.0
mpmath==1.3.0
multidict==6.1.0
networkx==3.4.2
numpy==1.26.4
nvidia-ml-py==12.560.30
omegaconf==2.3.0
onnxruntime-gpu==1.19.2
open_clip_torch==2.28.0
opencv-python==4.10.0.84
packaging==24.2
pillow==11.0.0
platformdirs==4.3.6
pooch==1.8.2
prodigyopt==1.0
propcache==0.2.0
protobuf==5.29.0
psutil==6.1.0
pydantic==2.10.2
pydantic_core==2.27.1
Pygments==2.18.0
pynvml==11.5.0
pyparsing==3.2.0
pyreadline3==3.5.4
python-dateutil==2.9.0.post0
pytorch-lightning==2.4.0
pytorch_optimizer==3.1.2
PyWavelets==1.7.0
PyYAML==6.0.2
regex==2024.11.6
requests==2.32.3
rich==13.9.4
safetensors==0.4.5
scalene==1.5.45
schedulefree==1.3
sentencepiece==0.2.0
six==1.16.0
sympy==1.13.1
tbb==2021.13.1
tensorboard==2.18.0
tensorboard-data-server==0.7.2
timm==1.0.11
tokenizers==0.20.3
torch==2.5.1+cu124
torchmetrics==1.6.0
torchvision==0.20.1+cu124
tqdm==4.66.6
transformers==4.46.0
typing_extensions==4.12.2
urllib3==2.2.3
wcwidth==0.2.13
Werkzeug==3.1.3
xformers==0.0.28.post3
yarl==1.18.0
zipp==3.21.0

@ronlamb ronlamb added the bug Something isn't working label Dec 3, 2024
@clayne
Copy link
Contributor

clayne commented Dec 4, 2024

Can independently verify this. The output model is around 16GB regardless of output precision (FP8, NF4, BF16, etc).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants