Buckets:
| import"../chunks/DsnmJJEf.js";import{i as wl,h as Ml,C as Sl,H as d,D as a,E as Tl,s as Nl,a as c}from"../chunks/BtE7mKSK.js";import{p as kl,o as Rl,s as e,f as _,a as f,b as Ul,c as r,d as u,r as o,n as s}from"../chunks/jDjavuwI.js";import{E as p}from"../chunks/SrSJA0zO.js";const Jl='{"title":"LoRA","local":"lora","sections":[{"title":"LoraBaseMixin","local":"diffusers.loaders.lora_base.LoraBaseMixin","sections":[],"depth":2},{"title":"StableDiffusionLoraLoaderMixin","local":"diffusers.loaders.StableDiffusionLoraLoaderMixin","sections":[],"depth":2},{"title":"StableDiffusionXLLoraLoaderMixin","local":"diffusers.loaders.StableDiffusionXLLoraLoaderMixin","sections":[],"depth":2},{"title":"SD3LoraLoaderMixin","local":"diffusers.loaders.SD3LoraLoaderMixin","sections":[],"depth":2},{"title":"FluxLoraLoaderMixin","local":"diffusers.loaders.FluxLoraLoaderMixin","sections":[],"depth":2},{"title":"Flux2LoraLoaderMixin","local":"diffusers.loaders.Flux2LoraLoaderMixin","sections":[],"depth":2},{"title":"ErnieImageLoraLoaderMixin","local":"diffusers.loaders.ErnieImageLoraLoaderMixin","sections":[],"depth":2},{"title":"LTX2LoraLoaderMixin","local":"diffusers.loaders.LTX2LoraLoaderMixin","sections":[],"depth":2},{"title":"CogVideoXLoraLoaderMixin","local":"diffusers.loaders.CogVideoXLoraLoaderMixin","sections":[],"depth":2},{"title":"Mochi1LoraLoaderMixin","local":"diffusers.loaders.Mochi1LoraLoaderMixin","sections":[],"depth":2},{"title":"AuraFlowLoraLoaderMixin","local":"diffusers.loaders.AuraFlowLoraLoaderMixin","sections":[],"depth":2},{"title":"LTXVideoLoraLoaderMixin","local":"diffusers.loaders.LTXVideoLoraLoaderMixin","sections":[],"depth":2},{"title":"SanaLoraLoaderMixin","local":"diffusers.loaders.SanaLoraLoaderMixin","sections":[],"depth":2},{"title":"HeliosLoraLoaderMixin","local":"diffusers.loaders.HeliosLoraLoaderMixin","sections":[],"depth":2},{"title":"HunyuanVideoLoraLoaderMixin","local":"diffusers.loaders.HunyuanVideoLoraLoaderMixin","sections":[],"depth":2},{"title":"Lumina2LoraLoaderMixin","local":"diffusers.loaders.Lumina2LoraLoaderMixin","sections":[],"depth":2},{"title":"CogView4LoraLoaderMixin","local":"diffusers.loaders.CogView4LoraLoaderMixin","sections":[],"depth":2},{"title":"WanLoraLoaderMixin","local":"diffusers.loaders.WanLoraLoaderMixin","sections":[],"depth":2},{"title":"SkyReelsV2LoraLoaderMixin","local":"diffusers.loaders.SkyReelsV2LoraLoaderMixin","sections":[],"depth":2},{"title":"AmusedLoraLoaderMixin","local":"diffusers.loaders.AmusedLoraLoaderMixin","sections":[],"depth":2},{"title":"AnimaLoraLoaderMixin","local":"diffusers.loaders.AnimaLoraLoaderMixin","sections":[],"depth":2},{"title":"AceStepLoraLoaderMixin","local":"diffusers.loaders.AceStepLoraLoaderMixin","sections":[],"depth":2},{"title":"HiDreamImageLoraLoaderMixin","local":"diffusers.loaders.HiDreamImageLoraLoaderMixin","sections":[],"depth":2},{"title":"QwenImageLoraLoaderMixin","local":"diffusers.loaders.QwenImageLoraLoaderMixin","sections":[],"depth":2},{"title":"ZImageLoraLoaderMixin","local":"diffusers.loaders.ZImageLoraLoaderMixin","sections":[],"depth":2},{"title":"CosmosLoraLoaderMixin","local":"diffusers.loaders.CosmosLoraLoaderMixin","sections":[],"depth":2},{"title":"KandinskyLoraLoaderMixin","local":"diffusers.loaders.KandinskyLoraLoaderMixin","sections":[],"depth":2},{"title":"Ideogram4LoraLoaderMixin","local":"diffusers.loaders.Ideogram4LoraLoaderMixin","sections":[],"depth":2},{"title":"Krea2LoraLoaderMixin","local":"diffusers.loaders.Krea2LoraLoaderMixin","sections":[],"depth":2},{"title":"LoraBaseMixin","local":"diffusers.loaders.lora_base.LoraBaseMixin","sections":[],"depth":2}],"depth":1}';var Dl=u('<meta name="hf:doc:metadata"/>'),m=u("<p>Example:</p> <!>",1),Cr=u("<p>Examples:</p> <!>",1),Zl=u(`<p></p> <!> <!> <p>LoRA is a fast and lightweight training method that inserts and trains a significantly smaller number of parameters instead of all the model parameters. This produces a smaller file (~100 MBs) and makes it easier to quickly train a model to learn a new concept. LoRA weights are typically loaded into the denoiser, text encoder or both. The denoiser usually corresponds to a UNet (<a href="/docs/diffusers/pr_14358/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>, for example) or a Transformer (<a href="/docs/diffusers/pr_14358/en/api/models/sd3_transformer2d#diffusers.SD3Transformer2DModel">SD3Transformer2DModel</a>, for example). There are several classes for loading LoRA weights:</p> <ul><li><code>StableDiffusionLoraLoaderMixin</code> provides functions for loading and unloading, fusing and unfusing, enabling and disabling, and more functions for managing LoRA weights. This class can be used with any model.</li> <li><code>StableDiffusionXLLoraLoaderMixin</code> is a <a href="../../api/pipelines/stable_diffusion/stable_diffusion_xl">Stable Diffusion (SDXL)</a> version of the <code>StableDiffusionLoraLoaderMixin</code> class for loading and saving LoRA weights. It can only be used with the SDXL model.</li> <li><code>SD3LoraLoaderMixin</code> provides similar functions for <a href="https://huggingface.co/blog/sd3" rel="nofollow">Stable Diffusion 3</a>.</li> <li><code>FluxLoraLoaderMixin</code> provides similar functions for <a href="https://huggingface.co/docs/diffusers/main/en/api/pipelines/flux" rel="nofollow">Flux</a>.</li> <li><code>CogVideoXLoraLoaderMixin</code> provides similar functions for <a href="https://huggingface.co/docs/diffusers/main/en/api/pipelines/cogvideox" rel="nofollow">CogVideoX</a>.</li> <li><code>Mochi1LoraLoaderMixin</code> provides similar functions for <a href="https://huggingface.co/docs/diffusers/main/en/api/pipelines/mochi" rel="nofollow">Mochi</a>.</li> <li><code>AuraFlowLoraLoaderMixin</code> provides similar functions for <a href="https://huggingface.co/fal/AuraFlow" rel="nofollow">AuraFlow</a>.</li> <li><code>LTXVideoLoraLoaderMixin</code> provides similar functions for <a href="https://huggingface.co/docs/diffusers/main/en/api/pipelines/ltx_video" rel="nofollow">LTX-Video</a>.</li> <li><code>SanaLoraLoaderMixin</code> provides similar functions for <a href="https://huggingface.co/docs/diffusers/main/en/api/pipelines/sana" rel="nofollow">Sana</a>.</li> <li><code>HeliosLoraLoaderMixin</code> provides similar functions for <a href="https://huggingface.co/docs/diffusers/main/en/api/pipelines/helios" rel="nofollow">HunyuanVideo</a>.</li> <li><code>HunyuanVideoLoraLoaderMixin</code> provides similar functions for <a href="https://huggingface.co/docs/diffusers/main/en/api/pipelines/hunyuan_video" rel="nofollow">HunyuanVideo</a>.</li> <li><code>Lumina2LoraLoaderMixin</code> provides similar functions for <a href="https://huggingface.co/docs/diffusers/main/en/api/pipelines/lumina2" rel="nofollow">Lumina2</a>.</li> <li><code>WanLoraLoaderMixin</code> provides similar functions for <a href="https://huggingface.co/docs/diffusers/main/en/api/pipelines/wan" rel="nofollow">Wan</a>.</li> <li><code>SkyReelsV2LoraLoaderMixin</code> provides similar functions for <a href="https://huggingface.co/docs/diffusers/main/en/api/pipelines/skyreels_v2" rel="nofollow">SkyReels-V2</a>.</li> <li><code>CogView4LoraLoaderMixin</code> provides similar functions for <a href="https://huggingface.co/docs/diffusers/main/en/api/pipelines/cogview4" rel="nofollow">CogView4</a>.</li> <li><code>AmusedLoraLoaderMixin</code> is for the <code>AmusedPipeline</code>.</li> <li><code>AnimaLoraLoaderMixin</code> provides similar functions for <a href="https://huggingface.co/docs/diffusers/main/en/api/pipelines/anima" rel="nofollow">Anima</a>.</li> <li><code>AceStepLoraLoaderMixin</code> provides similar functions for <a href="https://huggingface.co/docs/diffusers/main/en/api/pipelines/ace_step" rel="nofollow">ACE-Step</a>.</li> <li><code>HiDreamImageLoraLoaderMixin</code> provides similar functions for <a href="https://huggingface.co/docs/diffusers/main/en/api/pipelines/hidream" rel="nofollow">HiDream Image</a></li> <li><code>QwenImageLoraLoaderMixin</code> provides similar functions for <a href="https://huggingface.co/docs/diffusers/main/en/api/pipelines/qwen" rel="nofollow">Qwen Image</a>.</li> <li><code>ZImageLoraLoaderMixin</code> provides similar functions for <a href="https://huggingface.co/docs/diffusers/main/en/api/pipelines/zimage" rel="nofollow">Z-Image</a>.</li> <li><code>Flux2LoraLoaderMixin</code> provides similar functions for <a href="https://huggingface.co/docs/diffusers/main/en/api/pipelines/flux2" rel="nofollow">Flux2</a>.</li> <li><code>ErnieImageLoraLoaderMixin</code> provides similar functions for <a href="https://huggingface.co/docs/diffusers/main/en/api/pipelines/ernie_image" rel="nofollow">Ernie-Image</a>.</li> <li><code>LTX2LoraLoaderMixin</code> provides similar functions for <a href="https://huggingface.co/docs/diffusers/main/en/api/pipelines/ltx2" rel="nofollow">Flux2</a>.</li> <li><code>LoraBaseMixin</code> provides a base class with several utility methods to fuse, unfuse, unload, LoRAs and more.</li></ul> <blockquote class="tip"><p>To learn more about how to load LoRA weights, see the <a href="../../tutorials/using_peft_for_inference">LoRA</a> loading guide.</p></blockquote> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Utility class for handling LoRAs.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Delete an adapter’s LoRA layers from the pipeline.</p> <!></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Disables the active LoRA layers of the pipeline.</p> <!></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Enables the active LoRA layers of the pipeline.</p> <!></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Hotswap adapters without triggering recompilation of a model or if the ranks of the loaded adapters are | |
| different.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Fuses the LoRA parameters into the original parameters of the corresponding blocks.</p> <!></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Gets the list of the current active adapters.</p> <!></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Gets the current list of all available adapters in the pipeline.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Set the currently active adapters for use in the pipeline.</p> <!></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Moves the LoRAs listed in <code>adapter_names</code> to a target device. Useful for offloading the LoRA to the CPU in case | |
| you want to load multiple adapters and free some GPU memory.</p> <p>After offloading the LoRA adapters to CPU, as long as the rest of the model is still on GPU, the LoRA adapters | |
| can no longer be used for inference, as that would cause a device mismatch. Remember to set the device back to | |
| GPU before using those LoRA adapters for inference.</p> <!></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Reverses the effect of <a href="https://huggingface.co/docs/diffusers/main/en/api/loaders#diffusers.loaders.LoraBaseMixin.fuse_lora" rel="nofollow"><code>pipe.fuse_lora()</code></a>.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Unloads the LoRA parameters.</p> <!></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Writes the state dict of the LoRA layers (optionally with metadata) to disk.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Load LoRA layers into Stable Diffusion <a href="/docs/diffusers/pr_14358/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a> and <a href="https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel" rel="nofollow"><code>CLIPTextModel</code></a>.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>This will load the LoRA layers specified in <code>state_dict</code> into <code>text_encoder</code></p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>This will load the LoRA layers specified in <code>state_dict</code> into <code>unet</code>.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Load LoRA weights specified in <code>pretrained_model_name_or_path_or_dict</code> into <code>self.unet</code> and <code>self.text_encoder</code>.</p> <p>All kwargs are forwarded to <code>self.lora_state_dict</code>.</p> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details on how the state dict is | |
| loaded.</p> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet">load_lora_into_unet()</a> for more details on how the state dict is | |
| loaded into <code>self.unet</code>.</p> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_text_encoder">load_lora_into_text_encoder()</a> for more details on how the state | |
| dict is loaded into <code>self.text_encoder</code>.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Return state dict for lora weights and the network alphas.</p> <blockquote class="warning"><p>> We support loading A1111 formatted LoRA checkpoints in a limited capacity. > > This function is | |
| experimental and might change in the future.</p></blockquote></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Save the LoRA parameters corresponding to the UNet and text encoder.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Load LoRA layers into Stable Diffusion XL <a href="/docs/diffusers/pr_14358/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>, <a href="https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel" rel="nofollow"><code>CLIPTextModel</code></a>, and <a href="https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModelWithProjection" rel="nofollow"><code>CLIPTextModelWithProjection</code></a>.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>fuse_lora()</code> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>This will load the LoRA layers specified in <code>state_dict</code> into <code>text_encoder</code></p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>This will load the LoRA layers specified in <code>state_dict</code> into <code>unet</code>.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Return state dict for lora weights and the network alphas.</p> <blockquote class="warning"><p>> We support loading A1111 formatted LoRA checkpoints in a limited capacity. > > This function is | |
| experimental and might change in the future.</p></blockquote></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for more information.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>unfuse_lora()</code> for more details.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Load LoRA layers into <a href="/docs/diffusers/pr_14358/en/api/models/sd3_transformer2d#diffusers.SD3Transformer2DModel">SD3Transformer2DModel</a>, <a href="https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel" rel="nofollow"><code>CLIPTextModel</code></a>, and <a href="https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModelWithProjection" rel="nofollow"><code>CLIPTextModelWithProjection</code></a>.</p> <p>Specific to <a href="/docs/diffusers/pr_14358/en/api/pipelines/stable_diffusion/stable_diffusion_3#diffusers.StableDiffusion3Pipeline">StableDiffusion3Pipeline</a>.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>fuse_lora()</code> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>This will load the LoRA layers specified in <code>state_dict</code> into <code>text_encoder</code></p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet">load_lora_into_unet()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for more information.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>unfuse_lora()</code> for more details.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Load LoRA layers into <a href="/docs/diffusers/pr_14358/en/api/models/flux_transformer#diffusers.FluxTransformer2DModel">FluxTransformer2DModel</a>, <a href="https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel" rel="nofollow"><code>CLIPTextModel</code></a>.</p> <p>Specific to <a href="/docs/diffusers/pr_14358/en/api/pipelines/flux#diffusers.FluxPipeline">FluxPipeline</a>.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>This will load the LoRA layers specified in <code>state_dict</code> into <code>text_encoder</code></p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet">load_lora_into_unet()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Save the LoRA parameters corresponding to the UNet and text encoder.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Reverses the effect of <a href="https://huggingface.co/docs/diffusers/main/en/api/loaders#diffusers.loaders.LoraBaseMixin.fuse_lora" rel="nofollow"><code>pipe.fuse_lora()</code></a>.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Unloads the LoRA parameters.</p> <!></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Load LoRA layers into <a href="/docs/diffusers/pr_14358/en/api/models/flux2_transformer#diffusers.Flux2Transformer2DModel">Flux2Transformer2DModel</a>. Specific to <a href="/docs/diffusers/pr_14358/en/api/pipelines/flux2#diffusers.Flux2Pipeline">Flux2Pipeline</a>.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>fuse_lora()</code> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet">load_lora_into_unet()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for more information.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>unfuse_lora()</code> for more details.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Load LoRA layers into <a href="/docs/diffusers/pr_14358/en/api/models/ernie_image_transformer2d#diffusers.ErnieImageTransformer2DModel">ErnieImageTransformer2DModel</a>. Specific to <code>ErnieImagePipeline</code>.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>fuse_lora()</code> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet">load_lora_into_unet()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for more information.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>unfuse_lora()</code> for more details.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Load LoRA layers into <a href="/docs/diffusers/pr_14358/en/api/models/ltx2_video_transformer3d#diffusers.LTX2VideoTransformer3DModel">LTX2VideoTransformer3DModel</a>. Specific to <a href="/docs/diffusers/pr_14358/en/api/pipelines/ltx2#diffusers.LTX2Pipeline">LTX2Pipeline</a>.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>fuse_lora()</code> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet">load_lora_into_unet()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for more information.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>unfuse_lora()</code> for more details.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Load LoRA layers into <a href="/docs/diffusers/pr_14358/en/api/models/cogvideox_transformer3d#diffusers.CogVideoXTransformer3DModel">CogVideoXTransformer3DModel</a>. Specific to <a href="/docs/diffusers/pr_14358/en/api/pipelines/cogvideox#diffusers.CogVideoXPipeline">CogVideoXPipeline</a>.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>fuse_lora()</code> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet">load_lora_into_unet()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for more information.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>unfuse_lora()</code> for more details.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Load LoRA layers into <a href="/docs/diffusers/pr_14358/en/api/models/mochi_transformer3d#diffusers.MochiTransformer3DModel">MochiTransformer3DModel</a>. Specific to <a href="/docs/diffusers/pr_14358/en/api/pipelines/mochi#diffusers.MochiPipeline">MochiPipeline</a>.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>fuse_lora()</code> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet">load_lora_into_unet()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for more information.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>unfuse_lora()</code> for more details.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Load LoRA layers into <a href="/docs/diffusers/pr_14358/en/api/models/aura_flow_transformer2d#diffusers.AuraFlowTransformer2DModel">AuraFlowTransformer2DModel</a> Specific to <a href="/docs/diffusers/pr_14358/en/api/pipelines/aura_flow#diffusers.AuraFlowPipeline">AuraFlowPipeline</a>.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>fuse_lora()</code> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet">load_lora_into_unet()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for more information.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>unfuse_lora()</code> for more details.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Load LoRA layers into <a href="/docs/diffusers/pr_14358/en/api/models/ltx_video_transformer3d#diffusers.LTXVideoTransformer3DModel">LTXVideoTransformer3DModel</a>. Specific to <a href="/docs/diffusers/pr_14358/en/api/pipelines/ltx_video#diffusers.LTXPipeline">LTXPipeline</a>.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>fuse_lora()</code> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet">load_lora_into_unet()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for more information.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>unfuse_lora()</code> for more details.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Load LoRA layers into <a href="/docs/diffusers/pr_14358/en/api/models/sana_transformer2d#diffusers.SanaTransformer2DModel">SanaTransformer2DModel</a>. Specific to <a href="/docs/diffusers/pr_14358/en/api/pipelines/sana#diffusers.SanaPipeline">SanaPipeline</a>.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>fuse_lora()</code> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet">load_lora_into_unet()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for more information.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>unfuse_lora()</code> for more details.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Load LoRA layers into <a href="/docs/diffusers/pr_14358/en/api/models/helios_transformer3d#diffusers.HeliosTransformer3DModel">HeliosTransformer3DModel</a>. Specific to <a href="/docs/diffusers/pr_14358/en/api/pipelines/helios#diffusers.HeliosPipeline">HeliosPipeline</a> and <a href="/docs/diffusers/pr_14358/en/api/pipelines/helios#diffusers.HeliosPyramidPipeline">HeliosPyramidPipeline</a>.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>fuse_lora()</code> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet">load_lora_into_unet()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for more information.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>unfuse_lora()</code> for more details.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Load LoRA layers into <a href="/docs/diffusers/pr_14358/en/api/models/hunyuan_video_transformer_3d#diffusers.HunyuanVideoTransformer3DModel">HunyuanVideoTransformer3DModel</a>. Specific to <a href="/docs/diffusers/pr_14358/en/api/pipelines/hunyuan_video#diffusers.HunyuanVideoPipeline">HunyuanVideoPipeline</a>.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>fuse_lora()</code> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet">load_lora_into_unet()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for more information.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>unfuse_lora()</code> for more details.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Load LoRA layers into <a href="/docs/diffusers/pr_14358/en/api/models/lumina2_transformer2d#diffusers.Lumina2Transformer2DModel">Lumina2Transformer2DModel</a>. Specific to <code>Lumina2Text2ImgPipeline</code>.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>fuse_lora()</code> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet">load_lora_into_unet()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for more information.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>unfuse_lora()</code> for more details.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Load LoRA layers into <a href="/docs/diffusers/pr_14358/en/api/models/wan_transformer_3d#diffusers.WanTransformer3DModel">WanTransformer3DModel</a>. Specific to <a href="/docs/diffusers/pr_14358/en/api/pipelines/cogview4#diffusers.CogView4Pipeline">CogView4Pipeline</a>.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>fuse_lora()</code> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet">load_lora_into_unet()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for more information.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>unfuse_lora()</code> for more details.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Load LoRA layers into <a href="/docs/diffusers/pr_14358/en/api/models/wan_transformer_3d#diffusers.WanTransformer3DModel">WanTransformer3DModel</a>. Specific to <a href="/docs/diffusers/pr_14358/en/api/pipelines/wan#diffusers.WanPipeline">WanPipeline</a> and <code>[WanImageToVideoPipeline</code>].</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>fuse_lora()</code> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet">load_lora_into_unet()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for more information.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>unfuse_lora()</code> for more details.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Load LoRA layers into <a href="/docs/diffusers/pr_14358/en/api/models/skyreels_v2_transformer_3d#diffusers.SkyReelsV2Transformer3DModel">SkyReelsV2Transformer3DModel</a>.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>fuse_lora()</code> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet">load_lora_into_unet()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for more information.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>unfuse_lora()</code> for more details.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet">load_lora_into_unet()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Save the LoRA parameters corresponding to the UNet and text encoder.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Load LoRA layers into <a href="/docs/diffusers/pr_14358/en/api/models/cosmos_transformer3d#diffusers.CosmosTransformer3DModel">CosmosTransformer3DModel</a> and <a href="/docs/diffusers/pr_14358/en/api/pipelines/anima#diffusers.AnimaTextConditioner">AnimaTextConditioner</a>.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>fuse_lora()</code> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>unfuse_lora()</code> for more details.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Load LoRA layers into <a href="/docs/diffusers/pr_14358/en/api/models/ace_step_transformer#diffusers.AceStepTransformer1DModel">AceStepTransformer1DModel</a>. Specific to <a href="/docs/diffusers/pr_14358/en/api/pipelines/ace_step#diffusers.AceStepPipeline">AceStepPipeline</a>.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>fuse_lora()</code> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet">load_lora_into_unet()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for more information.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>unfuse_lora()</code> for more details.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Load LoRA layers into <a href="/docs/diffusers/pr_14358/en/api/models/hidream_image_transformer#diffusers.HiDreamImageTransformer2DModel">HiDreamImageTransformer2DModel</a>. Specific to <a href="/docs/diffusers/pr_14358/en/api/pipelines/hidream#diffusers.HiDreamImagePipeline">HiDreamImagePipeline</a>.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>fuse_lora()</code> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet">load_lora_into_unet()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for more information.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>unfuse_lora()</code> for more details.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Load LoRA layers into <a href="/docs/diffusers/pr_14358/en/api/models/qwenimage_transformer2d#diffusers.QwenImageTransformer2DModel">QwenImageTransformer2DModel</a>. Specific to <a href="/docs/diffusers/pr_14358/en/api/pipelines/qwenimage#diffusers.QwenImagePipeline">QwenImagePipeline</a>.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>fuse_lora()</code> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet">load_lora_into_unet()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for more information.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>unfuse_lora()</code> for more details.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Load LoRA layers into <a href="/docs/diffusers/pr_14358/en/api/models/z_image_transformer2d#diffusers.ZImageTransformer2DModel">ZImageTransformer2DModel</a>. Specific to <a href="/docs/diffusers/pr_14358/en/api/pipelines/z_image#diffusers.ZImagePipeline">ZImagePipeline</a>.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>fuse_lora()</code> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet">load_lora_into_unet()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for more information.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>unfuse_lora()</code> for more details.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Load LoRA layers into <a href="/docs/diffusers/pr_14358/en/api/models/cosmos_transformer3d#diffusers.CosmosTransformer3DModel">CosmosTransformer3DModel</a>, Specific to <a href="/docs/diffusers/pr_14358/en/api/pipelines/cosmos#diffusers.Cosmos2_5_PredictBasePipeline">Cosmos2_5_PredictBasePipeline</a>.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>fuse_lora()</code> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet">load_lora_into_unet()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for more information.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>unfuse_lora()</code> for more details.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Load LoRA layers into <code>Kandinsky5Transformer3DModel</code>,</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>fuse_lora()</code> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet">load_lora_into_unet()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for more information.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>unfuse_lora()</code> for more details.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Load LoRA layers into <a href="/docs/diffusers/pr_14358/en/api/models/ideogram4_transformer2d#diffusers.Ideogram4Transformer2DModel">Ideogram4Transformer2DModel</a>. Specific to <a href="/docs/diffusers/pr_14358/en/api/pipelines/ideogram4#diffusers.Ideogram4Pipeline">Ideogram4Pipeline</a>.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>fuse_lora()</code> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet">load_lora_into_unet()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for more information.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>unfuse_lora()</code> for more details.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Load LoRA layers into <a href="/docs/diffusers/pr_14358/en/api/models/krea2_transformer2d#diffusers.Krea2Transformer2DModel">Krea2Transformer2DModel</a>. Specific to <a href="/docs/diffusers/pr_14358/en/api/pipelines/krea2#diffusers.Krea2Pipeline">Krea2Pipeline</a>.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>fuse_lora()</code> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet">load_lora_into_unet()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict">lora_state_dict()</a> for more details.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights">save_lora_weights()</a> for more information.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>See <code>unfuse_lora()</code> for more details.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Utility class for handling LoRAs.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Delete an adapter’s LoRA layers from the pipeline.</p> <!></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Disables the active LoRA layers of the pipeline.</p> <!></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Enables the active LoRA layers of the pipeline.</p> <!></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Hotswap adapters without triggering recompilation of a model or if the ranks of the loaded adapters are | |
| different.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Fuses the LoRA parameters into the original parameters of the corresponding blocks.</p> <!></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Gets the list of the current active adapters.</p> <!></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Gets the current list of all available adapters in the pipeline.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Set the currently active adapters for use in the pipeline.</p> <!></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Moves the LoRAs listed in <code>adapter_names</code> to a target device. Useful for offloading the LoRA to the CPU in case | |
| you want to load multiple adapters and free some GPU memory.</p> <p>After offloading the LoRA adapters to CPU, as long as the rest of the model is still on GPU, the LoRA adapters | |
| can no longer be used for inference, as that would cause a device mismatch. Remember to set the device back to | |
| GPU before using those LoRA adapters for inference.</p> <!></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Reverses the effect of <a href="https://huggingface.co/docs/diffusers/main/en/api/loaders#diffusers.loaders.LoraBaseMixin.fuse_lora" rel="nofollow"><code>pipe.fuse_lora()</code></a>.</p></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Unloads the LoRA parameters.</p> <!></div> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Writes the state dict of the LoRA layers (optionally with metadata) to disk.</p></div></div> <!> <p></p>`,1);function Gl(Qs,Ps){kl(Ps,!1),Rl(()=>{new URLSearchParams(window.location.search).get("fw")}),wl();var qr=Zl();Ml("yjofn9",t=>{var n=Dl();Nl(n,"content",Jl),f(t,n)});var Yr=e(_(qr),2);Sl(Yr,{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"});var zr=e(Yr,2);d(zr,{title:"LoRA",local:"lora",headingTag:"h1"});var Qr=e(zr,8);d(Qr,{title:"LoraBaseMixin",local:"diffusers.loaders.lora_base.LoraBaseMixin",headingTag:"h2"});var h=e(Qr,2),Pr=r(h);a(Pr,{name:"class diffusers.loaders.lora_base.LoraBaseMixin",anchor:"diffusers.loaders.lora_base.LoraBaseMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_base.py#L478",parameters:[]});var g=e(Pr,4),Er=r(g);a(Er,{name:"delete_adapters",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.delete_adapters",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_base.py#L840",parameters:[{name:"adapter_names",val:": list[str] | str"}],parametersDescription:[{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.delete_adapters.adapter_names",description:`<strong>adapter_names</strong> (<code>list[str, str]</code>) — | |
| The names of the adapters to delete.`,name:"adapter_names"}]});var Es=e(Er,4);p(Es,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.delete_adapters.example",children:(t,n)=>{var i=m(),l=e(_(i),2);c(l,{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQXBpcGVsaW5lLmxvYWRfbG9yYV93ZWlnaHRzKCUwQSUyMCUyMCUyMCUyMCUyMmpiaWxja2UtaGYlMkZzZHhsLWNpbmVtYXRpYy0xJTIyJTJDJTIwd2VpZ2h0X25hbWUlM0QlMjJweXRvcmNoX2xvcmFfd2VpZ2h0cy5zYWZldGVuc29ycyUyMiUyQyUyMGFkYXB0ZXJfbmFtZXMlM0QlMjJjaW5lbWF0aWMlMjIlMEEpJTBBcGlwZWxpbmUuZGVsZXRlX2FkYXB0ZXJzKCUyMmNpbmVtYXRpYyUyMik=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image | |
| <span class="hljs-keyword">import</span> torch | |
| pipeline = AutoPipelineForText2Image.from_pretrained( | |
| <span class="hljs-string">"stabilityai/stable-diffusion-xl-base-1.0"</span>, torch_dtype=torch.float16 | |
| ).to(<span class="hljs-string">"cuda"</span>) | |
| pipeline.load_lora_weights( | |
| <span class="hljs-string">"jbilcke-hf/sdxl-cinematic-1"</span>, weight_name=<span class="hljs-string">"pytorch_lora_weights.safetensors"</span>, adapter_names=<span class="hljs-string">"cinematic"</span> | |
| ) | |
| pipeline.delete_adapters(<span class="hljs-string">"cinematic"</span>)`,lang:"py",wrap:!1}),f(t,i)},$$slots:{default:!0}}),o(g);var v=e(g,2),Hr=r(v);a(Hr,{name:"disable_lora",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.disable_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_base.py#L780",parameters:[]});var Hs=e(Hr,4);p(Hs,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.disable_lora.example",children:(t,n)=>{var i=m(),l=e(_(i),2);c(l,{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQXBpcGVsaW5lLmxvYWRfbG9yYV93ZWlnaHRzKCUwQSUyMCUyMCUyMCUyMCUyMmpiaWxja2UtaGYlMkZzZHhsLWNpbmVtYXRpYy0xJTIyJTJDJTIwd2VpZ2h0X25hbWUlM0QlMjJweXRvcmNoX2xvcmFfd2VpZ2h0cy5zYWZldGVuc29ycyUyMiUyQyUyMGFkYXB0ZXJfbmFtZSUzRCUyMmNpbmVtYXRpYyUyMiUwQSklMEFwaXBlbGluZS5kaXNhYmxlX2xvcmEoKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image | |
| <span class="hljs-keyword">import</span> torch | |
| pipeline = AutoPipelineForText2Image.from_pretrained( | |
| <span class="hljs-string">"stabilityai/stable-diffusion-xl-base-1.0"</span>, torch_dtype=torch.float16 | |
| ).to(<span class="hljs-string">"cuda"</span>) | |
| pipeline.load_lora_weights( | |
| <span class="hljs-string">"jbilcke-hf/sdxl-cinematic-1"</span>, weight_name=<span class="hljs-string">"pytorch_lora_weights.safetensors"</span>, adapter_name=<span class="hljs-string">"cinematic"</span> | |
| ) | |
| pipeline.disable_lora()`,lang:"py",wrap:!1}),f(t,i)},$$slots:{default:!0}}),o(v);var b=e(v,2),Kr=r(b);a(Kr,{name:"enable_lora",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.enable_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_base.py#L810",parameters:[]});var Ks=e(Kr,4);p(Ks,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.enable_lora.example",children:(t,n)=>{var i=m(),l=e(_(i),2);c(l,{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQXBpcGVsaW5lLmxvYWRfbG9yYV93ZWlnaHRzKCUwQSUyMCUyMCUyMCUyMCUyMmpiaWxja2UtaGYlMkZzZHhsLWNpbmVtYXRpYy0xJTIyJTJDJTIwd2VpZ2h0X25hbWUlM0QlMjJweXRvcmNoX2xvcmFfd2VpZ2h0cy5zYWZldGVuc29ycyUyMiUyQyUyMGFkYXB0ZXJfbmFtZSUzRCUyMmNpbmVtYXRpYyUyMiUwQSklMEFwaXBlbGluZS5lbmFibGVfbG9yYSgp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image | |
| <span class="hljs-keyword">import</span> torch | |
| pipeline = AutoPipelineForText2Image.from_pretrained( | |
| <span class="hljs-string">"stabilityai/stable-diffusion-xl-base-1.0"</span>, torch_dtype=torch.float16 | |
| ).to(<span class="hljs-string">"cuda"</span>) | |
| pipeline.load_lora_weights( | |
| <span class="hljs-string">"jbilcke-hf/sdxl-cinematic-1"</span>, weight_name=<span class="hljs-string">"pytorch_lora_weights.safetensors"</span>, adapter_name=<span class="hljs-string">"cinematic"</span> | |
| ) | |
| pipeline.enable_lora()`,lang:"py",wrap:!1}),f(t,i)},$$slots:{default:!0}}),o(b);var L=e(b,2),$s=r(L);a($s,{name:"enable_lora_hotswap",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.enable_lora_hotswap",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_base.py#L987",parameters:[{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.enable_lora_hotswap.target_rank",description:`<strong>target_rank</strong> (<code>int</code>) — | |
| The highest rank among all the adapters that will be loaded.`,name:"target_rank"},{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.enable_lora_hotswap.check_compiled",description:`<strong>check_compiled</strong> (<code>str</code>, <em>optional</em>, defaults to <code>"error"</code>) — | |
| How to handle a model that is already compiled. The check can return the following messages: | |
| <ul> | |
| <li>“error” (default): raise an error</li> | |
| <li>“warn”: issue a warning</li> | |
| <li>“ignore”: do nothing</li> | |
| </ul>`,name:"check_compiled"}]}),s(2),o(L);var x=e(L,2),$r=r(x);a($r,{name:"fuse_lora",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_base.py#L536",parameters:[{name:"components",val:": list[str] | None = None"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.fuse_lora.components",description:"<strong>components</strong> — (<code>list[str]</code>): list of LoRA-injectable components to fuse the LoRAs into.",name:"components"},{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.fuse_lora.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>, defaults to 1.0) — | |
| Controls how much to influence the outputs with the LoRA parameters.`,name:"lora_scale"},{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.fuse_lora.safe_fusing",description:`<strong>safe_fusing</strong> (<code>bool</code>, defaults to <code>False</code>) — | |
| Whether to check fused weights for NaN values before fusing and if values are NaN not fusing them.`,name:"safe_fusing"},{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.fuse_lora.adapter_names",description:`<strong>adapter_names</strong> (<code>list[str]</code>, <em>optional</em>) — | |
| Adapter names to be used for fusing. If nothing is passed, all active adapters will be fused.`,name:"adapter_names"}]});var Os=e($r,4);p(Os,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.fuse_lora.example",children:(t,n)=>{var i=m(),l=e(_(i),2);c(l,{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMERpZmZ1c2lvblBpcGVsaW5lJTBBaW1wb3J0JTIwdG9yY2glMEElMEFwaXBlbGluZSUyMCUzRCUyMERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJzdGFiaWxpdHlhaSUyRnN0YWJsZS1kaWZmdXNpb24teGwtYmFzZS0xLjAlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMEEpLnRvKCUyMmN1ZGElMjIpJTBBcGlwZWxpbmUubG9hZF9sb3JhX3dlaWdodHMoJTIybmVyaWpzJTJGcGl4ZWwtYXJ0LXhsJTIyJTJDJTIwd2VpZ2h0X25hbWUlM0QlMjJwaXhlbC1hcnQteGwuc2FmZXRlbnNvcnMlMjIlMkMlMjBhZGFwdGVyX25hbWUlM0QlMjJwaXhlbCUyMiklMEFwaXBlbGluZS5mdXNlX2xvcmEobG9yYV9zY2FsZSUzRDAuNyk=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline | |
| <span class="hljs-keyword">import</span> torch | |
| pipeline = DiffusionPipeline.from_pretrained( | |
| <span class="hljs-string">"stabilityai/stable-diffusion-xl-base-1.0"</span>, torch_dtype=torch.float16 | |
| ).to(<span class="hljs-string">"cuda"</span>) | |
| pipeline.load_lora_weights(<span class="hljs-string">"nerijs/pixel-art-xl"</span>, weight_name=<span class="hljs-string">"pixel-art-xl.safetensors"</span>, adapter_name=<span class="hljs-string">"pixel"</span>) | |
| pipeline.fuse_lora(lora_scale=<span class="hljs-number">0.7</span>)`,lang:"py",wrap:!1}),f(t,i)},$$slots:{default:!0}}),o(x);var y=e(x,2),Or=r(y);a(Or,{name:"get_active_adapters",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.get_active_adapters",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_base.py#L878",parameters:[]});var ei=e(Or,4);p(ei,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.get_active_adapters.example",children:(t,n)=>{var i=m(),l=e(_(i),2);c(l,{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMERpZmZ1c2lvblBpcGVsaW5lJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTBBKS50byglMjJjdWRhJTIyKSUwQXBpcGVsaW5lLmxvYWRfbG9yYV93ZWlnaHRzKCUyMkNpcm9OMjAyMiUyRnRveS1mYWNlJTIyJTJDJTIwd2VpZ2h0X25hbWUlM0QlMjJ0b3lfZmFjZV9zZHhsLnNhZmV0ZW5zb3JzJTIyJTJDJTIwYWRhcHRlcl9uYW1lJTNEJTIydG95JTIyKSUwQXBpcGVsaW5lLmdldF9hY3RpdmVfYWRhcHRlcnMoKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline | |
| pipeline = DiffusionPipeline.from_pretrained( | |
| <span class="hljs-string">"stabilityai/stable-diffusion-xl-base-1.0"</span>, | |
| ).to(<span class="hljs-string">"cuda"</span>) | |
| pipeline.load_lora_weights(<span class="hljs-string">"CiroN2022/toy-face"</span>, weight_name=<span class="hljs-string">"toy_face_sdxl.safetensors"</span>, adapter_name=<span class="hljs-string">"toy"</span>) | |
| pipeline.get_active_adapters()`,lang:"python",wrap:!1}),f(t,i)},$$slots:{default:!0}}),o(y);var w=e(y,2),ai=r(w);a(ai,{name:"get_list_adapters",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.get_list_adapters",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_base.py#L911",parameters:[]}),s(2),o(w);var M=e(w,2),eo=r(M);a(eo,{name:"set_adapters",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.set_adapters",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_base.py#L677",parameters:[{name:"adapter_names",val:": list[str] | str"},{name:"adapter_weights",val:": float | dict | list[float] | list[dict] | None = None"}],parametersDescription:[{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.set_adapters.adapter_names",description:`<strong>adapter_names</strong> (<code>list[str]</code> or <code>str</code>) — | |
| The names of the adapters to use.`,name:"adapter_names"},{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.set_adapters.adapter_weights",description:`<strong>adapter_weights</strong> (<code>list[float, float]</code>, <em>optional</em>) — | |
| The adapter(s) weights to use with the UNet. If <code>None</code>, the weights are set to <code>1.0</code> for all the | |
| adapters.`,name:"adapter_weights"}]});var ri=e(eo,4);p(ri,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.set_adapters.example",children:(t,n)=>{var i=m(),l=e(_(i),2);c(l,{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQXBpcGVsaW5lLmxvYWRfbG9yYV93ZWlnaHRzKCUwQSUyMCUyMCUyMCUyMCUyMmpiaWxja2UtaGYlMkZzZHhsLWNpbmVtYXRpYy0xJTIyJTJDJTIwd2VpZ2h0X25hbWUlM0QlMjJweXRvcmNoX2xvcmFfd2VpZ2h0cy5zYWZldGVuc29ycyUyMiUyQyUyMGFkYXB0ZXJfbmFtZSUzRCUyMmNpbmVtYXRpYyUyMiUwQSklMEFwaXBlbGluZS5sb2FkX2xvcmFfd2VpZ2h0cyglMjJuZXJpanMlMkZwaXhlbC1hcnQteGwlMjIlMkMlMjB3ZWlnaHRfbmFtZSUzRCUyMnBpeGVsLWFydC14bC5zYWZldGVuc29ycyUyMiUyQyUyMGFkYXB0ZXJfbmFtZSUzRCUyMnBpeGVsJTIyKSUwQXBpcGVsaW5lLnNldF9hZGFwdGVycyglNUIlMjJjaW5lbWF0aWMlMjIlMkMlMjAlMjJwaXhlbCUyMiU1RCUyQyUyMGFkYXB0ZXJfd2VpZ2h0cyUzRCU1QjAuNSUyQyUyMDAuNSU1RCk=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image | |
| <span class="hljs-keyword">import</span> torch | |
| pipeline = AutoPipelineForText2Image.from_pretrained( | |
| <span class="hljs-string">"stabilityai/stable-diffusion-xl-base-1.0"</span>, torch_dtype=torch.float16 | |
| ).to(<span class="hljs-string">"cuda"</span>) | |
| pipeline.load_lora_weights( | |
| <span class="hljs-string">"jbilcke-hf/sdxl-cinematic-1"</span>, weight_name=<span class="hljs-string">"pytorch_lora_weights.safetensors"</span>, adapter_name=<span class="hljs-string">"cinematic"</span> | |
| ) | |
| pipeline.load_lora_weights(<span class="hljs-string">"nerijs/pixel-art-xl"</span>, weight_name=<span class="hljs-string">"pixel-art-xl.safetensors"</span>, adapter_name=<span class="hljs-string">"pixel"</span>) | |
| pipeline.set_adapters([<span class="hljs-string">"cinematic"</span>, <span class="hljs-string">"pixel"</span>], adapter_weights=[<span class="hljs-number">0.5</span>, <span class="hljs-number">0.5</span>])`,lang:"py",wrap:!1}),f(t,i)},$$slots:{default:!0}}),o(M);var S=e(M,2),ao=r(S);a(ao,{name:"set_lora_device",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.set_lora_device",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_base.py#L933",parameters:[{name:"adapter_names",val:": list[str]"},{name:"device",val:": torch.device | str | int"}],parametersDescription:[{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.set_lora_device.adapter_names",description:`<strong>adapter_names</strong> (<code>list[str]</code>) — | |
| list of adapters to send device to.`,name:"adapter_names"},{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.set_lora_device.device",description:`<strong>device</strong> (<code>torch.device | str | int</code>) — | |
| Device to send the adapters to. Can be either a torch device, a str or an integer.`,name:"device"}]});var oi=e(ao,6);p(oi,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.set_lora_device.example",children:(t,n)=>{c(t,{code:"cGlwZS5sb2FkX2xvcmFfd2VpZ2h0cyhwYXRoXzElMkMlMjBhZGFwdGVyX25hbWUlM0QlMjJhZGFwdGVyLTElMjIpJTBBcGlwZS5sb2FkX2xvcmFfd2VpZ2h0cyhwYXRoXzIlMkMlMjBhZGFwdGVyX25hbWUlM0QlMjJhZGFwdGVyLTIlMjIpJTBBcGlwZS5zZXRfYWRhcHRlcnMoJTIyYWRhcHRlci0xJTIyKSUwQWltYWdlXzElMjAlM0QlMjBwaXBlKCoqa3dhcmdzKSUwQSUyMyUyMHN3aXRjaCUyMHRvJTIwYWRhcHRlci0yJTJDJTIwb2ZmbG9hZCUyMGFkYXB0ZXItMSUwQXBpcGVsaW5lLnNldF9sb3JhX2RldmljZShhZGFwdGVyX25hbWVzJTNEJTVCJTIyYWRhcHRlci0xJTIyJTVEJTJDJTIwZGV2aWNlJTNEJTIyY3B1JTIyKSUwQXBpcGVsaW5lLnNldF9sb3JhX2RldmljZShhZGFwdGVyX25hbWVzJTNEJTVCJTIyYWRhcHRlci0yJTIyJTVEJTJDJTIwZGV2aWNlJTNEJTIyY3VkYSUzQTAlMjIpJTBBcGlwZS5zZXRfYWRhcHRlcnMoJTIyYWRhcHRlci0yJTIyKSUwQWltYWdlXzIlMjAlM0QlMjBwaXBlKCoqa3dhcmdzKSUwQSUyMyUyMHN3aXRjaCUyMGJhY2slMjB0byUyMGFkYXB0ZXItMSUyQyUyMG9mZmxvYWQlMjBhZGFwdGVyLTIlMEFwaXBlbGluZS5zZXRfbG9yYV9kZXZpY2UoYWRhcHRlcl9uYW1lcyUzRCU1QiUyMmFkYXB0ZXItMiUyMiU1RCUyQyUyMGRldmljZSUzRCUyMmNwdSUyMiklMEFwaXBlbGluZS5zZXRfbG9yYV9kZXZpY2UoYWRhcHRlcl9uYW1lcyUzRCU1QiUyMmFkYXB0ZXItMSUyMiU1RCUyQyUyMGRldmljZSUzRCUyMmN1ZGElM0EwJTIyKSUwQXBpcGUuc2V0X2FkYXB0ZXJzKCUyMmFkYXB0ZXItMSUyMiklMEEuLi4=",highlighted:`<span class="hljs-meta">>>> </span>pipe.load_lora_weights(path_1, adapter_name=<span class="hljs-string">"adapter-1"</span>) | |
| <span class="hljs-meta">>>> </span>pipe.load_lora_weights(path_2, adapter_name=<span class="hljs-string">"adapter-2"</span>) | |
| <span class="hljs-meta">>>> </span>pipe.set_adapters(<span class="hljs-string">"adapter-1"</span>) | |
| <span class="hljs-meta">>>> </span>image_1 = pipe(**kwargs) | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># switch to adapter-2, offload adapter-1</span> | |
| <span class="hljs-meta">>>> </span>pipeline.set_lora_device(adapter_names=[<span class="hljs-string">"adapter-1"</span>], device=<span class="hljs-string">"cpu"</span>) | |
| <span class="hljs-meta">>>> </span>pipeline.set_lora_device(adapter_names=[<span class="hljs-string">"adapter-2"</span>], device=<span class="hljs-string">"cuda:0"</span>) | |
| <span class="hljs-meta">>>> </span>pipe.set_adapters(<span class="hljs-string">"adapter-2"</span>) | |
| <span class="hljs-meta">>>> </span>image_2 = pipe(**kwargs) | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># switch back to adapter-1, offload adapter-2</span> | |
| <span class="hljs-meta">>>> </span>pipeline.set_lora_device(adapter_names=[<span class="hljs-string">"adapter-2"</span>], device=<span class="hljs-string">"cpu"</span>) | |
| <span class="hljs-meta">>>> </span>pipeline.set_lora_device(adapter_names=[<span class="hljs-string">"adapter-1"</span>], device=<span class="hljs-string">"cuda:0"</span>) | |
| <span class="hljs-meta">>>> </span>pipe.set_adapters(<span class="hljs-string">"adapter-1"</span>) | |
| <span class="hljs-meta">>>> </span>...`,lang:"python",wrap:!1})},$$slots:{default:!0}}),o(S);var T=e(S,2),si=r(T);a(si,{name:"unfuse_lora",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_base.py#L623",parameters:[{name:"components",val:": list[str] | None = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.unfuse_lora.components",description:"<strong>components</strong> (<code>list[str]</code>) — list of LoRA-injectable components to unfuse LoRA from.",name:"components"},{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.unfuse_lora.unfuse_unet",description:"<strong>unfuse_unet</strong> (<code>bool</code>, defaults to <code>True</code>) — Whether to unfuse the UNet LoRA parameters.",name:"unfuse_unet"},{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.unfuse_lora.unfuse_text_encoder",description:`<strong>unfuse_text_encoder</strong> (<code>bool</code>, defaults to <code>True</code>) — | |
| Whether to unfuse the text encoder LoRA parameters. If the text encoder wasn’t monkey-patched with the | |
| LoRA parameters then it won’t have any effect.`,name:"unfuse_text_encoder"}]}),s(2),o(T);var N=e(T,2),ro=r(N);a(ro,{name:"unload_lora_weights",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.unload_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_base.py#L513",parameters:[]});var ii=e(ro,4);p(ii,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.unload_lora_weights.example",children:(t,n)=>{var i=Cr(),l=e(_(i),2);c(l,{code:"JTIzJTIwQXNzdW1pbmclMjAlNjBwaXBlbGluZSU2MCUyMGlzJTIwYWxyZWFkeSUyMGxvYWRlZCUyMHdpdGglMjB0aGUlMjBMb1JBJTIwcGFyYW1ldGVycy4lMEFwaXBlbGluZS51bmxvYWRfbG9yYV93ZWlnaHRzKCklMEEuLi4=",highlighted:'<span class="hljs-meta">>>> </span><span class="hljs-comment"># Assuming `pipeline` is already loaded with the LoRA parameters.</span>\n<span class="hljs-meta">>>> </span>pipeline.unload_lora_weights()\n<span class="hljs-meta">>>> </span>...',lang:"python",wrap:!1}),f(t,i)},$$slots:{default:!0}}),o(N);var oo=e(N,2),ti=r(oo);a(ti,{name:"write_lora_layers",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.write_lora_layers",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_base.py#L1010",parameters:[{name:"state_dict",val:": dict[str, torch.Tensor]"},{name:"save_directory",val:": str"},{name:"is_main_process",val:": bool"},{name:"weight_name",val:": str"},{name:"save_function",val:": Callable"},{name:"safe_serialization",val:": bool"},{name:"lora_adapter_metadata",val:": dict | None = None"}]}),s(2),o(oo),o(h);var so=e(h,2);d(so,{title:"StableDiffusionLoraLoaderMixin",local:"diffusers.loaders.StableDiffusionLoraLoaderMixin",headingTag:"h2"});var k=e(so,2),io=r(k);a(io,{name:"class diffusers.loaders.StableDiffusionLoraLoaderMixin",anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L137",parameters:[]});var R=e(io,4),di=r(R);a(di,{name:"load_lora_into_text_encoder",anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_text_encoder",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L420",parameters:[{name:"state_dict",val:""},{name:"network_alphas",val:""},{name:"text_encoder",val:""},{name:"prefix",val:" = None"},{name:"lora_scale",val:" = 1.0"},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"}],parametersDescription:[{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_text_encoder.state_dict",description:`<strong>state_dict</strong> (<code>dict</code>) — | |
| A standard state dict containing the lora layer parameters. The key should be prefixed with an | |
| additional <code>text_encoder</code> to distinguish between unet lora layers.`,name:"state_dict"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_text_encoder.network_alphas",description:`<strong>network_alphas</strong> (<code>dict[str, float]</code>) — | |
| The value of the network alpha used for stable learning and preventing underflow. This value has the | |
| same meaning as the <code>--network_alpha</code> option in the kohya-ss trainer script. Refer to <a href="https://github.com/darkstorm2150/sd-scripts/blob/main/docs/train_network_README-en.md#execute-learning" rel="nofollow">this | |
| link</a>.`,name:"network_alphas"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_text_encoder.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) — | |
| The text encoder model to load the LoRA layers into.`,name:"text_encoder"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_text_encoder.prefix",description:`<strong>prefix</strong> (<code>str</code>) — | |
| Expected prefix of the <code>text_encoder</code> in the <code>state_dict</code>.`,name:"prefix"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_text_encoder.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>) — | |
| How much to scale the output of the lora linear layer before it is added with the output of the regular | |
| lora layer.`,name:"lora_scale"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_text_encoder.adapter_name",description:`<strong>adapter_name</strong> (<code>str</code>, <em>optional</em>) — | |
| Adapter name to be used for referencing the loaded adapter model. If not specified, it will use | |
| <code>default_{i}</code> where i is the total number of adapters being loaded.`,name:"adapter_name"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_text_encoder.low_cpu_mem_usage",description:`<strong>low_cpu_mem_usage</strong> (<code>bool</code>, <em>optional</em>) — | |
| Speed up model loading by only loading the pretrained LoRA weights and not initializing the random | |
| weights.`,name:"low_cpu_mem_usage"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_text_encoder.hotswap",description:`<strong>hotswap</strong> (<code>bool</code>, <em>optional</em>) — | |
| See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a>.`,name:"hotswap"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_text_encoder.metadata",description:`<strong>metadata</strong> (<code>dict</code>) — | |
| Optional LoRA adapter metadata. When supplied, the <code>LoraConfig</code> arguments of <code>peft</code> won’t be derived | |
| from the state dict.`,name:"metadata"}]}),s(2),o(R);var U=e(R,2),li=r(U);a(li,{name:"load_lora_into_unet",anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L359",parameters:[{name:"state_dict",val:""},{name:"network_alphas",val:""},{name:"unet",val:""},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"}],parametersDescription:[{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet.state_dict",description:`<strong>state_dict</strong> (<code>dict</code>) — | |
| A standard state dict containing the lora layer parameters. The keys can either be indexed directly | |
| into the unet or prefixed with an additional <code>unet</code> which can be used to distinguish between text | |
| encoder lora layers.`,name:"state_dict"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet.network_alphas",description:`<strong>network_alphas</strong> (<code>dict[str, float]</code>) — | |
| The value of the network alpha used for stable learning and preventing underflow. This value has the | |
| same meaning as the <code>--network_alpha</code> option in the kohya-ss trainer script. Refer to <a href="https://github.com/darkstorm2150/sd-scripts/blob/main/docs/train_network_README-en.md#execute-learning" rel="nofollow">this | |
| link</a>.`,name:"network_alphas"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet.unet",description:`<strong>unet</strong> (<code>UNet2DConditionModel</code>) — | |
| The UNet model to load the LoRA layers into.`,name:"unet"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet.adapter_name",description:`<strong>adapter_name</strong> (<code>str</code>, <em>optional</em>) — | |
| Adapter name to be used for referencing the loaded adapter model. If not specified, it will use | |
| <code>default_{i}</code> where i is the total number of adapters being loaded.`,name:"adapter_name"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet.low_cpu_mem_usage",description:`<strong>low_cpu_mem_usage</strong> (<code>bool</code>, <em>optional</em>) — | |
| Speed up model loading only loading the pretrained LoRA weights and not initializing the random | |
| weights.`,name:"low_cpu_mem_usage"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet.hotswap",description:`<strong>hotswap</strong> (<code>bool</code>, <em>optional</em>) — | |
| See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a>.`,name:"hotswap"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet.metadata",description:`<strong>metadata</strong> (<code>dict</code>) — | |
| Optional LoRA adapter metadata. When supplied, the <code>LoraConfig</code> arguments of <code>peft</code> won’t be derived | |
| from the state dict.`,name:"metadata"}]}),s(2),o(U);var J=e(U,2),ni=r(J);a(ni,{name:"load_lora_weights",anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L147",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"adapter_name",val:": str | None = None"},{name:"hotswap",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights.pretrained_model_name_or_path_or_dict",description:`<strong>pretrained_model_name_or_path_or_dict</strong> (<code>str</code> or <code>os.PathLike</code> or <code>dict</code>) — | |
| See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict">lora_state_dict()</a>.`,name:"pretrained_model_name_or_path_or_dict"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights.adapter_name",description:`<strong>adapter_name</strong> (<code>str</code>, <em>optional</em>) — | |
| Adapter name to be used for referencing the loaded adapter model. If not specified, it will use | |
| <code>default_{i}</code> where i is the total number of adapters being loaded.`,name:"adapter_name"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights.low_cpu_mem_usage",description:`<strong>low_cpu_mem_usage</strong> (<code>bool</code>, <em>optional</em>) — | |
| Speed up model loading by only loading the pretrained LoRA weights and not initializing the random | |
| weights.`,name:"low_cpu_mem_usage"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights.hotswap",description:`<strong>hotswap</strong> (<code>bool</code>, <em>optional</em>) — | |
| Defaults to <code>False</code>. Whether to substitute an existing (LoRA) adapter with the newly loaded adapter | |
| in-place. This means that, instead of loading an additional adapter, this will take the existing | |
| adapter weights and replace them with the weights of the new adapter. This can be faster and more | |
| memory efficient. However, the main advantage of hotswapping is that when the model is compiled with | |
| torch.compile, loading the new adapter does not require recompilation of the model. When using | |
| hotswapping, the passed <code>adapter_name</code> should be the name of an already loaded adapter.</p> | |
| <p>If the new adapter and the old adapter have different ranks and/or LoRA alphas (i.e. scaling), you need | |
| to call an additional method before loading the adapter:`,name:"hotswap"}]}),s(10),o(J);var D=e(J,2),ci=r(D);a(ci,{name:"lora_state_dict",anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L248",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict.pretrained_model_name_or_path_or_dict",description:`<strong>pretrained_model_name_or_path_or_dict</strong> (<code>str</code> or <code>os.PathLike</code> or <code>dict</code>) — | |
| Can be either:</p> | |
| <ul> | |
| <li>A string, the <em>model id</em> (for example <code>google/ddpm-celebahq-256</code>) of a pretrained model hosted on | |
| the Hub.</li> | |
| <li>A path to a <em>directory</em> (for example <code>./my_model_directory</code>) containing the model weights saved | |
| with <a href="/docs/diffusers/pr_14358/en/api/models/overview#diffusers.ModelMixin.save_pretrained">ModelMixin.save_pretrained()</a>.</li> | |
| <li>A <a href="https://pytorch.org/tutorials/beginner/saving_loading_models.html#what-is-a-state-dict" rel="nofollow">torch state | |
| dict</a>.</li> | |
| </ul>`,name:"pretrained_model_name_or_path_or_dict"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict.cache_dir",description:`<strong>cache_dir</strong> (<code>str | os.PathLike</code>, <em>optional</em>) — | |
| Path to a directory where a downloaded pretrained model configuration is cached if the standard cache | |
| is not used.`,name:"cache_dir"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — | |
| Whether or not to force the (re-)download of the model weights and configuration files, overriding the | |
| cached versions if they exist.`,name:"force_download"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict.proxies",description:`<strong>proxies</strong> (<code>dict[str, str]</code>, <em>optional</em>) — | |
| A dictionary of proxy servers to use by protocol or endpoint, for example, <code>{'http': 'foo.bar:3128', 'http://hostname': 'foo.bar:4012'}</code>. The proxies are used on each request.`,name:"proxies"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict.local_files_only",description:`<strong>local_files_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — | |
| Whether to only load local model weights and configuration files or not. If set to <code>True</code>, the model | |
| won’t be downloaded from the Hub.`,name:"local_files_only"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict.token",description:`<strong>token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) — | |
| The token to use as HTTP bearer authorization for remote files. If <code>True</code>, the token generated from | |
| <code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>) is used.`,name:"token"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>"main"</code>) — | |
| The specific model version to use. It can be a branch name, a tag name, a commit id, or any identifier | |
| allowed by Git.`,name:"revision"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict.subfolder",description:`<strong>subfolder</strong> (<code>str</code>, <em>optional</em>, defaults to <code>""</code>) — | |
| The subfolder location of a model file within a larger model repository on the Hub or locally.`,name:"subfolder"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict.weight_name",description:`<strong>weight_name</strong> (<code>str</code>, <em>optional</em>, defaults to None) — | |
| Name of the serialized state dict file.`,name:"weight_name"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict.return_lora_metadata",description:`<strong>return_lora_metadata</strong> (<code>bool</code>, <em>optional</em>, defaults to False) — | |
| When enabled, additionally return the LoRA adapter metadata, typically found in the state dict.`,name:"return_lora_metadata"}]}),s(4),o(D);var to=e(D,2),fi=r(to);a(fi,{name:"save_lora_weights",anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L478",parameters:[{name:"save_directory",val:": str | os.PathLike"},{name:"unet_lora_layers",val:": dict = None"},{name:"text_encoder_lora_layers",val:": dict = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"},{name:"unet_lora_adapter_metadata",val:" = None"},{name:"text_encoder_lora_adapter_metadata",val:" = None"}],parametersDescription:[{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) — | |
| Directory to save LoRA parameters to. Will be created if it doesn’t exist.`,name:"save_directory"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights.unet_lora_layers",description:`<strong>unet_lora_layers</strong> (<code>dict[str, torch.nn.Module]</code> or <code>dict[str, torch.Tensor]</code>) — | |
| State dict of the LoRA layers corresponding to the <code>unet</code>.`,name:"unet_lora_layers"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights.text_encoder_lora_layers",description:`<strong>text_encoder_lora_layers</strong> (<code>dict[str, torch.nn.Module]</code> or <code>dict[str, torch.Tensor]</code>) — | |
| State dict of the LoRA layers corresponding to the <code>text_encoder</code>. Must explicitly pass the text | |
| encoder LoRA state dict because it comes from 🤗 Transformers.`,name:"text_encoder_lora_layers"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights.is_main_process",description:`<strong>is_main_process</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether the process calling this is the main process or not. Useful during distributed training and you | |
| need to call this function on all processes. In this case, set <code>is_main_process=True</code> only on the main | |
| process to avoid race conditions.`,name:"is_main_process"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights.save_function",description:`<strong>save_function</strong> (<code>Callable</code>) — | |
| The function to use to save the state dictionary. Useful during distributed training when you need to | |
| replace <code>torch.save</code> with another method. Can be configured with the environment variable | |
| <code>DIFFUSERS_SAVE_MODE</code>.`,name:"save_function"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights.safe_serialization",description:`<strong>safe_serialization</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether to save the model using <code>safetensors</code> or the traditional PyTorch way with <code>pickle</code>.`,name:"safe_serialization"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights.unet_lora_adapter_metadata",description:`<strong>unet_lora_adapter_metadata</strong> — | |
| LoRA adapter metadata associated with the unet to be serialized with the state dict.`,name:"unet_lora_adapter_metadata"},{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights.text_encoder_lora_adapter_metadata",description:`<strong>text_encoder_lora_adapter_metadata</strong> — | |
| LoRA adapter metadata associated with the text encoder to be serialized with the state dict.`,name:"text_encoder_lora_adapter_metadata"}]}),s(2),o(to),o(k);var lo=e(k,2);d(lo,{title:"StableDiffusionXLLoraLoaderMixin",local:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin",headingTag:"h2"});var Z=e(lo,2),no=r(Z);a(no,{name:"class diffusers.loaders.StableDiffusionXLLoraLoaderMixin",anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L597",parameters:[]});var F=e(no,4),pi=r(F);a(pi,{name:"fuse_lora",anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L963",parameters:[{name:"components",val:": list = ['unet', 'text_encoder', 'text_encoder_2']"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}]}),s(2),o(F);var X=e(F,2),_i=r(X);a(_i,{name:"load_lora_into_text_encoder",anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_into_text_encoder",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L856",parameters:[{name:"state_dict",val:""},{name:"network_alphas",val:""},{name:"text_encoder",val:""},{name:"prefix",val:" = None"},{name:"lora_scale",val:" = 1.0"},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"}],parametersDescription:[{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_into_text_encoder.state_dict",description:`<strong>state_dict</strong> (<code>dict</code>) — | |
| A standard state dict containing the lora layer parameters. The key should be prefixed with an | |
| additional <code>text_encoder</code> to distinguish between unet lora layers.`,name:"state_dict"},{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_into_text_encoder.network_alphas",description:`<strong>network_alphas</strong> (<code>dict[str, float]</code>) — | |
| The value of the network alpha used for stable learning and preventing underflow. This value has the | |
| same meaning as the <code>--network_alpha</code> option in the kohya-ss trainer script. Refer to <a href="https://github.com/darkstorm2150/sd-scripts/blob/main/docs/train_network_README-en.md#execute-learning" rel="nofollow">this | |
| link</a>.`,name:"network_alphas"},{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_into_text_encoder.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) — | |
| The text encoder model to load the LoRA layers into.`,name:"text_encoder"},{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_into_text_encoder.prefix",description:`<strong>prefix</strong> (<code>str</code>) — | |
| Expected prefix of the <code>text_encoder</code> in the <code>state_dict</code>.`,name:"prefix"},{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_into_text_encoder.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>) — | |
| How much to scale the output of the lora linear layer before it is added with the output of the regular | |
| lora layer.`,name:"lora_scale"},{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_into_text_encoder.adapter_name",description:`<strong>adapter_name</strong> (<code>str</code>, <em>optional</em>) — | |
| Adapter name to be used for referencing the loaded adapter model. If not specified, it will use | |
| <code>default_{i}</code> where i is the total number of adapters being loaded.`,name:"adapter_name"},{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_into_text_encoder.low_cpu_mem_usage",description:`<strong>low_cpu_mem_usage</strong> (<code>bool</code>, <em>optional</em>) — | |
| Speed up model loading by only loading the pretrained LoRA weights and not initializing the random | |
| weights.`,name:"low_cpu_mem_usage"},{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_into_text_encoder.hotswap",description:`<strong>hotswap</strong> (<code>bool</code>, <em>optional</em>) — | |
| See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a>.`,name:"hotswap"},{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_into_text_encoder.metadata",description:`<strong>metadata</strong> (<code>dict</code>) — | |
| Optional LoRA adapter metadata. When supplied, the <code>LoraConfig</code> arguments of <code>peft</code> won’t be derived | |
| from the state dict.`,name:"metadata"}]}),s(2),o(X);var j=e(X,2),mi=r(j);a(mi,{name:"load_lora_into_unet",anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_into_unet",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L794",parameters:[{name:"state_dict",val:""},{name:"network_alphas",val:""},{name:"unet",val:""},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"}],parametersDescription:[{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_into_unet.state_dict",description:`<strong>state_dict</strong> (<code>dict</code>) — | |
| A standard state dict containing the lora layer parameters. The keys can either be indexed directly | |
| into the unet or prefixed with an additional <code>unet</code> which can be used to distinguish between text | |
| encoder lora layers.`,name:"state_dict"},{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_into_unet.network_alphas",description:`<strong>network_alphas</strong> (<code>dict[str, float]</code>) — | |
| The value of the network alpha used for stable learning and preventing underflow. This value has the | |
| same meaning as the <code>--network_alpha</code> option in the kohya-ss trainer script. Refer to <a href="https://github.com/darkstorm2150/sd-scripts/blob/main/docs/train_network_README-en.md#execute-learning" rel="nofollow">this | |
| link</a>.`,name:"network_alphas"},{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_into_unet.unet",description:`<strong>unet</strong> (<code>UNet2DConditionModel</code>) — | |
| The UNet model to load the LoRA layers into.`,name:"unet"},{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_into_unet.adapter_name",description:`<strong>adapter_name</strong> (<code>str</code>, <em>optional</em>) — | |
| Adapter name to be used for referencing the loaded adapter model. If not specified, it will use | |
| <code>default_{i}</code> where i is the total number of adapters being loaded.`,name:"adapter_name"},{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_into_unet.low_cpu_mem_usage",description:`<strong>low_cpu_mem_usage</strong> (<code>bool</code>, <em>optional</em>) — | |
| Speed up model loading only loading the pretrained LoRA weights and not initializing the random | |
| weights.`,name:"low_cpu_mem_usage"},{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_into_unet.hotswap",description:`<strong>hotswap</strong> (<code>bool</code>, <em>optional</em>) — | |
| See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a>.`,name:"hotswap"},{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_into_unet.metadata",description:`<strong>metadata</strong> (<code>dict</code>) — | |
| Optional LoRA adapter metadata. When supplied, the <code>LoraConfig</code> arguments of <code>peft</code> won’t be derived | |
| from the state dict.`,name:"metadata"}]}),s(2),o(j);var I=e(j,2),ui=r(I);a(ui,{name:"load_lora_weights",anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L608",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"adapter_name",val:": str | None = None"},{name:"hotswap",val:": bool = False"},{name:"**kwargs",val:""}]}),s(2),o(I);var G=e(I,2),hi=r(G);a(hi,{name:"lora_state_dict",anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L682",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.lora_state_dict.pretrained_model_name_or_path_or_dict",description:`<strong>pretrained_model_name_or_path_or_dict</strong> (<code>str</code> or <code>os.PathLike</code> or <code>dict</code>) — | |
| Can be either:</p> | |
| <ul> | |
| <li>A string, the <em>model id</em> (for example <code>google/ddpm-celebahq-256</code>) of a pretrained model hosted on | |
| the Hub.</li> | |
| <li>A path to a <em>directory</em> (for example <code>./my_model_directory</code>) containing the model weights saved | |
| with <a href="/docs/diffusers/pr_14358/en/api/models/overview#diffusers.ModelMixin.save_pretrained">ModelMixin.save_pretrained()</a>.</li> | |
| <li>A <a href="https://pytorch.org/tutorials/beginner/saving_loading_models.html#what-is-a-state-dict" rel="nofollow">torch state | |
| dict</a>.</li> | |
| </ul>`,name:"pretrained_model_name_or_path_or_dict"},{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.lora_state_dict.cache_dir",description:`<strong>cache_dir</strong> (<code>str | os.PathLike</code>, <em>optional</em>) — | |
| Path to a directory where a downloaded pretrained model configuration is cached if the standard cache | |
| is not used.`,name:"cache_dir"},{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.lora_state_dict.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — | |
| Whether or not to force the (re-)download of the model weights and configuration files, overriding the | |
| cached versions if they exist.`,name:"force_download"},{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.lora_state_dict.proxies",description:`<strong>proxies</strong> (<code>dict[str, str]</code>, <em>optional</em>) — | |
| A dictionary of proxy servers to use by protocol or endpoint, for example, <code>{'http': 'foo.bar:3128', 'http://hostname': 'foo.bar:4012'}</code>. The proxies are used on each request.`,name:"proxies"},{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.lora_state_dict.local_files_only",description:`<strong>local_files_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — | |
| Whether to only load local model weights and configuration files or not. If set to <code>True</code>, the model | |
| won’t be downloaded from the Hub.`,name:"local_files_only"},{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.lora_state_dict.token",description:`<strong>token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) — | |
| The token to use as HTTP bearer authorization for remote files. If <code>True</code>, the token generated from | |
| <code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>) is used.`,name:"token"},{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.lora_state_dict.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>"main"</code>) — | |
| The specific model version to use. It can be a branch name, a tag name, a commit id, or any identifier | |
| allowed by Git.`,name:"revision"},{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.lora_state_dict.subfolder",description:`<strong>subfolder</strong> (<code>str</code>, <em>optional</em>, defaults to <code>""</code>) — | |
| The subfolder location of a model file within a larger model repository on the Hub or locally.`,name:"subfolder"},{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.lora_state_dict.weight_name",description:`<strong>weight_name</strong> (<code>str</code>, <em>optional</em>, defaults to None) — | |
| Name of the serialized state dict file.`,name:"weight_name"},{anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.lora_state_dict.return_lora_metadata",description:`<strong>return_lora_metadata</strong> (<code>bool</code>, <em>optional</em>, defaults to False) — | |
| When enabled, additionally return the LoRA adapter metadata, typically found in the state dict.`,name:"return_lora_metadata"}]}),s(4),o(G);var W=e(G,2),gi=r(W);a(gi,{name:"save_lora_weights",anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L915",parameters:[{name:"save_directory",val:": str | os.PathLike"},{name:"unet_lora_layers",val:": dict = None"},{name:"text_encoder_lora_layers",val:": dict = None"},{name:"text_encoder_2_lora_layers",val:": dict = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"},{name:"unet_lora_adapter_metadata",val:" = None"},{name:"text_encoder_lora_adapter_metadata",val:" = None"},{name:"text_encoder_2_lora_adapter_metadata",val:" = None"}]}),s(2),o(W);var co=e(W,2),vi=r(co);a(vi,{name:"unfuse_lora",anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L982",parameters:[{name:"components",val:": list = ['unet', 'text_encoder', 'text_encoder_2']"},{name:"**kwargs",val:""}]}),s(2),o(co),o(Z);var fo=e(Z,2);d(fo,{title:"SD3LoraLoaderMixin",local:"diffusers.loaders.SD3LoraLoaderMixin",headingTag:"h2"});var B=e(fo,2),po=r(B);a(po,{name:"class diffusers.loaders.SD3LoraLoaderMixin",anchor:"diffusers.loaders.SD3LoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L989",parameters:[]});var V=e(po,6),bi=r(V);a(bi,{name:"fuse_lora",anchor:"diffusers.loaders.SD3LoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L1261",parameters:[{name:"components",val:": list = ['transformer', 'text_encoder', 'text_encoder_2']"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}]}),s(2),o(V);var A=e(V,2),Li=r(A);a(Li,{name:"load_lora_into_text_encoder",anchor:"diffusers.loaders.SD3LoraLoaderMixin.load_lora_into_text_encoder",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L1152",parameters:[{name:"state_dict",val:""},{name:"network_alphas",val:""},{name:"text_encoder",val:""},{name:"prefix",val:" = None"},{name:"lora_scale",val:" = 1.0"},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"}],parametersDescription:[{anchor:"diffusers.loaders.SD3LoraLoaderMixin.load_lora_into_text_encoder.state_dict",description:`<strong>state_dict</strong> (<code>dict</code>) — | |
| A standard state dict containing the lora layer parameters. The key should be prefixed with an | |
| additional <code>text_encoder</code> to distinguish between unet lora layers.`,name:"state_dict"},{anchor:"diffusers.loaders.SD3LoraLoaderMixin.load_lora_into_text_encoder.network_alphas",description:`<strong>network_alphas</strong> (<code>dict[str, float]</code>) — | |
| The value of the network alpha used for stable learning and preventing underflow. This value has the | |
| same meaning as the <code>--network_alpha</code> option in the kohya-ss trainer script. Refer to <a href="https://github.com/darkstorm2150/sd-scripts/blob/main/docs/train_network_README-en.md#execute-learning" rel="nofollow">this | |
| link</a>.`,name:"network_alphas"},{anchor:"diffusers.loaders.SD3LoraLoaderMixin.load_lora_into_text_encoder.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) — | |
| The text encoder model to load the LoRA layers into.`,name:"text_encoder"},{anchor:"diffusers.loaders.SD3LoraLoaderMixin.load_lora_into_text_encoder.prefix",description:`<strong>prefix</strong> (<code>str</code>) — | |
| Expected prefix of the <code>text_encoder</code> in the <code>state_dict</code>.`,name:"prefix"},{anchor:"diffusers.loaders.SD3LoraLoaderMixin.load_lora_into_text_encoder.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>) — | |
| How much to scale the output of the lora linear layer before it is added with the output of the regular | |
| lora layer.`,name:"lora_scale"},{anchor:"diffusers.loaders.SD3LoraLoaderMixin.load_lora_into_text_encoder.adapter_name",description:`<strong>adapter_name</strong> (<code>str</code>, <em>optional</em>) — | |
| Adapter name to be used for referencing the loaded adapter model. If not specified, it will use | |
| <code>default_{i}</code> where i is the total number of adapters being loaded.`,name:"adapter_name"},{anchor:"diffusers.loaders.SD3LoraLoaderMixin.load_lora_into_text_encoder.low_cpu_mem_usage",description:`<strong>low_cpu_mem_usage</strong> (<code>bool</code>, <em>optional</em>) — | |
| Speed up model loading by only loading the pretrained LoRA weights and not initializing the random | |
| weights.`,name:"low_cpu_mem_usage"},{anchor:"diffusers.loaders.SD3LoraLoaderMixin.load_lora_into_text_encoder.hotswap",description:`<strong>hotswap</strong> (<code>bool</code>, <em>optional</em>) — | |
| See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a>.`,name:"hotswap"},{anchor:"diffusers.loaders.SD3LoraLoaderMixin.load_lora_into_text_encoder.metadata",description:`<strong>metadata</strong> (<code>dict</code>) — | |
| Optional LoRA adapter metadata. When supplied, the <code>LoraConfig</code> arguments of <code>peft</code> won’t be derived | |
| from the state dict.`,name:"metadata"}]}),s(2),o(A);var C=e(A,2),xi=r(C);a(xi,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.SD3LoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L1121",parameters:[{name:"state_dict",val:""},{name:"transformer",val:""},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"}]}),s(2),o(C);var q=e(C,2),yi=r(q);a(yi,{name:"load_lora_weights",anchor:"diffusers.loaders.SD3LoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L1056",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"adapter_name",val:" = None"},{name:"hotswap",val:": bool = False"},{name:"**kwargs",val:""}]}),s(2),o(q);var Y=e(q,2),wi=r(Y);a(wi,{name:"lora_state_dict",anchor:"diffusers.loaders.SD3LoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L1002",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(Y);var z=e(Y,2),Mi=r(z);a(Mi,{name:"save_lora_weights",anchor:"diffusers.loaders.SD3LoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L1211",parameters:[{name:"save_directory",val:": str | os.PathLike"},{name:"transformer_lora_layers",val:": dict = None"},{name:"text_encoder_lora_layers",val:": dict = None"},{name:"text_encoder_2_lora_layers",val:": dict = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"},{name:"transformer_lora_adapter_metadata",val:" = None"},{name:"text_encoder_lora_adapter_metadata",val:" = None"},{name:"text_encoder_2_lora_adapter_metadata",val:" = None"}]}),s(2),o(z);var _o=e(z,2),Si=r(_o);a(Si,{name:"unfuse_lora",anchor:"diffusers.loaders.SD3LoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L1281",parameters:[{name:"components",val:": list = ['transformer', 'text_encoder', 'text_encoder_2']"},{name:"**kwargs",val:""}]}),s(2),o(_o),o(B);var mo=e(B,2);d(mo,{title:"FluxLoraLoaderMixin",local:"diffusers.loaders.FluxLoraLoaderMixin",headingTag:"h2"});var Q=e(mo,2),uo=r(Q);a(uo,{name:"class diffusers.loaders.FluxLoraLoaderMixin",anchor:"diffusers.loaders.FluxLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L1488",parameters:[]});var P=e(uo,6),Ti=r(P);a(Ti,{name:"fuse_lora",anchor:"diffusers.loaders.FluxLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L1937",parameters:[{name:"components",val:": list = ['transformer']"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}]}),s(2),o(P);var E=e(P,2),Ni=r(E);a(Ni,{name:"load_lora_into_text_encoder",anchor:"diffusers.loaders.FluxLoraLoaderMixin.load_lora_into_text_encoder",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L1814",parameters:[{name:"state_dict",val:""},{name:"network_alphas",val:""},{name:"text_encoder",val:""},{name:"prefix",val:" = None"},{name:"lora_scale",val:" = 1.0"},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"}],parametersDescription:[{anchor:"diffusers.loaders.FluxLoraLoaderMixin.load_lora_into_text_encoder.state_dict",description:`<strong>state_dict</strong> (<code>dict</code>) — | |
| A standard state dict containing the lora layer parameters. The key should be prefixed with an | |
| additional <code>text_encoder</code> to distinguish between unet lora layers.`,name:"state_dict"},{anchor:"diffusers.loaders.FluxLoraLoaderMixin.load_lora_into_text_encoder.network_alphas",description:`<strong>network_alphas</strong> (<code>dict[str, float]</code>) — | |
| The value of the network alpha used for stable learning and preventing underflow. This value has the | |
| same meaning as the <code>--network_alpha</code> option in the kohya-ss trainer script. Refer to <a href="https://github.com/darkstorm2150/sd-scripts/blob/main/docs/train_network_README-en.md#execute-learning" rel="nofollow">this | |
| link</a>.`,name:"network_alphas"},{anchor:"diffusers.loaders.FluxLoraLoaderMixin.load_lora_into_text_encoder.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) — | |
| The text encoder model to load the LoRA layers into.`,name:"text_encoder"},{anchor:"diffusers.loaders.FluxLoraLoaderMixin.load_lora_into_text_encoder.prefix",description:`<strong>prefix</strong> (<code>str</code>) — | |
| Expected prefix of the <code>text_encoder</code> in the <code>state_dict</code>.`,name:"prefix"},{anchor:"diffusers.loaders.FluxLoraLoaderMixin.load_lora_into_text_encoder.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>) — | |
| How much to scale the output of the lora linear layer before it is added with the output of the regular | |
| lora layer.`,name:"lora_scale"},{anchor:"diffusers.loaders.FluxLoraLoaderMixin.load_lora_into_text_encoder.adapter_name",description:`<strong>adapter_name</strong> (<code>str</code>, <em>optional</em>) — | |
| Adapter name to be used for referencing the loaded adapter model. If not specified, it will use | |
| <code>default_{i}</code> where i is the total number of adapters being loaded.`,name:"adapter_name"},{anchor:"diffusers.loaders.FluxLoraLoaderMixin.load_lora_into_text_encoder.low_cpu_mem_usage",description:`<strong>low_cpu_mem_usage</strong> (<code>bool</code>, <em>optional</em>) — | |
| Speed up model loading by only loading the pretrained LoRA weights and not initializing the random | |
| weights.`,name:"low_cpu_mem_usage"},{anchor:"diffusers.loaders.FluxLoraLoaderMixin.load_lora_into_text_encoder.hotswap",description:`<strong>hotswap</strong> (<code>bool</code>, <em>optional</em>) — | |
| See <a href="/docs/diffusers/pr_14358/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a>.`,name:"hotswap"},{anchor:"diffusers.loaders.FluxLoraLoaderMixin.load_lora_into_text_encoder.metadata",description:`<strong>metadata</strong> (<code>dict</code>) — | |
| Optional LoRA adapter metadata. When supplied, the <code>LoraConfig</code> arguments of <code>peft</code> won’t be derived | |
| from the state dict.`,name:"metadata"}]}),s(2),o(E);var H=e(E,2),ki=r(H);a(ki,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.FluxLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L1728",parameters:[{name:"state_dict",val:""},{name:"network_alphas",val:""},{name:"transformer",val:""},{name:"adapter_name",val:" = None"},{name:"metadata",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"}]}),s(2),o(H);var K=e(H,2),Ri=r(K);a(Ri,{name:"load_lora_weights",anchor:"diffusers.loaders.FluxLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L1626",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"adapter_name",val:": str | None = None"},{name:"hotswap",val:": bool = False"},{name:"**kwargs",val:""}]}),s(2),o(K);var $=e(K,2),Ui=r($);a(Ui,{name:"lora_state_dict",anchor:"diffusers.loaders.FluxLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L1501",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"return_alphas",val:": bool = False"},{name:"**kwargs",val:""}]}),s(2),o($);var O=e($,2),Ji=r(O);a(Ji,{name:"save_lora_weights",anchor:"diffusers.loaders.FluxLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L1873",parameters:[{name:"save_directory",val:": str | os.PathLike"},{name:"transformer_lora_layers",val:": dict = None"},{name:"text_encoder_lora_layers",val:": dict = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"},{name:"transformer_lora_adapter_metadata",val:" = None"},{name:"text_encoder_lora_adapter_metadata",val:" = None"}],parametersDescription:[{anchor:"diffusers.loaders.FluxLoraLoaderMixin.save_lora_weights.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) — | |
| Directory to save LoRA parameters to. Will be created if it doesn’t exist.`,name:"save_directory"},{anchor:"diffusers.loaders.FluxLoraLoaderMixin.save_lora_weights.transformer_lora_layers",description:`<strong>transformer_lora_layers</strong> (<code>dict[str, torch.nn.Module]</code> or <code>dict[str, torch.Tensor]</code>) — | |
| State dict of the LoRA layers corresponding to the <code>transformer</code>.`,name:"transformer_lora_layers"},{anchor:"diffusers.loaders.FluxLoraLoaderMixin.save_lora_weights.text_encoder_lora_layers",description:`<strong>text_encoder_lora_layers</strong> (<code>dict[str, torch.nn.Module]</code> or <code>dict[str, torch.Tensor]</code>) — | |
| State dict of the LoRA layers corresponding to the <code>text_encoder</code>. Must explicitly pass the text | |
| encoder LoRA state dict because it comes from 🤗 Transformers.`,name:"text_encoder_lora_layers"},{anchor:"diffusers.loaders.FluxLoraLoaderMixin.save_lora_weights.is_main_process",description:`<strong>is_main_process</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether the process calling this is the main process or not. Useful during distributed training and you | |
| need to call this function on all processes. In this case, set <code>is_main_process=True</code> only on the main | |
| process to avoid race conditions.`,name:"is_main_process"},{anchor:"diffusers.loaders.FluxLoraLoaderMixin.save_lora_weights.save_function",description:`<strong>save_function</strong> (<code>Callable</code>) — | |
| The function to use to save the state dictionary. Useful during distributed training when you need to | |
| replace <code>torch.save</code> with another method. Can be configured with the environment variable | |
| <code>DIFFUSERS_SAVE_MODE</code>.`,name:"save_function"},{anchor:"diffusers.loaders.FluxLoraLoaderMixin.save_lora_weights.safe_serialization",description:`<strong>safe_serialization</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether to save the model using <code>safetensors</code> or the traditional PyTorch way with <code>pickle</code>.`,name:"safe_serialization"},{anchor:"diffusers.loaders.FluxLoraLoaderMixin.save_lora_weights.transformer_lora_adapter_metadata",description:`<strong>transformer_lora_adapter_metadata</strong> — | |
| LoRA adapter metadata associated with the transformer to be serialized with the state dict.`,name:"transformer_lora_adapter_metadata"},{anchor:"diffusers.loaders.FluxLoraLoaderMixin.save_lora_weights.text_encoder_lora_adapter_metadata",description:`<strong>text_encoder_lora_adapter_metadata</strong> — | |
| LoRA adapter metadata associated with the text encoder to be serialized with the state dict.`,name:"text_encoder_lora_adapter_metadata"}]}),s(2),o(O);var ee=e(O,2),Di=r(ee);a(Di,{name:"unfuse_lora",anchor:"diffusers.loaders.FluxLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L1969",parameters:[{name:"components",val:": list = ['transformer', 'text_encoder']"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.loaders.FluxLoraLoaderMixin.unfuse_lora.components",description:"<strong>components</strong> (<code>list[str]</code>) — list of LoRA-injectable components to unfuse LoRA from.",name:"components"}]}),s(2),o(ee);var ho=e(ee,2),go=r(ho);a(go,{name:"unload_lora_weights",anchor:"diffusers.loaders.FluxLoraLoaderMixin.unload_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L1984",parameters:[{name:"reset_to_overwritten_params",val:" = False"}],parametersDescription:[{anchor:"diffusers.loaders.FluxLoraLoaderMixin.unload_lora_weights.reset_to_overwritten_params",description:`<strong>reset_to_overwritten_params</strong> (<code>bool</code>, defaults to <code>False</code>) — Whether to reset the LoRA-loaded modules | |
| to their original params. Refer to the <a href="https://huggingface.co/docs/diffusers/main/en/api/pipelines/flux" rel="nofollow">Flux | |
| documentation</a> to learn more.`,name:"reset_to_overwritten_params"}]});var Zi=e(go,4);p(Zi,{anchor:"diffusers.loaders.FluxLoraLoaderMixin.unload_lora_weights.example",children:(t,n)=>{var i=Cr(),l=e(_(i),2);c(l,{code:"JTIzJTIwQXNzdW1pbmclMjAlNjBwaXBlbGluZSU2MCUyMGlzJTIwYWxyZWFkeSUyMGxvYWRlZCUyMHdpdGglMjB0aGUlMjBMb1JBJTIwcGFyYW1ldGVycy4lMEFwaXBlbGluZS51bmxvYWRfbG9yYV93ZWlnaHRzKCklMEEuLi4=",highlighted:'<span class="hljs-meta">>>> </span><span class="hljs-comment"># Assuming `pipeline` is already loaded with the LoRA parameters.</span>\n<span class="hljs-meta">>>> </span>pipeline.unload_lora_weights()\n<span class="hljs-meta">>>> </span>...',lang:"python",wrap:!1}),f(t,i)},$$slots:{default:!0}}),o(ho),o(Q);var vo=e(Q,2);d(vo,{title:"Flux2LoraLoaderMixin",local:"diffusers.loaders.Flux2LoraLoaderMixin",headingTag:"h2"});var ae=e(vo,2),bo=r(ae);a(bo,{name:"class diffusers.loaders.Flux2LoraLoaderMixin",anchor:"diffusers.loaders.Flux2LoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6009",parameters:[]});var re=e(bo,4),Fi=r(re);a(Fi,{name:"fuse_lora",anchor:"diffusers.loaders.Flux2LoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6196",parameters:[{name:"components",val:": list = ['transformer']"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}]}),s(2),o(re);var oe=e(re,2),Xi=r(oe);a(Xi,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.Flux2LoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6128",parameters:[{name:"state_dict",val:""},{name:"transformer",val:""},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"}]}),s(2),o(oe);var se=e(oe,2),ji=r(se);a(ji,{name:"load_lora_weights",anchor:"diffusers.loaders.Flux2LoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6087",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"adapter_name",val:": str | None = None"},{name:"hotswap",val:": bool = False"},{name:"**kwargs",val:""}]}),s(2),o(se);var ie=e(se,2),Ii=r(ie);a(Ii,{name:"lora_state_dict",anchor:"diffusers.loaders.Flux2LoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6017",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(ie);var te=e(ie,2),Gi=r(te);a(Gi,{name:"save_lora_weights",anchor:"diffusers.loaders.Flux2LoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6160",parameters:[{name:"save_directory",val:": str | os.PathLike"},{name:"transformer_lora_layers",val:": dict = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"},{name:"transformer_lora_adapter_metadata",val:": dict | None = None"}]}),s(2),o(te);var Lo=e(te,2),Wi=r(Lo);a(Wi,{name:"unfuse_lora",anchor:"diffusers.loaders.Flux2LoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6216",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Lo),o(ae);var xo=e(ae,2);d(xo,{title:"ErnieImageLoraLoaderMixin",local:"diffusers.loaders.ErnieImageLoraLoaderMixin",headingTag:"h2"});var de=e(xo,2),yo=r(de);a(yo,{name:"class diffusers.loaders.ErnieImageLoraLoaderMixin",anchor:"diffusers.loaders.ErnieImageLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6430",parameters:[]});var le=e(yo,4),Bi=r(le);a(Bi,{name:"fuse_lora",anchor:"diffusers.loaders.ErnieImageLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6614",parameters:[{name:"components",val:": list = ['transformer']"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}]}),s(2),o(le);var ne=e(le,2),Vi=r(ne);a(Vi,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.ErnieImageLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6546",parameters:[{name:"state_dict",val:""},{name:"transformer",val:""},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"}]}),s(2),o(ne);var ce=e(ne,2),Ai=r(ce);a(Ai,{name:"load_lora_weights",anchor:"diffusers.loaders.ErnieImageLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6505",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"adapter_name",val:": str | None = None"},{name:"hotswap",val:": bool = False"},{name:"**kwargs",val:""}]}),s(2),o(ce);var fe=e(ce,2),Ci=r(fe);a(Ci,{name:"lora_state_dict",anchor:"diffusers.loaders.ErnieImageLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6438",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(fe);var pe=e(fe,2),qi=r(pe);a(qi,{name:"save_lora_weights",anchor:"diffusers.loaders.ErnieImageLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6578",parameters:[{name:"save_directory",val:": str | os.PathLike"},{name:"transformer_lora_layers",val:": dict = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"},{name:"transformer_lora_adapter_metadata",val:": dict | None = None"}]}),s(2),o(pe);var wo=e(pe,2),Yi=r(wo);a(Yi,{name:"unfuse_lora",anchor:"diffusers.loaders.ErnieImageLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6634",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(wo),o(de);var Mo=e(de,2);d(Mo,{title:"LTX2LoraLoaderMixin",local:"diffusers.loaders.LTX2LoraLoaderMixin",headingTag:"h2"});var _e=e(Mo,2),So=r(_e);a(So,{name:"class diffusers.loaders.LTX2LoraLoaderMixin",anchor:"diffusers.loaders.LTX2LoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3015",parameters:[]});var me=e(So,4),zi=r(me);a(zi,{name:"fuse_lora",anchor:"diffusers.loaders.LTX2LoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3215",parameters:[{name:"components",val:": list = ['transformer']"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}]}),s(2),o(me);var ue=e(me,2),Qi=r(ue);a(Qi,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.LTX2LoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3146",parameters:[{name:"state_dict",val:""},{name:"transformer",val:""},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"},{name:"prefix",val:": str = 'transformer'"}]}),s(2),o(ue);var he=e(ue,2),Pi=r(he);a(Pi,{name:"load_lora_weights",anchor:"diffusers.loaders.LTX2LoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3088",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"adapter_name",val:": str | None = None"},{name:"hotswap",val:": bool = False"},{name:"**kwargs",val:""}]}),s(2),o(he);var ge=e(he,2),Ei=r(ge);a(Ei,{name:"lora_state_dict",anchor:"diffusers.loaders.LTX2LoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3024",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(ge);var ve=e(ge,2),Hi=r(ve);a(Hi,{name:"save_lora_weights",anchor:"diffusers.loaders.LTX2LoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3179",parameters:[{name:"save_directory",val:": str | os.PathLike"},{name:"transformer_lora_layers",val:": dict = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"},{name:"transformer_lora_adapter_metadata",val:": dict | None = None"}]}),s(2),o(ve);var To=e(ve,2),Ki=r(To);a(Ki,{name:"unfuse_lora",anchor:"diffusers.loaders.LTX2LoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3235",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(To),o(_e);var No=e(_e,2);d(No,{title:"CogVideoXLoraLoaderMixin",local:"diffusers.loaders.CogVideoXLoraLoaderMixin",headingTag:"h2"});var be=e(No,2),ko=r(be);a(ko,{name:"class diffusers.loaders.CogVideoXLoraLoaderMixin",anchor:"diffusers.loaders.CogVideoXLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L2416",parameters:[]});var Le=e(ko,4),$i=r(Le);a($i,{name:"fuse_lora",anchor:"diffusers.loaders.CogVideoXLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L2586",parameters:[{name:"components",val:": list = ['transformer']"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}]}),s(2),o(Le);var xe=e(Le,2),Oi=r(xe);a(Oi,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.CogVideoXLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L2520",parameters:[{name:"state_dict",val:""},{name:"transformer",val:""},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"}]}),s(2),o(xe);var ye=e(xe,2),et=r(ye);a(et,{name:"load_lora_weights",anchor:"diffusers.loaders.CogVideoXLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L2479",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"adapter_name",val:": str | None = None"},{name:"hotswap",val:": bool = False"},{name:"**kwargs",val:""}]}),s(2),o(ye);var we=e(ye,2),at=r(we);a(at,{name:"lora_state_dict",anchor:"diffusers.loaders.CogVideoXLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L2424",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(we);var Me=e(we,2),rt=r(Me);a(rt,{name:"save_lora_weights",anchor:"diffusers.loaders.CogVideoXLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L2552",parameters:[{name:"save_directory",val:": str | os.PathLike"},{name:"transformer_lora_layers",val:": dict = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"},{name:"transformer_lora_adapter_metadata",val:": dict | None = None"}]}),s(2),o(Me);var Ro=e(Me,2),ot=r(Ro);a(ot,{name:"unfuse_lora",anchor:"diffusers.loaders.CogVideoXLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L2605",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Ro),o(be);var Uo=e(be,2);d(Uo,{title:"Mochi1LoraLoaderMixin",local:"diffusers.loaders.Mochi1LoraLoaderMixin",headingTag:"h2"});var Se=e(Uo,2),Jo=r(Se);a(Jo,{name:"class diffusers.loaders.Mochi1LoraLoaderMixin",anchor:"diffusers.loaders.Mochi1LoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L2612",parameters:[]});var Te=e(Jo,4),st=r(Te);a(st,{name:"fuse_lora",anchor:"diffusers.loaders.Mochi1LoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L2785",parameters:[{name:"components",val:": list = ['transformer']"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}]}),s(2),o(Te);var Ne=e(Te,2),it=r(Ne);a(it,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.Mochi1LoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L2717",parameters:[{name:"state_dict",val:""},{name:"transformer",val:""},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"}]}),s(2),o(Ne);var ke=e(Ne,2),tt=r(ke);a(tt,{name:"load_lora_weights",anchor:"diffusers.loaders.Mochi1LoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L2676",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"adapter_name",val:": str | None = None"},{name:"hotswap",val:": bool = False"},{name:"**kwargs",val:""}]}),s(2),o(ke);var Re=e(ke,2),dt=r(Re);a(dt,{name:"lora_state_dict",anchor:"diffusers.loaders.Mochi1LoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L2620",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(Re);var Ue=e(Re,2),lt=r(Ue);a(lt,{name:"save_lora_weights",anchor:"diffusers.loaders.Mochi1LoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L2749",parameters:[{name:"save_directory",val:": str | os.PathLike"},{name:"transformer_lora_layers",val:": dict = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"},{name:"transformer_lora_adapter_metadata",val:": dict | None = None"}]}),s(2),o(Ue);var Do=e(Ue,2),nt=r(Do);a(nt,{name:"unfuse_lora",anchor:"diffusers.loaders.Mochi1LoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L2805",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Do),o(Se);var Zo=e(Se,2);d(Zo,{title:"AuraFlowLoraLoaderMixin",local:"diffusers.loaders.AuraFlowLoraLoaderMixin",headingTag:"h2"});var Je=e(Zo,2),Fo=r(Je);a(Fo,{name:"class diffusers.loaders.AuraFlowLoraLoaderMixin",anchor:"diffusers.loaders.AuraFlowLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L1288",parameters:[]});var De=e(Fo,4),ct=r(De);a(ct,{name:"fuse_lora",anchor:"diffusers.loaders.AuraFlowLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L1461",parameters:[{name:"components",val:": list = ['transformer']"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}]}),s(2),o(De);var Ze=e(De,2),ft=r(Ze);a(ft,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.AuraFlowLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L1393",parameters:[{name:"state_dict",val:""},{name:"transformer",val:""},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"}]}),s(2),o(Ze);var Fe=e(Ze,2),pt=r(Fe);a(pt,{name:"load_lora_weights",anchor:"diffusers.loaders.AuraFlowLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L1352",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"adapter_name",val:": str | None = None"},{name:"hotswap",val:": bool = False"},{name:"**kwargs",val:""}]}),s(2),o(Fe);var Xe=e(Fe,2),_t=r(Xe);a(_t,{name:"lora_state_dict",anchor:"diffusers.loaders.AuraFlowLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L1296",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(Xe);var je=e(Xe,2),mt=r(je);a(mt,{name:"save_lora_weights",anchor:"diffusers.loaders.AuraFlowLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L1425",parameters:[{name:"save_directory",val:": str | os.PathLike"},{name:"transformer_lora_layers",val:": dict = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"},{name:"transformer_lora_adapter_metadata",val:": dict | None = None"}]}),s(2),o(je);var Xo=e(je,2),ut=r(Xo);a(ut,{name:"unfuse_lora",anchor:"diffusers.loaders.AuraFlowLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L1481",parameters:[{name:"components",val:": list = ['transformer', 'text_encoder']"},{name:"**kwargs",val:""}]}),s(2),o(Xo),o(Je);var jo=e(Je,2);d(jo,{title:"LTXVideoLoraLoaderMixin",local:"diffusers.loaders.LTXVideoLoraLoaderMixin",headingTag:"h2"});var Ie=e(jo,2),Io=r(Ie);a(Io,{name:"class diffusers.loaders.LTXVideoLoraLoaderMixin",anchor:"diffusers.loaders.LTXVideoLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L2812",parameters:[]});var Ge=e(Io,4),ht=r(Ge);a(ht,{name:"fuse_lora",anchor:"diffusers.loaders.LTXVideoLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L2988",parameters:[{name:"components",val:": list = ['transformer']"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}]}),s(2),o(Ge);var We=e(Ge,2),gt=r(We);a(gt,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.LTXVideoLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L2920",parameters:[{name:"state_dict",val:""},{name:"transformer",val:""},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"}]}),s(2),o(We);var Be=e(We,2),vt=r(Be);a(vt,{name:"load_lora_weights",anchor:"diffusers.loaders.LTXVideoLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L2879",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"adapter_name",val:": str | None = None"},{name:"hotswap",val:": bool = False"},{name:"**kwargs",val:""}]}),s(2),o(Be);var Ve=e(Be,2),bt=r(Ve);a(bt,{name:"lora_state_dict",anchor:"diffusers.loaders.LTXVideoLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L2820",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(Ve);var Ae=e(Ve,2),Lt=r(Ae);a(Lt,{name:"save_lora_weights",anchor:"diffusers.loaders.LTXVideoLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L2952",parameters:[{name:"save_directory",val:": str | os.PathLike"},{name:"transformer_lora_layers",val:": dict = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"},{name:"transformer_lora_adapter_metadata",val:": dict | None = None"}]}),s(2),o(Ae);var Go=e(Ae,2),xt=r(Go);a(xt,{name:"unfuse_lora",anchor:"diffusers.loaders.LTXVideoLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3008",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Go),o(Ie);var Wo=e(Ie,2);d(Wo,{title:"SanaLoraLoaderMixin",local:"diffusers.loaders.SanaLoraLoaderMixin",headingTag:"h2"});var Ce=e(Wo,2),Bo=r(Ce);a(Bo,{name:"class diffusers.loaders.SanaLoraLoaderMixin",anchor:"diffusers.loaders.SanaLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3242",parameters:[]});var qe=e(Bo,4),yt=r(qe);a(yt,{name:"fuse_lora",anchor:"diffusers.loaders.SanaLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3415",parameters:[{name:"components",val:": list = ['transformer']"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}]}),s(2),o(qe);var Ye=e(qe,2),wt=r(Ye);a(wt,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.SanaLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3347",parameters:[{name:"state_dict",val:""},{name:"transformer",val:""},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"}]}),s(2),o(Ye);var ze=e(Ye,2),Mt=r(ze);a(Mt,{name:"load_lora_weights",anchor:"diffusers.loaders.SanaLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3306",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"adapter_name",val:": str | None = None"},{name:"hotswap",val:": bool = False"},{name:"**kwargs",val:""}]}),s(2),o(ze);var Qe=e(ze,2),St=r(Qe);a(St,{name:"lora_state_dict",anchor:"diffusers.loaders.SanaLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3250",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(Qe);var Pe=e(Qe,2),Tt=r(Pe);a(Tt,{name:"save_lora_weights",anchor:"diffusers.loaders.SanaLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3379",parameters:[{name:"save_directory",val:": str | os.PathLike"},{name:"transformer_lora_layers",val:": dict = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"},{name:"transformer_lora_adapter_metadata",val:": dict | None = None"}]}),s(2),o(Pe);var Vo=e(Pe,2),Nt=r(Vo);a(Nt,{name:"unfuse_lora",anchor:"diffusers.loaders.SanaLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3435",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Vo),o(Ce);var Ao=e(Ce,2);d(Ao,{title:"HeliosLoraLoaderMixin",local:"diffusers.loaders.HeliosLoraLoaderMixin",headingTag:"h2"});var Ee=e(Ao,2),Co=r(Ee);a(Co,{name:"class diffusers.loaders.HeliosLoraLoaderMixin",anchor:"diffusers.loaders.HeliosLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3442",parameters:[]});var He=e(Co,4),kt=r(He);a(kt,{name:"fuse_lora",anchor:"diffusers.loaders.HeliosLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3616",parameters:[{name:"components",val:": list = ['transformer']"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}]}),s(2),o(He);var Ke=e(He,2),Rt=r(Ke);a(Rt,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.HeliosLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3548",parameters:[{name:"state_dict",val:""},{name:"transformer",val:""},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"}]}),s(2),o(Ke);var $e=e(Ke,2),Ut=r($e);a(Ut,{name:"load_lora_weights",anchor:"diffusers.loaders.HeliosLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3508",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"adapter_name",val:": str | None = None"},{name:"hotswap",val:": bool = False"},{name:"**kwargs",val:""}]}),s(2),o($e);var Oe=e($e,2),Jt=r(Oe);a(Jt,{name:"lora_state_dict",anchor:"diffusers.loaders.HeliosLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3450",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(Oe);var ea=e(Oe,2),Dt=r(ea);a(Dt,{name:"save_lora_weights",anchor:"diffusers.loaders.HeliosLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3580",parameters:[{name:"save_directory",val:": str | os.PathLike"},{name:"transformer_lora_layers",val:": dict = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"},{name:"transformer_lora_adapter_metadata",val:": dict | None = None"}]}),s(2),o(ea);var qo=e(ea,2),Zt=r(qo);a(Zt,{name:"unfuse_lora",anchor:"diffusers.loaders.HeliosLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3636",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(qo),o(Ee);var Yo=e(Ee,2);d(Yo,{title:"HunyuanVideoLoraLoaderMixin",local:"diffusers.loaders.HunyuanVideoLoraLoaderMixin",headingTag:"h2"});var aa=e(Yo,2),zo=r(aa);a(zo,{name:"class diffusers.loaders.HunyuanVideoLoraLoaderMixin",anchor:"diffusers.loaders.HunyuanVideoLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3643",parameters:[]});var ra=e(zo,4),Ft=r(ra);a(Ft,{name:"fuse_lora",anchor:"diffusers.loaders.HunyuanVideoLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3819",parameters:[{name:"components",val:": list = ['transformer']"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}]}),s(2),o(ra);var oa=e(ra,2),Xt=r(oa);a(Xt,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.HunyuanVideoLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3751",parameters:[{name:"state_dict",val:""},{name:"transformer",val:""},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"}]}),s(2),o(oa);var sa=e(oa,2),jt=r(sa);a(jt,{name:"load_lora_weights",anchor:"diffusers.loaders.HunyuanVideoLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3710",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"adapter_name",val:": str | None = None"},{name:"hotswap",val:": bool = False"},{name:"**kwargs",val:""}]}),s(2),o(sa);var ia=e(sa,2),It=r(ia);a(It,{name:"lora_state_dict",anchor:"diffusers.loaders.HunyuanVideoLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3651",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(ia);var ta=e(ia,2),Gt=r(ta);a(Gt,{name:"save_lora_weights",anchor:"diffusers.loaders.HunyuanVideoLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3783",parameters:[{name:"save_directory",val:": str | os.PathLike"},{name:"transformer_lora_layers",val:": dict = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"},{name:"transformer_lora_adapter_metadata",val:": dict | None = None"}]}),s(2),o(ta);var Qo=e(ta,2),Wt=r(Qo);a(Wt,{name:"unfuse_lora",anchor:"diffusers.loaders.HunyuanVideoLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3839",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Qo),o(aa);var Po=e(aa,2);d(Po,{title:"Lumina2LoraLoaderMixin",local:"diffusers.loaders.Lumina2LoraLoaderMixin",headingTag:"h2"});var da=e(Po,2),Eo=r(da);a(Eo,{name:"class diffusers.loaders.Lumina2LoraLoaderMixin",anchor:"diffusers.loaders.Lumina2LoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3846",parameters:[]});var la=e(Eo,4),Bt=r(la);a(Bt,{name:"fuse_lora",anchor:"diffusers.loaders.Lumina2LoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4023",parameters:[{name:"components",val:": list = ['transformer']"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}]}),s(2),o(la);var na=e(la,2),Vt=r(na);a(Vt,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.Lumina2LoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3955",parameters:[{name:"state_dict",val:""},{name:"transformer",val:""},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"}]}),s(2),o(na);var ca=e(na,2),At=r(ca);a(At,{name:"load_lora_weights",anchor:"diffusers.loaders.Lumina2LoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3914",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"adapter_name",val:": str | None = None"},{name:"hotswap",val:": bool = False"},{name:"**kwargs",val:""}]}),s(2),o(ca);var fa=e(ca,2),Ct=r(fa);a(Ct,{name:"lora_state_dict",anchor:"diffusers.loaders.Lumina2LoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3854",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(fa);var pa=e(fa,2),qt=r(pa);a(qt,{name:"save_lora_weights",anchor:"diffusers.loaders.Lumina2LoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L3987",parameters:[{name:"save_directory",val:": str | os.PathLike"},{name:"transformer_lora_layers",val:": dict = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"},{name:"transformer_lora_adapter_metadata",val:": dict | None = None"}]}),s(2),o(pa);var Ho=e(pa,2),Yt=r(Ho);a(Yt,{name:"unfuse_lora",anchor:"diffusers.loaders.Lumina2LoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4043",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Ho),o(da);var Ko=e(da,2);d(Ko,{title:"CogView4LoraLoaderMixin",local:"diffusers.loaders.CogView4LoraLoaderMixin",headingTag:"h2"});var _a=e(Ko,2),$o=r(_a);a($o,{name:"class diffusers.loaders.CogView4LoraLoaderMixin",anchor:"diffusers.loaders.CogView4LoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4801",parameters:[]});var ma=e($o,4),zt=r(ma);a(zt,{name:"fuse_lora",anchor:"diffusers.loaders.CogView4LoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4974",parameters:[{name:"components",val:": list = ['transformer']"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}]}),s(2),o(ma);var ua=e(ma,2),Qt=r(ua);a(Qt,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.CogView4LoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4906",parameters:[{name:"state_dict",val:""},{name:"transformer",val:""},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"}]}),s(2),o(ua);var ha=e(ua,2),Pt=r(ha);a(Pt,{name:"load_lora_weights",anchor:"diffusers.loaders.CogView4LoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4865",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"adapter_name",val:": str | None = None"},{name:"hotswap",val:": bool = False"},{name:"**kwargs",val:""}]}),s(2),o(ha);var ga=e(ha,2),Et=r(ga);a(Et,{name:"lora_state_dict",anchor:"diffusers.loaders.CogView4LoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4809",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(ga);var va=e(ga,2),Ht=r(va);a(Ht,{name:"save_lora_weights",anchor:"diffusers.loaders.CogView4LoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4938",parameters:[{name:"save_directory",val:": str | os.PathLike"},{name:"transformer_lora_layers",val:": dict = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"},{name:"transformer_lora_adapter_metadata",val:": dict | None = None"}]}),s(2),o(va);var Oo=e(va,2),Kt=r(Oo);a(Kt,{name:"unfuse_lora",anchor:"diffusers.loaders.CogView4LoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4994",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Oo),o(_a);var es=e(_a,2);d(es,{title:"WanLoraLoaderMixin",local:"diffusers.loaders.WanLoraLoaderMixin",headingTag:"h2"});var ba=e(es,2),as=r(ba);a(as,{name:"class diffusers.loaders.WanLoraLoaderMixin",anchor:"diffusers.loaders.WanLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4250",parameters:[]});var La=e(as,4),$t=r(La);a($t,{name:"fuse_lora",anchor:"diffusers.loaders.WanLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4497",parameters:[{name:"components",val:": list = ['transformer']"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}]}),s(2),o(La);var xa=e(La,2),Ot=r(xa);a(Ot,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.WanLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4429",parameters:[{name:"state_dict",val:""},{name:"transformer",val:""},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"}]}),s(2),o(xa);var ya=e(xa,2),ed=r(ya);a(ed,{name:"load_lora_weights",anchor:"diffusers.loaders.WanLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4364",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"adapter_name",val:": str | None = None"},{name:"hotswap",val:": bool = False"},{name:"**kwargs",val:""}]}),s(2),o(ya);var wa=e(ya,2),ad=r(wa);a(ad,{name:"lora_state_dict",anchor:"diffusers.loaders.WanLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4258",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(wa);var Ma=e(wa,2),rd=r(Ma);a(rd,{name:"save_lora_weights",anchor:"diffusers.loaders.WanLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4461",parameters:[{name:"save_directory",val:": str | os.PathLike"},{name:"transformer_lora_layers",val:": dict = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"},{name:"transformer_lora_adapter_metadata",val:": dict | None = None"}]}),s(2),o(Ma);var rs=e(Ma,2),od=r(rs);a(od,{name:"unfuse_lora",anchor:"diffusers.loaders.WanLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4517",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(rs),o(ba);var os=e(ba,2);d(os,{title:"SkyReelsV2LoraLoaderMixin",local:"diffusers.loaders.SkyReelsV2LoraLoaderMixin",headingTag:"h2"});var Sa=e(os,2),ss=r(Sa);a(ss,{name:"class diffusers.loaders.SkyReelsV2LoraLoaderMixin",anchor:"diffusers.loaders.SkyReelsV2LoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4524",parameters:[]});var Ta=e(ss,4),sd=r(Ta);a(sd,{name:"fuse_lora",anchor:"diffusers.loaders.SkyReelsV2LoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4774",parameters:[{name:"components",val:": list = ['transformer']"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}]}),s(2),o(Ta);var Na=e(Ta,2),id=r(Na);a(id,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.SkyReelsV2LoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4706",parameters:[{name:"state_dict",val:""},{name:"transformer",val:""},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"}]}),s(2),o(Na);var ka=e(Na,2),td=r(ka);a(td,{name:"load_lora_weights",anchor:"diffusers.loaders.SkyReelsV2LoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4641",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"adapter_name",val:": str | None = None"},{name:"hotswap",val:": bool = False"},{name:"**kwargs",val:""}]}),s(2),o(ka);var Ra=e(ka,2),dd=r(Ra);a(dd,{name:"lora_state_dict",anchor:"diffusers.loaders.SkyReelsV2LoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4532",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(Ra);var Ua=e(Ra,2),ld=r(Ua);a(ld,{name:"save_lora_weights",anchor:"diffusers.loaders.SkyReelsV2LoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4738",parameters:[{name:"save_directory",val:": str | os.PathLike"},{name:"transformer_lora_layers",val:": dict = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"},{name:"transformer_lora_adapter_metadata",val:": dict | None = None"}]}),s(2),o(Ua);var is=e(Ua,2),nd=r(is);a(nd,{name:"unfuse_lora",anchor:"diffusers.loaders.SkyReelsV2LoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4794",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(is),o(Sa);var ts=e(Sa,2);d(ts,{title:"AmusedLoraLoaderMixin",local:"diffusers.loaders.AmusedLoraLoaderMixin",headingTag:"h2"});var Ja=e(ts,2),ds=r(Ja);a(ds,{name:"class diffusers.loaders.AmusedLoraLoaderMixin",anchor:"diffusers.loaders.AmusedLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L2264",parameters:[]});var Da=e(ds,2),cd=r(Da);a(cd,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.AmusedLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L2269",parameters:[{name:"state_dict",val:""},{name:"network_alphas",val:""},{name:"transformer",val:""},{name:"adapter_name",val:" = None"},{name:"metadata",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"}]}),s(2),o(Da);var ls=e(Da,2),fd=r(ls);a(fd,{name:"save_lora_weights",anchor:"diffusers.loaders.AmusedLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L2361",parameters:[{name:"save_directory",val:": str | os.PathLike"},{name:"text_encoder_lora_layers",val:": dict = None"},{name:"transformer_lora_layers",val:": dict = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.loaders.AmusedLoraLoaderMixin.save_lora_weights.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) — | |
| Directory to save LoRA parameters to. Will be created if it doesn’t exist.`,name:"save_directory"},{anchor:"diffusers.loaders.AmusedLoraLoaderMixin.save_lora_weights.unet_lora_layers",description:`<strong>unet_lora_layers</strong> (<code>dict[str, torch.nn.Module]</code> or <code>dict[str, torch.Tensor]</code>) — | |
| State dict of the LoRA layers corresponding to the <code>unet</code>.`,name:"unet_lora_layers"},{anchor:"diffusers.loaders.AmusedLoraLoaderMixin.save_lora_weights.text_encoder_lora_layers",description:`<strong>text_encoder_lora_layers</strong> (<code>dict[str, torch.nn.Module]</code> or <code>dict[str, torch.Tensor]</code>) — | |
| State dict of the LoRA layers corresponding to the <code>text_encoder</code>. Must explicitly pass the text | |
| encoder LoRA state dict because it comes from 🤗 Transformers.`,name:"text_encoder_lora_layers"},{anchor:"diffusers.loaders.AmusedLoraLoaderMixin.save_lora_weights.is_main_process",description:`<strong>is_main_process</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether the process calling this is the main process or not. Useful during distributed training and you | |
| need to call this function on all processes. In this case, set <code>is_main_process=True</code> only on the main | |
| process to avoid race conditions.`,name:"is_main_process"},{anchor:"diffusers.loaders.AmusedLoraLoaderMixin.save_lora_weights.save_function",description:`<strong>save_function</strong> (<code>Callable</code>) — | |
| The function to use to save the state dictionary. Useful during distributed training when you need to | |
| replace <code>torch.save</code> with another method. Can be configured with the environment variable | |
| <code>DIFFUSERS_SAVE_MODE</code>.`,name:"save_function"},{anchor:"diffusers.loaders.AmusedLoraLoaderMixin.save_lora_weights.safe_serialization",description:`<strong>safe_serialization</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether to save the model using <code>safetensors</code> or the traditional PyTorch way with <code>pickle</code>.`,name:"safe_serialization"}]}),s(2),o(ls),o(Ja);var ns=e(Ja,2);d(ns,{title:"AnimaLoraLoaderMixin",local:"diffusers.loaders.AnimaLoraLoaderMixin",headingTag:"h2"});var Za=e(ns,2),cs=r(Za);a(cs,{name:"class diffusers.loaders.AnimaLoraLoaderMixin",anchor:"diffusers.loaders.AnimaLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5821",parameters:[]});var Fa=e(cs,4),pd=r(Fa);a(pd,{name:"fuse_lora",anchor:"diffusers.loaders.AnimaLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5983",parameters:[{name:"components",val:": list = ['transformer', 'text_conditioner']"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}]}),s(2),o(Fa);var Xa=e(Fa,2),_d=r(Xa);a(_d,{name:"load_lora_weights",anchor:"diffusers.loaders.AnimaLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5886",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"adapter_name",val:": str | None = None"},{name:"hotswap",val:": bool = False"},{name:"**kwargs",val:""}]}),s(2),o(Xa);var ja=e(Xa,2),md=r(ja);a(md,{name:"lora_state_dict",anchor:"diffusers.loaders.AnimaLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5830",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(ja);var fs=e(ja,2),ud=r(fs);a(ud,{name:"unfuse_lora",anchor:"diffusers.loaders.AnimaLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6002",parameters:[{name:"components",val:": list = ['transformer', 'text_conditioner']"},{name:"**kwargs",val:""}]}),s(2),o(fs),o(Za);var ps=e(Za,2);d(ps,{title:"AceStepLoraLoaderMixin",local:"diffusers.loaders.AceStepLoraLoaderMixin",headingTag:"h2"});var Ia=e(ps,2),_s=r(Ia);a(_s,{name:"class diffusers.loaders.AceStepLoraLoaderMixin",anchor:"diffusers.loaders.AceStepLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6842",parameters:[]});var Ga=e(_s,4),hd=r(Ga);a(hd,{name:"fuse_lora",anchor:"diffusers.loaders.AceStepLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L7017",parameters:[{name:"components",val:": list = ['transformer']"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}]}),s(2),o(Ga);var Wa=e(Ga,2),gd=r(Wa);a(gd,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.AceStepLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6949",parameters:[{name:"state_dict",val:""},{name:"transformer",val:""},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"}]}),s(2),o(Wa);var Ba=e(Wa,2),vd=r(Ba);a(vd,{name:"load_lora_weights",anchor:"diffusers.loaders.AceStepLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6908",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"adapter_name",val:": str | None = None"},{name:"hotswap",val:": bool = False"},{name:"**kwargs",val:""}]}),s(2),o(Ba);var Va=e(Ba,2),bd=r(Va);a(bd,{name:"lora_state_dict",anchor:"diffusers.loaders.AceStepLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6850",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(Va);var Aa=e(Va,2),Ld=r(Aa);a(Ld,{name:"save_lora_weights",anchor:"diffusers.loaders.AceStepLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6981",parameters:[{name:"save_directory",val:": str | os.PathLike"},{name:"transformer_lora_layers",val:": dict = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"},{name:"transformer_lora_adapter_metadata",val:": dict | None = None"}]}),s(2),o(Aa);var ms=e(Aa,2),xd=r(ms);a(xd,{name:"unfuse_lora",anchor:"diffusers.loaders.AceStepLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L7037",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(ms),o(Ia);var us=e(Ia,2);d(us,{title:"HiDreamImageLoraLoaderMixin",local:"diffusers.loaders.HiDreamImageLoraLoaderMixin",headingTag:"h2"});var Ca=e(us,2),hs=r(Ca);a(hs,{name:"class diffusers.loaders.HiDreamImageLoraLoaderMixin",anchor:"diffusers.loaders.HiDreamImageLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5001",parameters:[]});var qa=e(hs,4),yd=r(qa);a(yd,{name:"fuse_lora",anchor:"diffusers.loaders.HiDreamImageLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5177",parameters:[{name:"components",val:": list = ['transformer']"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}]}),s(2),o(qa);var Ya=e(qa,2),wd=r(Ya);a(wd,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.HiDreamImageLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5109",parameters:[{name:"state_dict",val:""},{name:"transformer",val:""},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"}]}),s(2),o(Ya);var za=e(Ya,2),Md=r(za);a(Md,{name:"load_lora_weights",anchor:"diffusers.loaders.HiDreamImageLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5068",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"adapter_name",val:": str | None = None"},{name:"hotswap",val:": bool = False"},{name:"**kwargs",val:""}]}),s(2),o(za);var Qa=e(za,2),Sd=r(Qa);a(Sd,{name:"lora_state_dict",anchor:"diffusers.loaders.HiDreamImageLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5009",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(Qa);var Pa=e(Qa,2),Td=r(Pa);a(Td,{name:"save_lora_weights",anchor:"diffusers.loaders.HiDreamImageLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5141",parameters:[{name:"save_directory",val:": str | os.PathLike"},{name:"transformer_lora_layers",val:": dict = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"},{name:"transformer_lora_adapter_metadata",val:": dict | None = None"}]}),s(2),o(Pa);var gs=e(Pa,2),Nd=r(gs);a(Nd,{name:"unfuse_lora",anchor:"diffusers.loaders.HiDreamImageLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5197",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(gs),o(Ca);var vs=e(Ca,2);d(vs,{title:"QwenImageLoraLoaderMixin",local:"diffusers.loaders.QwenImageLoraLoaderMixin",headingTag:"h2"});var Ea=e(vs,2),bs=r(Ea);a(bs,{name:"class diffusers.loaders.QwenImageLoraLoaderMixin",anchor:"diffusers.loaders.QwenImageLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5204",parameters:[]});var Ha=e(bs,4),kd=r(Ha);a(kd,{name:"fuse_lora",anchor:"diffusers.loaders.QwenImageLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5383",parameters:[{name:"components",val:": list = ['transformer']"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}]}),s(2),o(Ha);var Ka=e(Ha,2),Rd=r(Ka);a(Rd,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.QwenImageLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5315",parameters:[{name:"state_dict",val:""},{name:"transformer",val:""},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"}]}),s(2),o(Ka);var $a=e(Ka,2),Ud=r($a);a(Ud,{name:"load_lora_weights",anchor:"diffusers.loaders.QwenImageLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5274",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"adapter_name",val:": str | None = None"},{name:"hotswap",val:": bool = False"},{name:"**kwargs",val:""}]}),s(2),o($a);var Oa=e($a,2),Jd=r(Oa);a(Jd,{name:"lora_state_dict",anchor:"diffusers.loaders.QwenImageLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5212",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(Oa);var er=e(Oa,2),Dd=r(er);a(Dd,{name:"save_lora_weights",anchor:"diffusers.loaders.QwenImageLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5347",parameters:[{name:"save_directory",val:": str | os.PathLike"},{name:"transformer_lora_layers",val:": dict = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"},{name:"transformer_lora_adapter_metadata",val:": dict | None = None"}]}),s(2),o(er);var Ls=e(er,2),Zd=r(Ls);a(Zd,{name:"unfuse_lora",anchor:"diffusers.loaders.QwenImageLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5403",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Ls),o(Ea);var xs=e(Ea,2);d(xs,{title:"ZImageLoraLoaderMixin",local:"diffusers.loaders.ZImageLoraLoaderMixin",headingTag:"h2"});var ar=e(xs,2),ys=r(ar);a(ys,{name:"class diffusers.loaders.ZImageLoraLoaderMixin",anchor:"diffusers.loaders.ZImageLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5615",parameters:[]});var rr=e(ys,4),Fd=r(rr);a(Fd,{name:"fuse_lora",anchor:"diffusers.loaders.ZImageLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5794",parameters:[{name:"components",val:": list = ['transformer']"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}]}),s(2),o(rr);var or=e(rr,2),Xd=r(or);a(Xd,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.ZImageLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5726",parameters:[{name:"state_dict",val:""},{name:"transformer",val:""},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"}]}),s(2),o(or);var sr=e(or,2),jd=r(sr);a(jd,{name:"load_lora_weights",anchor:"diffusers.loaders.ZImageLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5685",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"adapter_name",val:": str | None = None"},{name:"hotswap",val:": bool = False"},{name:"**kwargs",val:""}]}),s(2),o(sr);var ir=e(sr,2),Id=r(ir);a(Id,{name:"lora_state_dict",anchor:"diffusers.loaders.ZImageLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5623",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(ir);var tr=e(ir,2),Gd=r(tr);a(Gd,{name:"save_lora_weights",anchor:"diffusers.loaders.ZImageLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5758",parameters:[{name:"save_directory",val:": str | os.PathLike"},{name:"transformer_lora_layers",val:": dict = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"},{name:"transformer_lora_adapter_metadata",val:": dict | None = None"}]}),s(2),o(tr);var ws=e(tr,2),Wd=r(ws);a(Wd,{name:"unfuse_lora",anchor:"diffusers.loaders.ZImageLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5814",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(ws),o(ar);var Ms=e(ar,2);d(Ms,{title:"CosmosLoraLoaderMixin",local:"diffusers.loaders.CosmosLoraLoaderMixin",headingTag:"h2"});var dr=e(Ms,2),Ss=r(dr);a(Ss,{name:"class diffusers.loaders.CosmosLoraLoaderMixin",anchor:"diffusers.loaders.CosmosLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6641",parameters:[]});var lr=e(Ss,4),Bd=r(lr);a(Bd,{name:"fuse_lora",anchor:"diffusers.loaders.CosmosLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6815",parameters:[{name:"components",val:": list = ['transformer']"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}]}),s(2),o(lr);var nr=e(lr,2),Vd=r(nr);a(Vd,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.CosmosLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6747",parameters:[{name:"state_dict",val:""},{name:"transformer",val:""},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"}]}),s(2),o(nr);var cr=e(nr,2),Ad=r(cr);a(Ad,{name:"load_lora_weights",anchor:"diffusers.loaders.CosmosLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6706",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"adapter_name",val:": str | None = None"},{name:"hotswap",val:": bool = False"},{name:"**kwargs",val:""}]}),s(2),o(cr);var fr=e(cr,2),Cd=r(fr);a(Cd,{name:"lora_state_dict",anchor:"diffusers.loaders.CosmosLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6650",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(fr);var pr=e(fr,2),qd=r(pr);a(qd,{name:"save_lora_weights",anchor:"diffusers.loaders.CosmosLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6779",parameters:[{name:"save_directory",val:": str | os.PathLike"},{name:"transformer_lora_layers",val:": dict = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"},{name:"transformer_lora_adapter_metadata",val:": dict | None = None"}]}),s(2),o(pr);var Ts=e(pr,2),Yd=r(Ts);a(Yd,{name:"unfuse_lora",anchor:"diffusers.loaders.CosmosLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6835",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Ts),o(dr);var Ns=e(dr,2);d(Ns,{title:"KandinskyLoraLoaderMixin",local:"diffusers.loaders.KandinskyLoraLoaderMixin",headingTag:"h2"});var _r=e(Ns,2),ks=r(_r);a(ks,{name:"class diffusers.loaders.KandinskyLoraLoaderMixin",anchor:"diffusers.loaders.KandinskyLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4050",parameters:[]});var mr=e(ks,4),zd=r(mr);a(zd,{name:"fuse_lora",anchor:"diffusers.loaders.KandinskyLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4223",parameters:[{name:"components",val:": list = ['transformer']"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}]}),s(2),o(mr);var ur=e(mr,2),Qd=r(ur);a(Qd,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.KandinskyLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4155",parameters:[{name:"state_dict",val:""},{name:"transformer",val:""},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"}]}),s(2),o(ur);var hr=e(ur,2),Pd=r(hr);a(Pd,{name:"load_lora_weights",anchor:"diffusers.loaders.KandinskyLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4114",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"adapter_name",val:": str | None = None"},{name:"hotswap",val:": bool = False"},{name:"**kwargs",val:""}]}),s(2),o(hr);var gr=e(hr,2),Ed=r(gr);a(Ed,{name:"lora_state_dict",anchor:"diffusers.loaders.KandinskyLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4058",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(gr);var vr=e(gr,2),Hd=r(vr);a(Hd,{name:"save_lora_weights",anchor:"diffusers.loaders.KandinskyLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4187",parameters:[{name:"save_directory",val:": str | os.PathLike"},{name:"transformer_lora_layers",val:": dict = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"},{name:"transformer_lora_adapter_metadata",val:": dict | None = None"}]}),s(2),o(vr);var Rs=e(vr,2),Kd=r(Rs);a(Kd,{name:"unfuse_lora",anchor:"diffusers.loaders.KandinskyLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L4243",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Rs),o(_r);var Us=e(_r,2);d(Us,{title:"Ideogram4LoraLoaderMixin",local:"diffusers.loaders.Ideogram4LoraLoaderMixin",headingTag:"h2"});var br=e(Us,2),Js=r(br);a(Js,{name:"class diffusers.loaders.Ideogram4LoraLoaderMixin",anchor:"diffusers.loaders.Ideogram4LoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6223",parameters:[]});var Lr=e(Js,4),$d=r(Lr);a($d,{name:"fuse_lora",anchor:"diffusers.loaders.Ideogram4LoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6403",parameters:[{name:"components",val:": list = ['transformer']"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}]}),s(2),o(Lr);var xr=e(Lr,2),Od=r(xr);a(Od,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.Ideogram4LoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6335",parameters:[{name:"state_dict",val:""},{name:"transformer",val:""},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"}]}),s(2),o(xr);var yr=e(xr,2),el=r(yr);a(el,{name:"load_lora_weights",anchor:"diffusers.loaders.Ideogram4LoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6294",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"adapter_name",val:": str | None = None"},{name:"hotswap",val:": bool = False"},{name:"**kwargs",val:""}]}),s(2),o(yr);var wr=e(yr,2),al=r(wr);a(al,{name:"lora_state_dict",anchor:"diffusers.loaders.Ideogram4LoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6231",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(wr);var Mr=e(wr,2),rl=r(Mr);a(rl,{name:"save_lora_weights",anchor:"diffusers.loaders.Ideogram4LoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6367",parameters:[{name:"save_directory",val:": str | os.PathLike"},{name:"transformer_lora_layers",val:": dict = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"},{name:"transformer_lora_adapter_metadata",val:": dict | None = None"}]}),s(2),o(Mr);var Ds=e(Mr,2),ol=r(Ds);a(ol,{name:"unfuse_lora",anchor:"diffusers.loaders.Ideogram4LoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L6423",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Ds),o(br);var Zs=e(br,2);d(Zs,{title:"Krea2LoraLoaderMixin",local:"diffusers.loaders.Krea2LoraLoaderMixin",headingTag:"h2"});var Sr=e(Zs,2),Fs=r(Sr);a(Fs,{name:"class diffusers.loaders.Krea2LoraLoaderMixin",anchor:"diffusers.loaders.Krea2LoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5410",parameters:[]});var Tr=e(Fs,4),sl=r(Tr);a(sl,{name:"fuse_lora",anchor:"diffusers.loaders.Krea2LoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5588",parameters:[{name:"components",val:": list = ['transformer']"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}]}),s(2),o(Tr);var Nr=e(Tr,2),il=r(Nr);a(il,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.Krea2LoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5520",parameters:[{name:"state_dict",val:""},{name:"transformer",val:""},{name:"adapter_name",val:" = None"},{name:"_pipeline",val:" = None"},{name:"low_cpu_mem_usage",val:" = False"},{name:"hotswap",val:": bool = False"},{name:"metadata",val:" = None"}]}),s(2),o(Nr);var kr=e(Nr,2),tl=r(kr);a(tl,{name:"load_lora_weights",anchor:"diffusers.loaders.Krea2LoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5479",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"adapter_name",val:": str | None = None"},{name:"hotswap",val:": bool = False"},{name:"**kwargs",val:""}]}),s(2),o(kr);var Rr=e(kr,2),dl=r(Rr);a(dl,{name:"lora_state_dict",anchor:"diffusers.loaders.Krea2LoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5418",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(Rr);var Ur=e(Rr,2),ll=r(Ur);a(ll,{name:"save_lora_weights",anchor:"diffusers.loaders.Krea2LoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5552",parameters:[{name:"save_directory",val:": str | os.PathLike"},{name:"transformer_lora_layers",val:": dict = None"},{name:"is_main_process",val:": bool = True"},{name:"weight_name",val:": str = None"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = True"},{name:"transformer_lora_adapter_metadata",val:": dict | None = None"}]}),s(2),o(Ur);var Xs=e(Ur,2),nl=r(Xs);a(nl,{name:"unfuse_lora",anchor:"diffusers.loaders.Krea2LoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_pipeline.py#L5608",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Xs),o(Sr);var js=e(Sr,2);d(js,{title:"LoraBaseMixin",local:"diffusers.loaders.lora_base.LoraBaseMixin",headingTag:"h2"});var Jr=e(js,2),Is=r(Jr);a(Is,{name:"class diffusers.loaders.lora_base.LoraBaseMixin",anchor:"diffusers.loaders.lora_base.LoraBaseMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_base.py#L478",parameters:[]});var Dr=e(Is,4),Gs=r(Dr);a(Gs,{name:"delete_adapters",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.delete_adapters",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_base.py#L840",parameters:[{name:"adapter_names",val:": list[str] | str"}],parametersDescription:[{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.delete_adapters.adapter_names",description:`<strong>adapter_names</strong> (<code>list[str, str]</code>) — | |
| The names of the adapters to delete.`,name:"adapter_names"}]});var cl=e(Gs,4);p(cl,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.delete_adapters.example",children:(t,n)=>{var i=m(),l=e(_(i),2);c(l,{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQXBpcGVsaW5lLmxvYWRfbG9yYV93ZWlnaHRzKCUwQSUyMCUyMCUyMCUyMCUyMmpiaWxja2UtaGYlMkZzZHhsLWNpbmVtYXRpYy0xJTIyJTJDJTIwd2VpZ2h0X25hbWUlM0QlMjJweXRvcmNoX2xvcmFfd2VpZ2h0cy5zYWZldGVuc29ycyUyMiUyQyUyMGFkYXB0ZXJfbmFtZXMlM0QlMjJjaW5lbWF0aWMlMjIlMEEpJTBBcGlwZWxpbmUuZGVsZXRlX2FkYXB0ZXJzKCUyMmNpbmVtYXRpYyUyMik=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image | |
| <span class="hljs-keyword">import</span> torch | |
| pipeline = AutoPipelineForText2Image.from_pretrained( | |
| <span class="hljs-string">"stabilityai/stable-diffusion-xl-base-1.0"</span>, torch_dtype=torch.float16 | |
| ).to(<span class="hljs-string">"cuda"</span>) | |
| pipeline.load_lora_weights( | |
| <span class="hljs-string">"jbilcke-hf/sdxl-cinematic-1"</span>, weight_name=<span class="hljs-string">"pytorch_lora_weights.safetensors"</span>, adapter_names=<span class="hljs-string">"cinematic"</span> | |
| ) | |
| pipeline.delete_adapters(<span class="hljs-string">"cinematic"</span>)`,lang:"py",wrap:!1}),f(t,i)},$$slots:{default:!0}}),o(Dr);var Zr=e(Dr,2),Ws=r(Zr);a(Ws,{name:"disable_lora",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.disable_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_base.py#L780",parameters:[]});var fl=e(Ws,4);p(fl,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.disable_lora.example",children:(t,n)=>{var i=m(),l=e(_(i),2);c(l,{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQXBpcGVsaW5lLmxvYWRfbG9yYV93ZWlnaHRzKCUwQSUyMCUyMCUyMCUyMCUyMmpiaWxja2UtaGYlMkZzZHhsLWNpbmVtYXRpYy0xJTIyJTJDJTIwd2VpZ2h0X25hbWUlM0QlMjJweXRvcmNoX2xvcmFfd2VpZ2h0cy5zYWZldGVuc29ycyUyMiUyQyUyMGFkYXB0ZXJfbmFtZSUzRCUyMmNpbmVtYXRpYyUyMiUwQSklMEFwaXBlbGluZS5kaXNhYmxlX2xvcmEoKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image | |
| <span class="hljs-keyword">import</span> torch | |
| pipeline = AutoPipelineForText2Image.from_pretrained( | |
| <span class="hljs-string">"stabilityai/stable-diffusion-xl-base-1.0"</span>, torch_dtype=torch.float16 | |
| ).to(<span class="hljs-string">"cuda"</span>) | |
| pipeline.load_lora_weights( | |
| <span class="hljs-string">"jbilcke-hf/sdxl-cinematic-1"</span>, weight_name=<span class="hljs-string">"pytorch_lora_weights.safetensors"</span>, adapter_name=<span class="hljs-string">"cinematic"</span> | |
| ) | |
| pipeline.disable_lora()`,lang:"py",wrap:!1}),f(t,i)},$$slots:{default:!0}}),o(Zr);var Fr=e(Zr,2),Bs=r(Fr);a(Bs,{name:"enable_lora",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.enable_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_base.py#L810",parameters:[]});var pl=e(Bs,4);p(pl,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.enable_lora.example",children:(t,n)=>{var i=m(),l=e(_(i),2);c(l,{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQXBpcGVsaW5lLmxvYWRfbG9yYV93ZWlnaHRzKCUwQSUyMCUyMCUyMCUyMCUyMmpiaWxja2UtaGYlMkZzZHhsLWNpbmVtYXRpYy0xJTIyJTJDJTIwd2VpZ2h0X25hbWUlM0QlMjJweXRvcmNoX2xvcmFfd2VpZ2h0cy5zYWZldGVuc29ycyUyMiUyQyUyMGFkYXB0ZXJfbmFtZSUzRCUyMmNpbmVtYXRpYyUyMiUwQSklMEFwaXBlbGluZS5lbmFibGVfbG9yYSgp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image | |
| <span class="hljs-keyword">import</span> torch | |
| pipeline = AutoPipelineForText2Image.from_pretrained( | |
| <span class="hljs-string">"stabilityai/stable-diffusion-xl-base-1.0"</span>, torch_dtype=torch.float16 | |
| ).to(<span class="hljs-string">"cuda"</span>) | |
| pipeline.load_lora_weights( | |
| <span class="hljs-string">"jbilcke-hf/sdxl-cinematic-1"</span>, weight_name=<span class="hljs-string">"pytorch_lora_weights.safetensors"</span>, adapter_name=<span class="hljs-string">"cinematic"</span> | |
| ) | |
| pipeline.enable_lora()`,lang:"py",wrap:!1}),f(t,i)},$$slots:{default:!0}}),o(Fr);var Xr=e(Fr,2),_l=r(Xr);a(_l,{name:"enable_lora_hotswap",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.enable_lora_hotswap",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_base.py#L987",parameters:[{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.enable_lora_hotswap.target_rank",description:`<strong>target_rank</strong> (<code>int</code>) — | |
| The highest rank among all the adapters that will be loaded.`,name:"target_rank"},{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.enable_lora_hotswap.check_compiled",description:`<strong>check_compiled</strong> (<code>str</code>, <em>optional</em>, defaults to <code>"error"</code>) — | |
| How to handle a model that is already compiled. The check can return the following messages: | |
| <ul> | |
| <li>“error” (default): raise an error</li> | |
| <li>“warn”: issue a warning</li> | |
| <li>“ignore”: do nothing</li> | |
| </ul>`,name:"check_compiled"}]}),s(2),o(Xr);var jr=e(Xr,2),Vs=r(jr);a(Vs,{name:"fuse_lora",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_base.py#L536",parameters:[{name:"components",val:": list[str] | None = None"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.fuse_lora.components",description:"<strong>components</strong> — (<code>list[str]</code>): list of LoRA-injectable components to fuse the LoRAs into.",name:"components"},{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.fuse_lora.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>, defaults to 1.0) — | |
| Controls how much to influence the outputs with the LoRA parameters.`,name:"lora_scale"},{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.fuse_lora.safe_fusing",description:`<strong>safe_fusing</strong> (<code>bool</code>, defaults to <code>False</code>) — | |
| Whether to check fused weights for NaN values before fusing and if values are NaN not fusing them.`,name:"safe_fusing"},{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.fuse_lora.adapter_names",description:`<strong>adapter_names</strong> (<code>list[str]</code>, <em>optional</em>) — | |
| Adapter names to be used for fusing. If nothing is passed, all active adapters will be fused.`,name:"adapter_names"}]});var ml=e(Vs,4);p(ml,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.fuse_lora.example",children:(t,n)=>{var i=m(),l=e(_(i),2);c(l,{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMERpZmZ1c2lvblBpcGVsaW5lJTBBaW1wb3J0JTIwdG9yY2glMEElMEFwaXBlbGluZSUyMCUzRCUyMERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJzdGFiaWxpdHlhaSUyRnN0YWJsZS1kaWZmdXNpb24teGwtYmFzZS0xLjAlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMEEpLnRvKCUyMmN1ZGElMjIpJTBBcGlwZWxpbmUubG9hZF9sb3JhX3dlaWdodHMoJTIybmVyaWpzJTJGcGl4ZWwtYXJ0LXhsJTIyJTJDJTIwd2VpZ2h0X25hbWUlM0QlMjJwaXhlbC1hcnQteGwuc2FmZXRlbnNvcnMlMjIlMkMlMjBhZGFwdGVyX25hbWUlM0QlMjJwaXhlbCUyMiklMEFwaXBlbGluZS5mdXNlX2xvcmEobG9yYV9zY2FsZSUzRDAuNyk=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline | |
| <span class="hljs-keyword">import</span> torch | |
| pipeline = DiffusionPipeline.from_pretrained( | |
| <span class="hljs-string">"stabilityai/stable-diffusion-xl-base-1.0"</span>, torch_dtype=torch.float16 | |
| ).to(<span class="hljs-string">"cuda"</span>) | |
| pipeline.load_lora_weights(<span class="hljs-string">"nerijs/pixel-art-xl"</span>, weight_name=<span class="hljs-string">"pixel-art-xl.safetensors"</span>, adapter_name=<span class="hljs-string">"pixel"</span>) | |
| pipeline.fuse_lora(lora_scale=<span class="hljs-number">0.7</span>)`,lang:"py",wrap:!1}),f(t,i)},$$slots:{default:!0}}),o(jr);var Ir=e(jr,2),As=r(Ir);a(As,{name:"get_active_adapters",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.get_active_adapters",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_base.py#L878",parameters:[]});var ul=e(As,4);p(ul,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.get_active_adapters.example",children:(t,n)=>{var i=m(),l=e(_(i),2);c(l,{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMERpZmZ1c2lvblBpcGVsaW5lJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTBBKS50byglMjJjdWRhJTIyKSUwQXBpcGVsaW5lLmxvYWRfbG9yYV93ZWlnaHRzKCUyMkNpcm9OMjAyMiUyRnRveS1mYWNlJTIyJTJDJTIwd2VpZ2h0X25hbWUlM0QlMjJ0b3lfZmFjZV9zZHhsLnNhZmV0ZW5zb3JzJTIyJTJDJTIwYWRhcHRlcl9uYW1lJTNEJTIydG95JTIyKSUwQXBpcGVsaW5lLmdldF9hY3RpdmVfYWRhcHRlcnMoKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline | |
| pipeline = DiffusionPipeline.from_pretrained( | |
| <span class="hljs-string">"stabilityai/stable-diffusion-xl-base-1.0"</span>, | |
| ).to(<span class="hljs-string">"cuda"</span>) | |
| pipeline.load_lora_weights(<span class="hljs-string">"CiroN2022/toy-face"</span>, weight_name=<span class="hljs-string">"toy_face_sdxl.safetensors"</span>, adapter_name=<span class="hljs-string">"toy"</span>) | |
| pipeline.get_active_adapters()`,lang:"python",wrap:!1}),f(t,i)},$$slots:{default:!0}}),o(Ir);var Gr=e(Ir,2),hl=r(Gr);a(hl,{name:"get_list_adapters",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.get_list_adapters",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_base.py#L911",parameters:[]}),s(2),o(Gr);var Wr=e(Gr,2),Cs=r(Wr);a(Cs,{name:"set_adapters",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.set_adapters",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_base.py#L677",parameters:[{name:"adapter_names",val:": list[str] | str"},{name:"adapter_weights",val:": float | dict | list[float] | list[dict] | None = None"}],parametersDescription:[{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.set_adapters.adapter_names",description:`<strong>adapter_names</strong> (<code>list[str]</code> or <code>str</code>) — | |
| The names of the adapters to use.`,name:"adapter_names"},{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.set_adapters.adapter_weights",description:`<strong>adapter_weights</strong> (<code>list[float, float]</code>, <em>optional</em>) — | |
| The adapter(s) weights to use with the UNet. If <code>None</code>, the weights are set to <code>1.0</code> for all the | |
| adapters.`,name:"adapter_weights"}]});var gl=e(Cs,4);p(gl,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.set_adapters.example",children:(t,n)=>{var i=m(),l=e(_(i),2);c(l,{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEF1dG9QaXBlbGluZUZvclRleHQySW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXV0b1BpcGVsaW5lRm9yVGV4dDJJbWFnZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLXhsLWJhc2UtMS4wJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKS50byglMjJjdWRhJTIyKSUwQXBpcGVsaW5lLmxvYWRfbG9yYV93ZWlnaHRzKCUwQSUyMCUyMCUyMCUyMCUyMmpiaWxja2UtaGYlMkZzZHhsLWNpbmVtYXRpYy0xJTIyJTJDJTIwd2VpZ2h0X25hbWUlM0QlMjJweXRvcmNoX2xvcmFfd2VpZ2h0cy5zYWZldGVuc29ycyUyMiUyQyUyMGFkYXB0ZXJfbmFtZSUzRCUyMmNpbmVtYXRpYyUyMiUwQSklMEFwaXBlbGluZS5sb2FkX2xvcmFfd2VpZ2h0cyglMjJuZXJpanMlMkZwaXhlbC1hcnQteGwlMjIlMkMlMjB3ZWlnaHRfbmFtZSUzRCUyMnBpeGVsLWFydC14bC5zYWZldGVuc29ycyUyMiUyQyUyMGFkYXB0ZXJfbmFtZSUzRCUyMnBpeGVsJTIyKSUwQXBpcGVsaW5lLnNldF9hZGFwdGVycyglNUIlMjJjaW5lbWF0aWMlMjIlMkMlMjAlMjJwaXhlbCUyMiU1RCUyQyUyMGFkYXB0ZXJfd2VpZ2h0cyUzRCU1QjAuNSUyQyUyMDAuNSU1RCk=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AutoPipelineForText2Image | |
| <span class="hljs-keyword">import</span> torch | |
| pipeline = AutoPipelineForText2Image.from_pretrained( | |
| <span class="hljs-string">"stabilityai/stable-diffusion-xl-base-1.0"</span>, torch_dtype=torch.float16 | |
| ).to(<span class="hljs-string">"cuda"</span>) | |
| pipeline.load_lora_weights( | |
| <span class="hljs-string">"jbilcke-hf/sdxl-cinematic-1"</span>, weight_name=<span class="hljs-string">"pytorch_lora_weights.safetensors"</span>, adapter_name=<span class="hljs-string">"cinematic"</span> | |
| ) | |
| pipeline.load_lora_weights(<span class="hljs-string">"nerijs/pixel-art-xl"</span>, weight_name=<span class="hljs-string">"pixel-art-xl.safetensors"</span>, adapter_name=<span class="hljs-string">"pixel"</span>) | |
| pipeline.set_adapters([<span class="hljs-string">"cinematic"</span>, <span class="hljs-string">"pixel"</span>], adapter_weights=[<span class="hljs-number">0.5</span>, <span class="hljs-number">0.5</span>])`,lang:"py",wrap:!1}),f(t,i)},$$slots:{default:!0}}),o(Wr);var Br=e(Wr,2),qs=r(Br);a(qs,{name:"set_lora_device",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.set_lora_device",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_base.py#L933",parameters:[{name:"adapter_names",val:": list[str]"},{name:"device",val:": torch.device | str | int"}],parametersDescription:[{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.set_lora_device.adapter_names",description:`<strong>adapter_names</strong> (<code>list[str]</code>) — | |
| list of adapters to send device to.`,name:"adapter_names"},{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.set_lora_device.device",description:`<strong>device</strong> (<code>torch.device | str | int</code>) — | |
| Device to send the adapters to. Can be either a torch device, a str or an integer.`,name:"device"}]});var vl=e(qs,6);p(vl,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.set_lora_device.example",children:(t,n)=>{c(t,{code:"cGlwZS5sb2FkX2xvcmFfd2VpZ2h0cyhwYXRoXzElMkMlMjBhZGFwdGVyX25hbWUlM0QlMjJhZGFwdGVyLTElMjIpJTBBcGlwZS5sb2FkX2xvcmFfd2VpZ2h0cyhwYXRoXzIlMkMlMjBhZGFwdGVyX25hbWUlM0QlMjJhZGFwdGVyLTIlMjIpJTBBcGlwZS5zZXRfYWRhcHRlcnMoJTIyYWRhcHRlci0xJTIyKSUwQWltYWdlXzElMjAlM0QlMjBwaXBlKCoqa3dhcmdzKSUwQSUyMyUyMHN3aXRjaCUyMHRvJTIwYWRhcHRlci0yJTJDJTIwb2ZmbG9hZCUyMGFkYXB0ZXItMSUwQXBpcGVsaW5lLnNldF9sb3JhX2RldmljZShhZGFwdGVyX25hbWVzJTNEJTVCJTIyYWRhcHRlci0xJTIyJTVEJTJDJTIwZGV2aWNlJTNEJTIyY3B1JTIyKSUwQXBpcGVsaW5lLnNldF9sb3JhX2RldmljZShhZGFwdGVyX25hbWVzJTNEJTVCJTIyYWRhcHRlci0yJTIyJTVEJTJDJTIwZGV2aWNlJTNEJTIyY3VkYSUzQTAlMjIpJTBBcGlwZS5zZXRfYWRhcHRlcnMoJTIyYWRhcHRlci0yJTIyKSUwQWltYWdlXzIlMjAlM0QlMjBwaXBlKCoqa3dhcmdzKSUwQSUyMyUyMHN3aXRjaCUyMGJhY2slMjB0byUyMGFkYXB0ZXItMSUyQyUyMG9mZmxvYWQlMjBhZGFwdGVyLTIlMEFwaXBlbGluZS5zZXRfbG9yYV9kZXZpY2UoYWRhcHRlcl9uYW1lcyUzRCU1QiUyMmFkYXB0ZXItMiUyMiU1RCUyQyUyMGRldmljZSUzRCUyMmNwdSUyMiklMEFwaXBlbGluZS5zZXRfbG9yYV9kZXZpY2UoYWRhcHRlcl9uYW1lcyUzRCU1QiUyMmFkYXB0ZXItMSUyMiU1RCUyQyUyMGRldmljZSUzRCUyMmN1ZGElM0EwJTIyKSUwQXBpcGUuc2V0X2FkYXB0ZXJzKCUyMmFkYXB0ZXItMSUyMiklMEEuLi4=",highlighted:`<span class="hljs-meta">>>> </span>pipe.load_lora_weights(path_1, adapter_name=<span class="hljs-string">"adapter-1"</span>) | |
| <span class="hljs-meta">>>> </span>pipe.load_lora_weights(path_2, adapter_name=<span class="hljs-string">"adapter-2"</span>) | |
| <span class="hljs-meta">>>> </span>pipe.set_adapters(<span class="hljs-string">"adapter-1"</span>) | |
| <span class="hljs-meta">>>> </span>image_1 = pipe(**kwargs) | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># switch to adapter-2, offload adapter-1</span> | |
| <span class="hljs-meta">>>> </span>pipeline.set_lora_device(adapter_names=[<span class="hljs-string">"adapter-1"</span>], device=<span class="hljs-string">"cpu"</span>) | |
| <span class="hljs-meta">>>> </span>pipeline.set_lora_device(adapter_names=[<span class="hljs-string">"adapter-2"</span>], device=<span class="hljs-string">"cuda:0"</span>) | |
| <span class="hljs-meta">>>> </span>pipe.set_adapters(<span class="hljs-string">"adapter-2"</span>) | |
| <span class="hljs-meta">>>> </span>image_2 = pipe(**kwargs) | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># switch back to adapter-1, offload adapter-2</span> | |
| <span class="hljs-meta">>>> </span>pipeline.set_lora_device(adapter_names=[<span class="hljs-string">"adapter-2"</span>], device=<span class="hljs-string">"cpu"</span>) | |
| <span class="hljs-meta">>>> </span>pipeline.set_lora_device(adapter_names=[<span class="hljs-string">"adapter-1"</span>], device=<span class="hljs-string">"cuda:0"</span>) | |
| <span class="hljs-meta">>>> </span>pipe.set_adapters(<span class="hljs-string">"adapter-1"</span>) | |
| <span class="hljs-meta">>>> </span>...`,lang:"python",wrap:!1})},$$slots:{default:!0}}),o(Br);var Vr=e(Br,2),bl=r(Vr);a(bl,{name:"unfuse_lora",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_base.py#L623",parameters:[{name:"components",val:": list[str] | None = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.unfuse_lora.components",description:"<strong>components</strong> (<code>list[str]</code>) — list of LoRA-injectable components to unfuse LoRA from.",name:"components"},{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.unfuse_lora.unfuse_unet",description:"<strong>unfuse_unet</strong> (<code>bool</code>, defaults to <code>True</code>) — Whether to unfuse the UNet LoRA parameters.",name:"unfuse_unet"},{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.unfuse_lora.unfuse_text_encoder",description:`<strong>unfuse_text_encoder</strong> (<code>bool</code>, defaults to <code>True</code>) — | |
| Whether to unfuse the text encoder LoRA parameters. If the text encoder wasn’t monkey-patched with the | |
| LoRA parameters then it won’t have any effect.`,name:"unfuse_text_encoder"}]}),s(2),o(Vr);var Ar=e(Vr,2),Ys=r(Ar);a(Ys,{name:"unload_lora_weights",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.unload_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_base.py#L513",parameters:[]});var Ll=e(Ys,4);p(Ll,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.unload_lora_weights.example",children:(t,n)=>{var i=Cr(),l=e(_(i),2);c(l,{code:"JTIzJTIwQXNzdW1pbmclMjAlNjBwaXBlbGluZSU2MCUyMGlzJTIwYWxyZWFkeSUyMGxvYWRlZCUyMHdpdGglMjB0aGUlMjBMb1JBJTIwcGFyYW1ldGVycy4lMEFwaXBlbGluZS51bmxvYWRfbG9yYV93ZWlnaHRzKCklMEEuLi4=",highlighted:'<span class="hljs-meta">>>> </span><span class="hljs-comment"># Assuming `pipeline` is already loaded with the LoRA parameters.</span>\n<span class="hljs-meta">>>> </span>pipeline.unload_lora_weights()\n<span class="hljs-meta">>>> </span>...',lang:"python",wrap:!1}),f(t,i)},$$slots:{default:!0}}),o(Ar);var zs=e(Ar,2),xl=r(zs);a(xl,{name:"write_lora_layers",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.write_lora_layers",source:"https://github.com/huggingface/diffusers/blob/vr_14358/src/diffusers/loaders/lora_base.py#L1010",parameters:[{name:"state_dict",val:": dict[str, torch.Tensor]"},{name:"save_directory",val:": str"},{name:"is_main_process",val:": bool"},{name:"weight_name",val:": str"},{name:"save_function",val:": Callable"},{name:"safe_serialization",val:": bool"},{name:"lora_adapter_metadata",val:": dict | None = None"}]}),s(2),o(zs),o(Jr);var yl=e(Jr,2);Tl(yl,{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/loaders/lora.md"}),s(2),f(Qs,qr),Ul()}export{Gl as component}; | |
Xet Storage Details
- Size:
- 235 kB
- Xet hash:
- a0575686c95aa11fc139c8a0fb9791738ab27da916a98443ffc376100b8b00ee
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.