Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

训练minimax- h3的nf4模型的lora,使用adapter训练时融合lora会报错

Đang mở
#1,642 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
machine-learning

Hướng nghiên cứu

Bắt đầu với examples/minimax_h3/model_training/train.py, sau đó lần theo switch_pipe_to_training_mode trong diffsynth/diffusion/training_module.py qua load_lora trong diffsynth/diffusion/base_pipeline.py. Kiểm tra diffsynth/utils/lora/general.py quanh dòng 67 và so sánh shape tensor của adapter base và LoRA cho adapter NF4. Hoàn thành khi ví dụ huấn luyện NF4 của MiniMax H3 có thể hợp nhất adapter mà không gặp lỗi không khớp kích thước đã được báo cáo.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

[rank0]: Traceback (most recent call last):
[rank0]: File "/data4/hjhuang/code/DiffSynth-Studio-2.1.4/examples/minimax_h3/model_training/train.py", line 190, in
[rank0]: model = MiniMaxH3TrainingModule(
[rank0]: File "/data4/hjhuang/code/DiffSynth-Studio-2.1.4/examples/minimax_h3/model_training/train.py", line 50, in init
[rank0]: self.switch_pipe_to_training_mode(
[rank0]: File "/data4/hjhuang/code/DiffSynth-Studio-2.1.4/diffsynth/diffusion/training_module.py", line 322, in switch_pipe_to_training_mode
[rank0]: pipe.load_lora(getattr(pipe, preset_lora_model), preset_lora_path)
[rank0]: File "/data4/hjhuang/code/DiffSynth-Studio-2.1.4/diffsynth/diffusion/base_pipeline.py", line 280, in load_lora
[rank0]: lora_loader.fuse_lora_to_base_model(module, lora, alpha=alpha)
[rank0]: File "/data4/hjhuang/code/DiffSynth-Studio-2.1.4/diffsynth/utils/lora/general.py", line 67, in fuse_lora_to_base_model
[rank0]: state_dict_base["weight"] = state_dict_base["weight"].to(device=self.device, dtype=self.torch_dtype) + weight_lora
[rank0]: RuntimeError: The size of tensor a (57802752) must match the size of tensor b (21504) at non-singleton dimension 0

Ngôn ngữ chính
Python
Star
13.2k
Fork
1.3k
Merge trung bình
4 ngày 2 giờ
Pull request đã merge (30 ngày)
29

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của modelscope/DiffSynth-Studio

Tất cả issue của modelscope/DiffSynth-Studio

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.