You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The method load_lora_weights() uses the instance attritubes self.transformer_name and self._control_lora_supported_norm_keys but later on calls the class method self._load_norm_into_transformer in the same flow and since it's a class method, it's going to use the class attributes cls.transformer_name and cls._control_lora_supported_norm_keys .
Since they are in the same flow, in fact better use the same value everywhere, either one, or the other. In fact, there are lot of subclasses of FluxLoaderMixin and if an instance modifies either transformer_name or _control_lora_supported_norm_keys, it will lead to incoherencies.
The text was updated successfully, but these errors were encountered:
Better convert class methods into static methods and for example for _load_norm_into_transformer you can use the instance attribute transformer.transformer_name and transformer._control_lora_supported_norm_keys since you have transformer in the params
Since they are in the same flow, in fact better use the same value everywhere, either one, or the other. In fact, there are lot of subclasses of FluxLoaderMixin and if an instance modifies either transformer_name or _control_lora_supported_norm_keys, it will lead to incoherencies.
I am going to assume this modification will be done by the developer with everything in mind.
transformer.transformer_name and transformer._control_lora_supported_norm_keys
This I think we don't want as transformer_name and _control_lora_supported_norm_keys only become relevant during loading LoRAs.
It might not be a bug but it is still a problem.
The method load_lora_weights() uses the instance attritubes
self.transformer_name
andself._control_lora_supported_norm_keys
but later on calls the class methodself._load_norm_into_transformer
in the same flow and since it's a class method, it's going to use the class attributescls.transformer_name
andcls._control_lora_supported_norm_keys
.Since they are in the same flow, in fact better use the same value everywhere, either one, or the other. In fact, there are lot of subclasses of FluxLoaderMixin and if an instance modifies either transformer_name or _control_lora_supported_norm_keys, it will lead to incoherencies.
The text was updated successfully, but these errors were encountered: