huggingface / huggingface/diffusers
Model and input data type is not same
- 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ả
**Is your feature request related to a problem? Please describe.**
Hi, when I trained sdv1.5 model with fp16 mode by using the `examples/text_to_image/train_text_to_image.py` file, I found there is a mismatch between unet model and input data. Specificaly, In this [line](https://github.com/huggingface/diffusers/blob/main/examples/text_to_image/train_text_to_image.py#L993) , the `unet` model has float32 dtype, but the `noisy_latents` has the float16 dtype. Although it will not raise an error in cuda , I use my custom device it will raise an error, I wonder how can I change this code to use float16.
**Describe the solution you'd like.**
To avoid get a wrong model, I would like you give a right code to match model and input.
**Describe alternatives you've considered.**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context.**
Add any other context or screenshots about the feature request here.
Hướng dẫn đóng góp
Hướng nghiên cứu
Đọc examples/text_to_image/train_text_to_image.py quanh dòng 993, tập trung vào dtype của mô hình unet và noisy_latents trong chế độ fp16. Tái hiện sự không khớp trên thiết bị tùy chỉnh được báo cáo và xác minh rằng đường dẫn huấn luyện truyền các dtypes tương ứng mà không làm hỏng hành vi CUDA hiện có.
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- 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
- 48/100