+
    „°ñjí  ã                   ó`   € ^ RI t ^ RIt^ RIt ! R R4      t ! R R]4      tR]R]/tRRRR/tR# )é    Nc                   óX   a € ] tR t^t o RtR t]R 4       tRtRt	Rt
RtRtRtR tR	tV tR
# )ÚLoraLoaderBypasszÂ
Apply LoRA in bypass mode without modifying base model weights.

Bypass mode computes: output = base_forward(x) + lora_path(x)
This is useful for training and when model weights are offloaded.
c                ó   € R V n         R # ©N©Úloaded_lora)Úselfs   &ÚAC:\Ai_Coding\apps\studio\ComfyUI\comfy_extras\nodes_lora_debug.pyÚ__init__ÚLoraLoaderBypass.__init__   s
   € ØˆÖó    c                óŽ   € R RRRR/3RRRR/3R\         P                  ! R	4      RR
/3RRRRRRRRRRRR/3RRRRRRRRRRRR/3//# )ÚrequiredÚmodelÚMODELÚtooltipz0The diffusion model the LoRA will be applied to.ÚclipÚCLIPz+The CLIP model the LoRA will be applied to.Ú	lora_nameÚloraszThe name of the LoRA.Ústrength_modelÚFLOATÚdefaultç      ð?Úminç      Y@ÚmaxÚstepç{®Gáz„?zGHow strongly to modify the diffusion model. This value can be negative.Ústrength_clipzBHow strongly to modify the CLIP model. This value can be negative.ç      YÀ©Úfolder_pathsÚget_filename_list©Úss   &r
   ÚINPUT_TYPESÚLoraLoaderBypass.INPUT_TYPES   s­   € ð Ø˜' IÐ/aÐ#bÐcØ˜ )Ð-ZÐ![Ð\Øœl×<Ò<¸WÓEÈ	ÐSjÐGkÐlØ  7¨Y¸¸UÀFÈEÐSXÐZ`ÐbfÐhqð  t}ð  -~ð  #Ø '¨I°s¸EÀ6È5ÐRWÐY_ÐaeÐgpð  swð  ,xð  "yðð
ð 	
r   Ú	load_lorazmodel/loadersz¯Apply LoRA in bypass mode. Unlike regular LoRA, this doesn't modify model weights - instead it injects the LoRA computation during forward pass. Useful for training scenarios.Tc                ó~  € V^ 8X  d   V^ 8X  d   W3# \         P                  ! RV4      pRpV P                  e4   V P                  ^ ,          V8X  d   V P                  ^,          pMRV n        Vf*   \        P                  P                  VRR7      pWg3V n        \        P                  P                  WWtV4      w  r‰W‰3# )r   r   NT)Ú	safe_load)r#   Úget_full_path_or_raiser   ÚcomfyÚutilsÚload_torch_fileÚsdÚload_bypass_lora_for_models)
r	   r   r   r   r   r    Ú	lora_pathÚloraÚ
model_loraÚ	clip_loras
   &&&&&&    r
   r)   ÚLoraLoaderBypass.load_lora%   s¶   € Ø˜QÔ =°AÔ#5Ø�=Ð ä ×7Ò7¸ÀÓKˆ	ØˆØ×ÑÒ'Ø×Ñ Õ" iÔ/Ø×'Ñ'¨Õ*‘à#'�Ô àŠ<Ü—;‘;×.Ñ.¨yÀDÐ.ÓIˆDØ )Ð0ˆDÔä %§¡× DÑ DÀUÐRVÐhuÓ vÑˆ
ØÐ&Ð&r   r   N)r   r   )zThe modified diffusion model.zThe modified CLIP model.)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   Úclassmethodr'   ÚRETURN_TYPESÚOUTPUT_TOOLTIPSÚFUNCTIONÚCATEGORYÚDESCRIPTIONÚEXPERIMENTALr)   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r
   r   r      sP   ø‡ € ñò ð ñ	
ó ð	
ð %€LØS€OØ€Hà€Hð D€KØ€L÷'ð 'r   r   c                   ó>   a € ] tR t^9t o ]R 4       tRtRtR tRt	V t
R# )ÚLoraLoaderBypassModelOnlyc                óT   € R RRR\         P                  ! R4      3RRRRRRR
R	RR/3//# )r   r   r   r   r   r   r   r   r   r   r   r   r   ©r   r!   r"   r%   s   &r
   r'   Ú%LoraLoaderBypassModelOnly.INPUT_TYPES:   sK   € à˜g zØ)¬L×,JÒ,JÈ7Ó,SÐ+VØ.°¸9ÀcÈ5ÐRXÐZ_ÐafÐhnÐptÐ:uÐ0vð ð !ð 	!r   Úload_lora_model_onlyc                ó:   € V P                  VR W#^ 4      ^ ,          3# r   )r)   )r	   r   r   r   s   &&&&r
   rL   Ú.LoraLoaderBypassModelOnly.load_lora_model_onlyC   s   € Ø—‘˜u d¨IÀqÓIÈ!ÕLÐNÐNr   © NrJ   )r7   r8   r9   r:   r<   r'   r=   r?   rL   rC   rD   rE   s   @r
   rH   rH   9   s/   ø‡ € Øñ!ó ð!ð
 €LØ%€H÷Oð Or   rH   z"Load LoRA (Bypass) (For debugging)z.Load LoRA (Bypass, Model Only) (for debugging))r#   Úcomfy.utilsr-   Úcomfy.sdr   rH   ÚNODE_CLASS_MAPPINGSÚNODE_DISPLAY_NAME_MAPPINGSrO   r   r
   Ú<module>rT      sT   ðÛ Û Û ÷0'ñ 0'ôfOÐ 0ô Oð Ð(ØÐ!:ðÐ ð Ð<ØÐ!QðÒ r   