
    
3jb                     ~   S SK Jr  SSKJrJrJr  SSKJrJrJ	r	  S r
\	" 5       (       a  S r0 r\" 5       (       aD  S/\S'   S	/\S
'   S/\S'   S/\S'   S/\S'   \	" 5       (       a  S/\S'   / SQ\S'   S/\S'   / SQ\S'   S/\S'   \(       d  \(       a  \" 5       (       av  SSKJr  SSKJr  SSKJr  SSKJr  SS KJr  \	" 5       (       aL  SS!KJrJrJrJr  SS"KJrJrJrJrJ r J!r!J"r"J#r#J$r$J%r%J&r&J'r'J(r(J)r)J*r*J+r+J,r,J-r-J.r.J/r/J0r0J1r1J2r2J3r3  SS#K4J5r5  SS$K6J7r7  SS%K8J9r9  g&S S&K:r:\" \;\<" 5       S'   \\=S(9\:R|                  \;'   g&))    )TYPE_CHECKING   )DIFFUSERS_SLOW_IMPORT_LazyModule	deprecate)is_peft_availableis_torch_availableis_transformers_availablec                 p   [        SSS5        0 n[        U 5       GH  u  p#UR                  R                  R	                  5       R                  5        H  u  pEXQU SU 3'   M     UR                  R                  R	                  5       R                  5        H  u  pEXQU SU 3'   M     UR                  R                  R	                  5       R                  5        H  u  pEXQU SU 3'   M     UR                  R                  R	                  5       R                  5        H  u  pEXQU SU 3'   M     GM     U$ )Nz(text_encoder_load_state_dict in `models`0.27.0`text_encoder_lora_state_dict` is deprecated and will be removed in 0.27.0. Make sure to retrieve the weights using `get_peft_model`. See https://huggingface.co/docs/peft/v0.6.2/en/quicktour#peftmodel for more information.z.q_proj.lora_linear_layer.z.k_proj.lora_linear_layer.z.v_proj.lora_linear_layer.z.out_proj.lora_linear_layer.)	r   text_encoder_attn_modulesq_projlora_linear_layer
state_dictitemsk_projv_projout_proj)text_encoderr   namemodulekvs         T/home/wildlama/miniconda3/lib/python3.13/site-packages/diffusers/loaders/__init__.pytext_encoder_lora_state_dictr      s1   2 	i
 J1,?MM33>>@FFHDAAB$9!=> I MM33>>@FFHDAAB$9!=> I MM33>>@FFHDAAB$9!=> I OO55@@BHHJDACD$;A3?@ K @     c                 H   [        SSS5        SSKJnJn  / n[	        XU45      (       aX  [        U R                  R                  R                  5       H)  u  pESU S3nUR                  nUR                  Xg45        M+     U$ [        SU R                  R                   35      e)	Nz%text_encoder_attn_modules in `models`r   r   r   )CLIPTextModelCLIPTextModelWithProjectionztext_model.encoder.layers.z
.self_attnz.do not know how to get attention modules for: )r   transformersr   r    
isinstance	enumerate
text_modelencoderlayers	self_attnappend
ValueError	__class____name__)r   r   r    attn_modulesilayerr   mods           r   r   r   !   s    3 m	

 	Ll4O$PQQ%l&=&=&E&E&L&LM3A3jAoo##TK0 N  MlNdNdNmNmMnoppr   FromOriginalModelMixinsingle_file_modelFluxTransformer2DLoadersMixintransformer_fluxSD3Transformer2DLoadersMixintransformer_sd3UNet2DConditionLoadersMixinunetAttnProcsLayersutilsFromSingleFileMixinsingle_file)AmusedLoraLoaderMixinStableDiffusionLoraLoaderMixinSD3LoraLoaderMixinAuraFlowLoraLoaderMixin StableDiffusionXLLoraLoaderMixinLTX2LoraLoaderMixinLTXVideoLoraLoaderMixinLoraLoaderMixinFluxLoraLoaderMixinCogVideoXLoraLoaderMixinCogView4LoraLoaderMixinMochi1LoraLoaderMixinHunyuanVideoLoraLoaderMixinSanaLoraLoaderMixinLumina2LoraLoaderMixinWanLoraLoaderMixinHeliosLoraLoaderMixinKandinskyLoraLoaderMixinHiDreamImageLoraLoaderMixinSkyReelsV2LoraLoaderMixinQwenImageLoraLoaderMixinZImageLoraLoaderMixinFlux2LoraLoaderMixinErnieImageLoraLoaderMixinlora_pipelineTextualInversionLoaderMixintextual_inversion)IPAdapterMixinFluxIPAdapterMixinSD3IPAdapterMixinModularIPAdapterMixin
ip_adapterPeftAdapterMixinpeft   )r0   )r2   )r4   )r6   )r8   )rX   rW   rZ   rY   )r<   r?   rE   rF   rS   rR   rD   rL   rN   rH   rM   rC   rA   rB   rJ   rG   rP   rI   r>   rO   r=   r@   rK   rQ   )r:   )rU   )r\   N__file__)module_spec)?typingr   r9   r   r   r   utils.import_utilsr   r	   r
   r   r   _import_structurer1   r0   r3   r2   r5   r4   r7   r6   r8   r[   rX   rW   rZ   rY   rT   r<   r?   rE   rF   rS   rR   rD   rL   rN   rH   rM   rC   rA   rB   rJ   rG   rP   rI   r>   rO   r=   r@   rK   rQ   r;   r:   rV   rU   r]   r\   sysr+   globals__spec__modules r   r   <module>ri      s\     A A a a0 *  .F-G)*-L,M(),J+K'(!> ?f"3!4g "",A+B-(.
/*4 3P1P-.+
,' 00 &  )=CA5*$&&       4 9F&'')J2GIZhpqCKKr   