huggingface / huggingface/diffusers

Whether lohaconfig is supported in the convert_state_dict_to_diffusers method

Offen
#10,899 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
stale
Vorherrschende Sprache
Python
Sterne
34.5k
Forks
7.3k
Ø Merge
3 T. 3 Std.
Gemergte PRs (30 T.)
91

Beschreibung

In the train_text_to_image_lora.py file

unet_lora_config = LoraConfig(
r=cfg.rank,
lora_alpha=cfg.rank,
init_lora_weights="gaussian",
target_modules=["to_k", "to_q", "to_v", "to_out.0"],
)
modified to

unet_lora_config = LoHaConfig(
r=cfg.rank,
alpha=cfg.rank,
target_modules=["to_k", "to_q", "to_v", "to_out.0"],
),

unet_lora_state_dict = convert_state_dict_to_diffusers(
get_peft_model_state_dict(unwrapped_unet)
)
in this line, an error will occur. Please tell me how to modify it.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start in train_text_to_image_lora.py and trace the convert_state_dict_to_diffusers call after replacing LoraConfig with LoHaConfig. Reproduce the reported error, then identify the required LoHa state-dict conversion behavior; done means the LoHa configuration path converts successfully without the reported error.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python, pytorch
Bereich
machine-learning
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.