EulerDiscreteScheduler returns incorrect v-prediction targets for discrete timesteps
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- machine-learning
Hướng nghiên cứu
Đọc EulerDiscreteScheduler.get_velocity và so sánh cách tra cứu timestep với DDIMScheduler.get_velocity. Chạy ví dụ tái hiện được cung cấp để xác nhận sự không khớp tại các timestep rời rạc 999 và 500. Hoàn tất khi cả hai scheduler trả về các mục tiêu vận tốc giống nhau với cùng betas và đầu vào.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
I found this while reading EulerDiscreteScheduler.get_velocity. It looks up each timestep's position in the descending schedule and uses that position to index alphas_cumprod. At timestep 999 the default schedule reads alphas_cumprod[0]. I plan to fix the lookup to use the discrete training timestep value.
Reproduction
import torch
from diffusers import DDIMScheduler, EulerDiscreteScheduler
config = {
"beta_start": 0.00085,
"beta_end": 0.012,
"beta_schedule": "scaled_linear",
"prediction_type": "v_prediction",
}
sample = torch.tensor([[1.0, -2.0], [0.5, 3.0]])
noise = torch.tensor([[0.25, 0.5], [-0.75, 1.0]])
timesteps = torch.tensor([999.0, 500.0])
actual = EulerDiscreteScheduler(**config).get_velocity(sample, noise, timesteps)
expected = DDIMScheduler(**config).get_velocity(sample, noise, timesteps.long())
print((actual - expected).abs().max().item())
I get 1.4713691473007202. Both schedulers have the same betas, so the velocity targets should agree.
Context
The SDXL T2I-Adapter training script uses this result as its loss target when the scheduler is configured for v_prediction. I reproduced the mismatch at the scheduler call on CPU with synthetic inputs.
System Info
Diffusers 0.44.0.dev0 at 08d5de3, Python 3.14.5, PyTorch 2.15.0+cpu, Linux x86_64. Single process on CPU.
- Ngôn ngữ chính
- Python
- Star
- 35k
- Fork
- 7.5k
- Merge trung bình
- 3 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 58
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của huggingface/diffusers
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
huggingface/diffusers#15463 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
huggingface/diffusers#15460 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
huggingface/diffusers#15459 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
GlmImagePipeline: image-to-image fails with `enable_model_cpu_offload()` (device mismatch in `get_image_features`)Có thể đã có người làm @saeekailas đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
huggingface/diffusers#15449 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
huggingface/diffusers#15436 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của huggingface/diffusers
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
daniel-ospina/tortoise#15014 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:api p2 product:business triage:active type:feat
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
cuadrao-ai/argus#2656 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
good first issue tests
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
yeab7505/tenasig#20 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày