huggingface / huggingface/diffusers
Getting problems saving text_encoder_ti when using train_dreambooth_lora_sd15_advanced
- 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
Hi,
I encountered an issue while training Stable Diffusion 1.5 using the script `examples/advanced_diffusion_training/train_dreambooth_lora_sd15_advanced.py`.
The problem occurs when trying to save the text_encoder while also using textual inversion.
The following line of code seems to be causing the issue:
```python
embedding_handler.save_embeddings(f"{output_dir}/{args.output_dir}_emb.safetensors")
```
I discovered that removing {args.output_dir} from the path resolves the problem:
```
embedding_handler.save_embeddings(f"{output_dir}/ti_emb.safetensors")
```
Are there any alternative solutions to this issue? Any insights would be appreciated.
### Reproduction
Use the script train_dreambooth_lora_sd15_advanced.py
Enable textual inversion
Attempt to save the text_encoder
### Logs
_No response_
### System Info
- 🤗 Diffusers version: 0.30.0.dev0
- Platform: Linux-5.15.0-106-generic-x86_64-with-glibc2.35
- Running on a notebook?: No
- Running on Google Colab?: No
- Python version: 3.10.12
- PyTorch version (GPU?): 2.3.1+cu121 (True)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Huggingface_hub version: 0.23.4
- Transformers version: 4.42.3
- Accelerate version: 0.31.0
- PEFT version: 0.11.1
- Bitsandbytes version: not installed
- Safetensors version: 0.4.3
- xFormers version: 0.0.27
- Accelerator: NVIDIA A40, 46068 MiB
NVIDIA A40, 46068 MiB
NVIDIA A40, 46068 MiB
NVIDIA A40, 46068 MiB VRAM
- Using GPU in script?:
- Using distributed or parallel set-up in script?:
### Who can help?
_No response_
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với examples/advanced_diffusion_training/train_dreambooth_lora_sd15_advanced.py và tái hiện lần chạy với textual inversion được bật và tính năng lưu text_encoder được bật. Kiểm tra đường dẫn embedding_handler.save_embeddings được nêu trong issue và xác minh rằng text_encoder cùng các embeddings của textual inversion được lưu thành công vào thư mục đầu ra dự kiến.
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ó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100