huggingface / huggingface/diffusers
set mixed_precision="fp16",but the model is not fp16
- 主要语言
- Python
- 星标
- 34.5k
- 派生
- 7.3k
- 平均合并
- 3 天 3 小时
- 30 天内合并 PR
- 91
描述
### 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_
贡献指南
调研方向
从 train_controlnet_sdxl.py 和提供的 accelerate launch 命令开始,然后跟踪 mixed_precision="fp16" 如何影响训练和检查点保存。将生成的 safetensors 工件与预期的 fp16 文件和完整大小文件进行比较;只有在对报告的文件大小和 dtype 行为有确认的解释或可复现的修复后,才算完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python, pytorch
- 领域
- machine-learning
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 28/100