huggingface / huggingface/diffusers
set mixed_precision="fp16",but the model is not fp16
- Ngôn ngữ chính
- Python
- Star
- 34.5k
- Fork
- 7.3k
- Merge trung bình
- 3 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 91
Mô tả
### Describe the bug
I trained the control net of SDXL using the mixed prediction="fp16" parameter, but the trained model did not have the suffix. fp16. safetensors. But it's a 5G file. I see that the Controlnet on HuggFace will have a 5G file and a 2.5G file with fp16.
### Reproduction
accelerate launch train_controlnet_sdxl.py --pretrained_model_name_or_path=$MODEL_DIR --output_dir=$OUTPUT_DIR --pretrained_vae_model_name_or_path=$VAE --dataset_name=/root/autodl-tmp/datasets/ --mixed_precision="fp16" --resolution=1024 --learning_rate=1e-5 --max_train_steps=20000 --validation_image "/root/test.jpg" --validation_prompt "bedroom" --validation_steps=500 --train_batch_size=2 --gradient_accumulation_steps=4 --report_to="wandb" --seed=42 --checkpointing_steps=2000 --cache_dir=/root/autodl-tmp/cache/
### Logs
_No response_
### System Info
diffuser 0.28 , linux, python 3.10.11
### Who can help?
_No response_
Hướng dẫn đóng góp
Hướng nghiên cứu
Start with train_controlnet_sdxl.py and the supplied accelerate launch command, then trace how mixed_precision="fp16" affects training and checkpoint saving. Compare the resulting safetensors artifacts with the expected fp16 and full-size files; done requires a confirmed explanation or reproducible fix for the reported file size and dtype behavior.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python, pytorch
- Lĩnh vực
- machine-learning
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 28/100