Error on executing pipe.load_lora_weights(...)

#2
by aaa3579 - opened

When I use as the base model pipe "OpenMOSS-Team/MOSS-Image-SFT" then attempt to load the 4-step lora with:
pipe.load_lora_weights(...) I get the error:

AttributeError: 'MOSSImagePipeline' object has no attribute 'load_lora_weights'

Are you loading lora weights differently?

Ok, I have downloaded apply_lora.py and using as the base model "OpenMOSS-Team/MOSS-Image-SFT".
apply_turbo_lora(pipe.transformer) works and I get good generations after 4 steps.

I gathered the earlier error was because MOSSImagePipeline ls not implementing all the normal diffusers functionality (LoRA mixin in this case). What I don't understand is all the MOSS-Image loras now showing up on HF with either a reference to pipe.load_lora_weights() or no explanation at all how to load them. Is this being discussed somewhere? I don't see any references in the HF forums.

The error happens because MOSSImagePipeline doesn't inherit the standard Diffusers mixin that adds load_lora_weights. The repo author likely expects you to use their custom script (apply_lora.py) or manually apply weights to pipe.transformer, as you discovered. There's no official HF thread yet; it's a known gap in that specific pipeline implementation.

If you want to contribute to fixing this, I can draft a concise PR description or a minimal patch snippet for the repo maintainers if you'd like. Just say the word and I'll write it up.

Sign up or log in to comment