Buckets:
| import"../chunks/DsnmJJEf.js";import{i as ll,h as nl,C as cl,H as d,D as a,E as fl,s as pl,a as c}from"../chunks/CmJXCtRL.js";import{p as _l,o as ml,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/DK803DsY.js";import{E as p}from"../chunks/Bu2vAape.js";const hl='{"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":"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 gl=u('<meta name="hf:doc:metadata"/>'),m=u("<p>Example:</p> <!>",1),Ir=u("<p>Examples:</p> <!>",1),vl=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_13881/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>, for example) or a Transformer (<a href="/docs/diffusers/pr_13881/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>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> <blockquote class="warning"><p>> This is an experimental API.</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>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> <blockquote class="warning"><p>> This is an experimental API.</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>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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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> <blockquote class="warning"><p>> This is an experimental API.</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>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_13881/en/api/models/flux2_transformer#diffusers.Flux2Transformer2DModel">Flux2Transformer2DModel</a>. Specific to <a href="/docs/diffusers/pr_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/en/api/models/ltx2_video_transformer3d#diffusers.LTX2VideoTransformer3DModel">LTX2VideoTransformer3DModel</a>. Specific to <a href="/docs/diffusers/pr_13881/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_13881/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_13881/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_13881/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_13881/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_13881/en/api/models/cogvideox_transformer3d#diffusers.CogVideoXTransformer3DModel">CogVideoXTransformer3DModel</a>. Specific to <a href="/docs/diffusers/pr_13881/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_13881/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_13881/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_13881/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_13881/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_13881/en/api/models/mochi_transformer3d#diffusers.MochiTransformer3DModel">MochiTransformer3DModel</a>. Specific to <a href="/docs/diffusers/pr_13881/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_13881/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_13881/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_13881/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_13881/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_13881/en/api/models/aura_flow_transformer2d#diffusers.AuraFlowTransformer2DModel">AuraFlowTransformer2DModel</a> Specific to <a href="/docs/diffusers/pr_13881/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_13881/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_13881/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_13881/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_13881/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_13881/en/api/models/ltx_video_transformer3d#diffusers.LTXVideoTransformer3DModel">LTXVideoTransformer3DModel</a>. Specific to <a href="/docs/diffusers/pr_13881/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_13881/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_13881/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_13881/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_13881/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_13881/en/api/models/sana_transformer2d#diffusers.SanaTransformer2DModel">SanaTransformer2DModel</a>. Specific to <a href="/docs/diffusers/pr_13881/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_13881/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_13881/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_13881/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_13881/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_13881/en/api/models/helios_transformer3d#diffusers.HeliosTransformer3DModel">HeliosTransformer3DModel</a>. Specific to <a href="/docs/diffusers/pr_13881/en/api/pipelines/helios#diffusers.HeliosPipeline">HeliosPipeline</a> and <a href="/docs/diffusers/pr_13881/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_13881/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_13881/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_13881/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_13881/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_13881/en/api/models/hunyuan_video_transformer_3d#diffusers.HunyuanVideoTransformer3DModel">HunyuanVideoTransformer3DModel</a>. Specific to <a href="/docs/diffusers/pr_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/en/api/models/wan_transformer_3d#diffusers.WanTransformer3DModel">WanTransformer3DModel</a>. Specific to <a href="/docs/diffusers/pr_13881/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_13881/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_13881/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_13881/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_13881/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_13881/en/api/models/wan_transformer_3d#diffusers.WanTransformer3DModel">WanTransformer3DModel</a>. Specific to <a href="/docs/diffusers/pr_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/en/api/models/cosmos_transformer3d#diffusers.CosmosTransformer3DModel">CosmosTransformer3DModel</a> and <a href="/docs/diffusers/pr_13881/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_13881/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_13881/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_13881/en/api/models/hidream_image_transformer#diffusers.HiDreamImageTransformer2DModel">HiDreamImageTransformer2DModel</a>. Specific to <a href="/docs/diffusers/pr_13881/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_13881/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_13881/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_13881/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_13881/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_13881/en/api/models/qwenimage_transformer2d#diffusers.QwenImageTransformer2DModel">QwenImageTransformer2DModel</a>. Specific to <a href="/docs/diffusers/pr_13881/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_13881/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_13881/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_13881/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_13881/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_13881/en/api/models/z_image_transformer2d#diffusers.ZImageTransformer2DModel">ZImageTransformer2DModel</a>. Specific to <a href="/docs/diffusers/pr_13881/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_13881/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_13881/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_13881/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_13881/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_13881/en/api/models/cosmos_transformer3d#diffusers.CosmosTransformer3DModel">CosmosTransformer3DModel</a>, Specific to <a href="/docs/diffusers/pr_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/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_13881/en/api/models/ideogram4_transformer2d#diffusers.Ideogram4Transformer2DModel">Ideogram4Transformer2DModel</a>. Specific to <a href="/docs/diffusers/pr_13881/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_13881/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_13881/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_13881/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_13881/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_13881/en/api/models/krea2_transformer2d#diffusers.Krea2Transformer2DModel">Krea2Transformer2DModel</a>. Specific to <a href="/docs/diffusers/pr_13881/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_13881/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_13881/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_13881/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_13881/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> <blockquote class="warning"><p>> This is an experimental API.</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>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> <blockquote class="warning"><p>> This is an experimental API.</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>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 wl(Gs,Ws){_l(Ws,!1),ml(()=>{new URLSearchParams(window.location.search).get("fw")}),ll();var Gr=vl();nl("yjofn9",t=>{var n=gl();pl(n,"content",hl),f(t,n)});var Wr=e(_(Gr),2);cl(Wr,{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"});var Br=e(Wr,2);d(Br,{title:"LoRA",local:"lora",headingTag:"h1"});var Vr=e(Br,8);d(Vr,{title:"LoraBaseMixin",local:"diffusers.loaders.lora_base.LoraBaseMixin",headingTag:"h2"});var h=e(Vr,2),Cr=r(h);a(Cr,{name:"class diffusers.loaders.lora_base.LoraBaseMixin",anchor:"diffusers.loaders.lora_base.LoraBaseMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_base.py#L479",parameters:[]});var g=e(Cr,4),Ar=r(g);a(Ar,{name:"delete_adapters",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.delete_adapters",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_base.py#L845",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 Bs=e(Ar,4);p(Bs,{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),qr=r(v);a(qr,{name:"disable_lora",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.disable_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_base.py#L785",parameters:[]});var Vs=e(qr,4);p(Vs,{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),Yr=r(b);a(Yr,{name:"enable_lora",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.enable_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_base.py#L815",parameters:[]});var Cs=e(Yr,4);p(Cs,{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),As=r(L);a(As,{name:"enable_lora_hotswap",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.enable_lora_hotswap",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_base.py#L992",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),Qr=r(x);a(Qr,{name:"fuse_lora",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_base.py#L537",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 qs=e(Qr,6);p(qs,{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),zr=r(y);a(zr,{name:"get_active_adapters",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.get_active_adapters",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_base.py#L883",parameters:[]});var Ys=e(zr,4);p(Ys,{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),Qs=r(w);a(Qs,{name:"get_list_adapters",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.get_list_adapters",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_base.py#L916",parameters:[]}),s(2),o(w);var M=e(w,2),Pr=r(M);a(Pr,{name:"set_adapters",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.set_adapters",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_base.py#L682",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 zs=e(Pr,4);p(zs,{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),Er=r(S);a(Er,{name:"set_lora_device",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.set_lora_device",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_base.py#L938",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 Ps=e(Er,6);p(Ps,{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),Es=r(T);a(Es,{name:"unfuse_lora",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_base.py#L626",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(4),o(T);var N=e(T,2),Hr=r(N);a(Hr,{name:"unload_lora_weights",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.unload_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_base.py#L514",parameters:[]});var Hs=e(Hr,4);p(Hs,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.unload_lora_weights.example",children:(t,n)=>{var i=Ir(),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 Kr=e(N,2),Ks=r(Kr);a(Ks,{name:"write_lora_layers",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.write_lora_layers",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_base.py#L1015",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(Kr),o(h);var $r=e(h,2);d($r,{title:"StableDiffusionLoraLoaderMixin",local:"diffusers.loaders.StableDiffusionLoraLoaderMixin",headingTag:"h2"});var k=e($r,2),Or=r(k);a(Or,{name:"class diffusers.loaders.StableDiffusionLoraLoaderMixin",anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L136",parameters:[]});var U=e(Or,4),$s=r(U);a($s,{name:"load_lora_into_text_encoder",anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_text_encoder",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L419",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_13881/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(U);var R=e(U,2),Os=r(R);a(Os,{name:"load_lora_into_unet",anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L358",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_13881/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(R);var J=e(R,2),ei=r(J);a(ei,{name:"load_lora_weights",anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L146",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_13881/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),ai=r(D);a(ai,{name:"lora_state_dict",anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L247",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_13881/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 eo=e(D,2),ri=r(eo);a(ri,{name:"save_lora_weights",anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L477",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(eo),o(k);var ao=e(k,2);d(ao,{title:"StableDiffusionXLLoraLoaderMixin",local:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin",headingTag:"h2"});var Z=e(ao,2),ro=r(Z);a(ro,{name:"class diffusers.loaders.StableDiffusionXLLoraLoaderMixin",anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L600",parameters:[]});var X=e(ro,4),oi=r(X);a(oi,{name:"fuse_lora",anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L966",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(X);var F=e(X,2),si=r(F);a(si,{name:"load_lora_into_text_encoder",anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_into_text_encoder",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L859",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_13881/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(F);var j=e(F,2),ii=r(j);a(ii,{name:"load_lora_into_unet",anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_into_unet",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L797",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_13881/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),ti=r(I);a(ti,{name:"load_lora_weights",anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L611",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),di=r(G);a(di,{name:"lora_state_dict",anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L685",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_13881/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),li=r(W);a(li,{name:"save_lora_weights",anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L918",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 oo=e(W,2),ni=r(oo);a(ni,{name:"unfuse_lora",anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L985",parameters:[{name:"components",val:": list = ['unet', 'text_encoder', 'text_encoder_2']"},{name:"**kwargs",val:""}]}),s(2),o(oo),o(Z);var so=e(Z,2);d(so,{title:"SD3LoraLoaderMixin",local:"diffusers.loaders.SD3LoraLoaderMixin",headingTag:"h2"});var B=e(so,2),io=r(B);a(io,{name:"class diffusers.loaders.SD3LoraLoaderMixin",anchor:"diffusers.loaders.SD3LoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L992",parameters:[]});var V=e(io,6),ci=r(V);a(ci,{name:"fuse_lora",anchor:"diffusers.loaders.SD3LoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L1264",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 C=e(V,2),fi=r(C);a(fi,{name:"load_lora_into_text_encoder",anchor:"diffusers.loaders.SD3LoraLoaderMixin.load_lora_into_text_encoder",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L1155",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_13881/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(C);var A=e(C,2),pi=r(A);a(pi,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.SD3LoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L1124",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(A);var q=e(A,2),_i=r(q);a(_i,{name:"load_lora_weights",anchor:"diffusers.loaders.SD3LoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L1059",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),mi=r(Y);a(mi,{name:"lora_state_dict",anchor:"diffusers.loaders.SD3LoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L1005",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(Y);var Q=e(Y,2),ui=r(Q);a(ui,{name:"save_lora_weights",anchor:"diffusers.loaders.SD3LoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L1214",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(Q);var to=e(Q,2),hi=r(to);a(hi,{name:"unfuse_lora",anchor:"diffusers.loaders.SD3LoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L1284",parameters:[{name:"components",val:": list = ['transformer', 'text_encoder', 'text_encoder_2']"},{name:"**kwargs",val:""}]}),s(2),o(to),o(B);var lo=e(B,2);d(lo,{title:"FluxLoraLoaderMixin",local:"diffusers.loaders.FluxLoraLoaderMixin",headingTag:"h2"});var z=e(lo,2),no=r(z);a(no,{name:"class diffusers.loaders.FluxLoraLoaderMixin",anchor:"diffusers.loaders.FluxLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L1491",parameters:[]});var P=e(no,6),gi=r(P);a(gi,{name:"fuse_lora",anchor:"diffusers.loaders.FluxLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L1940",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),vi=r(E);a(vi,{name:"load_lora_into_text_encoder",anchor:"diffusers.loaders.FluxLoraLoaderMixin.load_lora_into_text_encoder",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L1817",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_13881/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),bi=r(H);a(bi,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.FluxLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L1731",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),Li=r(K);a(Li,{name:"load_lora_weights",anchor:"diffusers.loaders.FluxLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L1629",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),xi=r($);a(xi,{name:"lora_state_dict",anchor:"diffusers.loaders.FluxLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L1504",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),yi=r(O);a(yi,{name:"save_lora_weights",anchor:"diffusers.loaders.FluxLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L1876",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),wi=r(ee);a(wi,{name:"unfuse_lora",anchor:"diffusers.loaders.FluxLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L1972",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(4),o(ee);var co=e(ee,2),fo=r(co);a(fo,{name:"unload_lora_weights",anchor:"diffusers.loaders.FluxLoraLoaderMixin.unload_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L1989",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 Mi=e(fo,4);p(Mi,{anchor:"diffusers.loaders.FluxLoraLoaderMixin.unload_lora_weights.example",children:(t,n)=>{var i=Ir(),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(co),o(z);var po=e(z,2);d(po,{title:"Flux2LoraLoaderMixin",local:"diffusers.loaders.Flux2LoraLoaderMixin",headingTag:"h2"});var ae=e(po,2),_o=r(ae);a(_o,{name:"class diffusers.loaders.Flux2LoraLoaderMixin",anchor:"diffusers.loaders.Flux2LoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6014",parameters:[]});var re=e(_o,4),Si=r(re);a(Si,{name:"fuse_lora",anchor:"diffusers.loaders.Flux2LoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6201",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),Ti=r(oe);a(Ti,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.Flux2LoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6133",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),Ni=r(se);a(Ni,{name:"load_lora_weights",anchor:"diffusers.loaders.Flux2LoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6092",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),ki=r(ie);a(ki,{name:"lora_state_dict",anchor:"diffusers.loaders.Flux2LoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6022",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),Ui=r(te);a(Ui,{name:"save_lora_weights",anchor:"diffusers.loaders.Flux2LoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6165",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 mo=e(te,2),Ri=r(mo);a(Ri,{name:"unfuse_lora",anchor:"diffusers.loaders.Flux2LoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6221",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(mo),o(ae);var uo=e(ae,2);d(uo,{title:"ErnieImageLoraLoaderMixin",local:"diffusers.loaders.ErnieImageLoraLoaderMixin",headingTag:"h2"});var de=e(uo,2),ho=r(de);a(ho,{name:"class diffusers.loaders.ErnieImageLoraLoaderMixin",anchor:"diffusers.loaders.ErnieImageLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6435",parameters:[]});var le=e(ho,4),Ji=r(le);a(Ji,{name:"fuse_lora",anchor:"diffusers.loaders.ErnieImageLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6619",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),Di=r(ne);a(Di,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.ErnieImageLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6551",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),Zi=r(ce);a(Zi,{name:"load_lora_weights",anchor:"diffusers.loaders.ErnieImageLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6510",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),Xi=r(fe);a(Xi,{name:"lora_state_dict",anchor:"diffusers.loaders.ErnieImageLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6443",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),Fi=r(pe);a(Fi,{name:"save_lora_weights",anchor:"diffusers.loaders.ErnieImageLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6583",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 go=e(pe,2),ji=r(go);a(ji,{name:"unfuse_lora",anchor:"diffusers.loaders.ErnieImageLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6639",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(go),o(de);var vo=e(de,2);d(vo,{title:"LTX2LoraLoaderMixin",local:"diffusers.loaders.LTX2LoraLoaderMixin",headingTag:"h2"});var _e=e(vo,2),bo=r(_e);a(bo,{name:"class diffusers.loaders.LTX2LoraLoaderMixin",anchor:"diffusers.loaders.LTX2LoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3020",parameters:[]});var me=e(bo,4),Ii=r(me);a(Ii,{name:"fuse_lora",anchor:"diffusers.loaders.LTX2LoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3220",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),Gi=r(ue);a(Gi,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.LTX2LoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3151",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),Wi=r(he);a(Wi,{name:"load_lora_weights",anchor:"diffusers.loaders.LTX2LoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3093",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),Bi=r(ge);a(Bi,{name:"lora_state_dict",anchor:"diffusers.loaders.LTX2LoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3029",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),Vi=r(ve);a(Vi,{name:"save_lora_weights",anchor:"diffusers.loaders.LTX2LoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3184",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 Lo=e(ve,2),Ci=r(Lo);a(Ci,{name:"unfuse_lora",anchor:"diffusers.loaders.LTX2LoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3240",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Lo),o(_e);var xo=e(_e,2);d(xo,{title:"CogVideoXLoraLoaderMixin",local:"diffusers.loaders.CogVideoXLoraLoaderMixin",headingTag:"h2"});var be=e(xo,2),yo=r(be);a(yo,{name:"class diffusers.loaders.CogVideoXLoraLoaderMixin",anchor:"diffusers.loaders.CogVideoXLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L2421",parameters:[]});var Le=e(yo,4),Ai=r(Le);a(Ai,{name:"fuse_lora",anchor:"diffusers.loaders.CogVideoXLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L2591",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),qi=r(xe);a(qi,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.CogVideoXLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L2525",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),Yi=r(ye);a(Yi,{name:"load_lora_weights",anchor:"diffusers.loaders.CogVideoXLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L2484",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),Qi=r(we);a(Qi,{name:"lora_state_dict",anchor:"diffusers.loaders.CogVideoXLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L2429",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),zi=r(Me);a(zi,{name:"save_lora_weights",anchor:"diffusers.loaders.CogVideoXLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L2557",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 wo=e(Me,2),Pi=r(wo);a(Pi,{name:"unfuse_lora",anchor:"diffusers.loaders.CogVideoXLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L2610",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(wo),o(be);var Mo=e(be,2);d(Mo,{title:"Mochi1LoraLoaderMixin",local:"diffusers.loaders.Mochi1LoraLoaderMixin",headingTag:"h2"});var Se=e(Mo,2),So=r(Se);a(So,{name:"class diffusers.loaders.Mochi1LoraLoaderMixin",anchor:"diffusers.loaders.Mochi1LoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L2617",parameters:[]});var Te=e(So,4),Ei=r(Te);a(Ei,{name:"fuse_lora",anchor:"diffusers.loaders.Mochi1LoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L2790",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),Hi=r(Ne);a(Hi,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.Mochi1LoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L2722",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),Ki=r(ke);a(Ki,{name:"load_lora_weights",anchor:"diffusers.loaders.Mochi1LoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L2681",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 Ue=e(ke,2),$i=r(Ue);a($i,{name:"lora_state_dict",anchor:"diffusers.loaders.Mochi1LoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L2625",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(Ue);var Re=e(Ue,2),Oi=r(Re);a(Oi,{name:"save_lora_weights",anchor:"diffusers.loaders.Mochi1LoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L2754",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(Re);var To=e(Re,2),et=r(To);a(et,{name:"unfuse_lora",anchor:"diffusers.loaders.Mochi1LoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L2810",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(To),o(Se);var No=e(Se,2);d(No,{title:"AuraFlowLoraLoaderMixin",local:"diffusers.loaders.AuraFlowLoraLoaderMixin",headingTag:"h2"});var Je=e(No,2),ko=r(Je);a(ko,{name:"class diffusers.loaders.AuraFlowLoraLoaderMixin",anchor:"diffusers.loaders.AuraFlowLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L1291",parameters:[]});var De=e(ko,4),at=r(De);a(at,{name:"fuse_lora",anchor:"diffusers.loaders.AuraFlowLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L1464",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),rt=r(Ze);a(rt,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.AuraFlowLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L1396",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 Xe=e(Ze,2),ot=r(Xe);a(ot,{name:"load_lora_weights",anchor:"diffusers.loaders.AuraFlowLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L1355",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(Xe);var Fe=e(Xe,2),st=r(Fe);a(st,{name:"lora_state_dict",anchor:"diffusers.loaders.AuraFlowLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L1299",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(Fe);var je=e(Fe,2),it=r(je);a(it,{name:"save_lora_weights",anchor:"diffusers.loaders.AuraFlowLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L1428",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 Uo=e(je,2),tt=r(Uo);a(tt,{name:"unfuse_lora",anchor:"diffusers.loaders.AuraFlowLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L1484",parameters:[{name:"components",val:": list = ['transformer', 'text_encoder']"},{name:"**kwargs",val:""}]}),s(2),o(Uo),o(Je);var Ro=e(Je,2);d(Ro,{title:"LTXVideoLoraLoaderMixin",local:"diffusers.loaders.LTXVideoLoraLoaderMixin",headingTag:"h2"});var Ie=e(Ro,2),Jo=r(Ie);a(Jo,{name:"class diffusers.loaders.LTXVideoLoraLoaderMixin",anchor:"diffusers.loaders.LTXVideoLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L2817",parameters:[]});var Ge=e(Jo,4),dt=r(Ge);a(dt,{name:"fuse_lora",anchor:"diffusers.loaders.LTXVideoLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L2993",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),lt=r(We);a(lt,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.LTXVideoLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L2925",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),nt=r(Be);a(nt,{name:"load_lora_weights",anchor:"diffusers.loaders.LTXVideoLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L2884",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),ct=r(Ve);a(ct,{name:"lora_state_dict",anchor:"diffusers.loaders.LTXVideoLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L2825",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(Ve);var Ce=e(Ve,2),ft=r(Ce);a(ft,{name:"save_lora_weights",anchor:"diffusers.loaders.LTXVideoLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L2957",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(Ce);var Do=e(Ce,2),pt=r(Do);a(pt,{name:"unfuse_lora",anchor:"diffusers.loaders.LTXVideoLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3013",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Do),o(Ie);var Zo=e(Ie,2);d(Zo,{title:"SanaLoraLoaderMixin",local:"diffusers.loaders.SanaLoraLoaderMixin",headingTag:"h2"});var Ae=e(Zo,2),Xo=r(Ae);a(Xo,{name:"class diffusers.loaders.SanaLoraLoaderMixin",anchor:"diffusers.loaders.SanaLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3247",parameters:[]});var qe=e(Xo,4),_t=r(qe);a(_t,{name:"fuse_lora",anchor:"diffusers.loaders.SanaLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3420",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),mt=r(Ye);a(mt,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.SanaLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3352",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 Qe=e(Ye,2),ut=r(Qe);a(ut,{name:"load_lora_weights",anchor:"diffusers.loaders.SanaLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3311",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(Qe);var ze=e(Qe,2),ht=r(ze);a(ht,{name:"lora_state_dict",anchor:"diffusers.loaders.SanaLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3255",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(ze);var Pe=e(ze,2),gt=r(Pe);a(gt,{name:"save_lora_weights",anchor:"diffusers.loaders.SanaLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3384",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 Fo=e(Pe,2),vt=r(Fo);a(vt,{name:"unfuse_lora",anchor:"diffusers.loaders.SanaLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3440",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Fo),o(Ae);var jo=e(Ae,2);d(jo,{title:"HeliosLoraLoaderMixin",local:"diffusers.loaders.HeliosLoraLoaderMixin",headingTag:"h2"});var Ee=e(jo,2),Io=r(Ee);a(Io,{name:"class diffusers.loaders.HeliosLoraLoaderMixin",anchor:"diffusers.loaders.HeliosLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3447",parameters:[]});var He=e(Io,4),bt=r(He);a(bt,{name:"fuse_lora",anchor:"diffusers.loaders.HeliosLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3621",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),Lt=r(Ke);a(Lt,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.HeliosLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3553",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),xt=r($e);a(xt,{name:"load_lora_weights",anchor:"diffusers.loaders.HeliosLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3513",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),yt=r(Oe);a(yt,{name:"lora_state_dict",anchor:"diffusers.loaders.HeliosLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3455",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),wt=r(ea);a(wt,{name:"save_lora_weights",anchor:"diffusers.loaders.HeliosLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3585",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 Go=e(ea,2),Mt=r(Go);a(Mt,{name:"unfuse_lora",anchor:"diffusers.loaders.HeliosLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3641",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Go),o(Ee);var Wo=e(Ee,2);d(Wo,{title:"HunyuanVideoLoraLoaderMixin",local:"diffusers.loaders.HunyuanVideoLoraLoaderMixin",headingTag:"h2"});var aa=e(Wo,2),Bo=r(aa);a(Bo,{name:"class diffusers.loaders.HunyuanVideoLoraLoaderMixin",anchor:"diffusers.loaders.HunyuanVideoLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3648",parameters:[]});var ra=e(Bo,4),St=r(ra);a(St,{name:"fuse_lora",anchor:"diffusers.loaders.HunyuanVideoLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3824",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),Tt=r(oa);a(Tt,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.HunyuanVideoLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3756",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),Nt=r(sa);a(Nt,{name:"load_lora_weights",anchor:"diffusers.loaders.HunyuanVideoLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3715",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),kt=r(ia);a(kt,{name:"lora_state_dict",anchor:"diffusers.loaders.HunyuanVideoLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3656",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),Ut=r(ta);a(Ut,{name:"save_lora_weights",anchor:"diffusers.loaders.HunyuanVideoLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3788",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 Vo=e(ta,2),Rt=r(Vo);a(Rt,{name:"unfuse_lora",anchor:"diffusers.loaders.HunyuanVideoLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3844",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Vo),o(aa);var Co=e(aa,2);d(Co,{title:"Lumina2LoraLoaderMixin",local:"diffusers.loaders.Lumina2LoraLoaderMixin",headingTag:"h2"});var da=e(Co,2),Ao=r(da);a(Ao,{name:"class diffusers.loaders.Lumina2LoraLoaderMixin",anchor:"diffusers.loaders.Lumina2LoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3851",parameters:[]});var la=e(Ao,4),Jt=r(la);a(Jt,{name:"fuse_lora",anchor:"diffusers.loaders.Lumina2LoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4028",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),Dt=r(na);a(Dt,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.Lumina2LoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3960",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),Zt=r(ca);a(Zt,{name:"load_lora_weights",anchor:"diffusers.loaders.Lumina2LoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3919",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),Xt=r(fa);a(Xt,{name:"lora_state_dict",anchor:"diffusers.loaders.Lumina2LoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3859",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),Ft=r(pa);a(Ft,{name:"save_lora_weights",anchor:"diffusers.loaders.Lumina2LoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L3992",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 qo=e(pa,2),jt=r(qo);a(jt,{name:"unfuse_lora",anchor:"diffusers.loaders.Lumina2LoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4048",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(qo),o(da);var Yo=e(da,2);d(Yo,{title:"CogView4LoraLoaderMixin",local:"diffusers.loaders.CogView4LoraLoaderMixin",headingTag:"h2"});var _a=e(Yo,2),Qo=r(_a);a(Qo,{name:"class diffusers.loaders.CogView4LoraLoaderMixin",anchor:"diffusers.loaders.CogView4LoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4806",parameters:[]});var ma=e(Qo,4),It=r(ma);a(It,{name:"fuse_lora",anchor:"diffusers.loaders.CogView4LoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4979",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),Gt=r(ua);a(Gt,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.CogView4LoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4911",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),Wt=r(ha);a(Wt,{name:"load_lora_weights",anchor:"diffusers.loaders.CogView4LoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4870",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),Bt=r(ga);a(Bt,{name:"lora_state_dict",anchor:"diffusers.loaders.CogView4LoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4814",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),Vt=r(va);a(Vt,{name:"save_lora_weights",anchor:"diffusers.loaders.CogView4LoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4943",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 zo=e(va,2),Ct=r(zo);a(Ct,{name:"unfuse_lora",anchor:"diffusers.loaders.CogView4LoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4999",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(zo),o(_a);var Po=e(_a,2);d(Po,{title:"WanLoraLoaderMixin",local:"diffusers.loaders.WanLoraLoaderMixin",headingTag:"h2"});var ba=e(Po,2),Eo=r(ba);a(Eo,{name:"class diffusers.loaders.WanLoraLoaderMixin",anchor:"diffusers.loaders.WanLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4255",parameters:[]});var La=e(Eo,4),At=r(La);a(At,{name:"fuse_lora",anchor:"diffusers.loaders.WanLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4502",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),qt=r(xa);a(qt,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.WanLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4434",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),Yt=r(ya);a(Yt,{name:"load_lora_weights",anchor:"diffusers.loaders.WanLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4369",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),Qt=r(wa);a(Qt,{name:"lora_state_dict",anchor:"diffusers.loaders.WanLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4263",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),zt=r(Ma);a(zt,{name:"save_lora_weights",anchor:"diffusers.loaders.WanLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4466",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 Ho=e(Ma,2),Pt=r(Ho);a(Pt,{name:"unfuse_lora",anchor:"diffusers.loaders.WanLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4522",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Ho),o(ba);var Ko=e(ba,2);d(Ko,{title:"SkyReelsV2LoraLoaderMixin",local:"diffusers.loaders.SkyReelsV2LoraLoaderMixin",headingTag:"h2"});var Sa=e(Ko,2),$o=r(Sa);a($o,{name:"class diffusers.loaders.SkyReelsV2LoraLoaderMixin",anchor:"diffusers.loaders.SkyReelsV2LoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4529",parameters:[]});var Ta=e($o,4),Et=r(Ta);a(Et,{name:"fuse_lora",anchor:"diffusers.loaders.SkyReelsV2LoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4779",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),Ht=r(Na);a(Ht,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.SkyReelsV2LoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4711",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),Kt=r(ka);a(Kt,{name:"load_lora_weights",anchor:"diffusers.loaders.SkyReelsV2LoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4646",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 Ua=e(ka,2),$t=r(Ua);a($t,{name:"lora_state_dict",anchor:"diffusers.loaders.SkyReelsV2LoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4537",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(Ua);var Ra=e(Ua,2),Ot=r(Ra);a(Ot,{name:"save_lora_weights",anchor:"diffusers.loaders.SkyReelsV2LoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4743",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(Ra);var Oo=e(Ra,2),ed=r(Oo);a(ed,{name:"unfuse_lora",anchor:"diffusers.loaders.SkyReelsV2LoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4799",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Oo),o(Sa);var es=e(Sa,2);d(es,{title:"AmusedLoraLoaderMixin",local:"diffusers.loaders.AmusedLoraLoaderMixin",headingTag:"h2"});var Ja=e(es,2),as=r(Ja);a(as,{name:"class diffusers.loaders.AmusedLoraLoaderMixin",anchor:"diffusers.loaders.AmusedLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L2269",parameters:[]});var Da=e(as,2),ad=r(Da);a(ad,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.AmusedLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L2274",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 rs=e(Da,2),rd=r(rs);a(rd,{name:"save_lora_weights",anchor:"diffusers.loaders.AmusedLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L2366",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(rs),o(Ja);var os=e(Ja,2);d(os,{title:"AnimaLoraLoaderMixin",local:"diffusers.loaders.AnimaLoraLoaderMixin",headingTag:"h2"});var Za=e(os,2),ss=r(Za);a(ss,{name:"class diffusers.loaders.AnimaLoraLoaderMixin",anchor:"diffusers.loaders.AnimaLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5826",parameters:[]});var Xa=e(ss,4),od=r(Xa);a(od,{name:"fuse_lora",anchor:"diffusers.loaders.AnimaLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5988",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(Xa);var Fa=e(Xa,2),sd=r(Fa);a(sd,{name:"load_lora_weights",anchor:"diffusers.loaders.AnimaLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5891",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(Fa);var ja=e(Fa,2),id=r(ja);a(id,{name:"lora_state_dict",anchor:"diffusers.loaders.AnimaLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5835",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(ja);var is=e(ja,2),td=r(is);a(td,{name:"unfuse_lora",anchor:"diffusers.loaders.AnimaLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6007",parameters:[{name:"components",val:": list = ['transformer', 'text_conditioner']"},{name:"**kwargs",val:""}]}),s(2),o(is),o(Za);var ts=e(Za,2);d(ts,{title:"HiDreamImageLoraLoaderMixin",local:"diffusers.loaders.HiDreamImageLoraLoaderMixin",headingTag:"h2"});var Ia=e(ts,2),ds=r(Ia);a(ds,{name:"class diffusers.loaders.HiDreamImageLoraLoaderMixin",anchor:"diffusers.loaders.HiDreamImageLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5006",parameters:[]});var Ga=e(ds,4),dd=r(Ga);a(dd,{name:"fuse_lora",anchor:"diffusers.loaders.HiDreamImageLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5182",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),ld=r(Wa);a(ld,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.HiDreamImageLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5114",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),nd=r(Ba);a(nd,{name:"load_lora_weights",anchor:"diffusers.loaders.HiDreamImageLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5073",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),cd=r(Va);a(cd,{name:"lora_state_dict",anchor:"diffusers.loaders.HiDreamImageLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5014",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(Va);var Ca=e(Va,2),fd=r(Ca);a(fd,{name:"save_lora_weights",anchor:"diffusers.loaders.HiDreamImageLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5146",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(Ca);var ls=e(Ca,2),pd=r(ls);a(pd,{name:"unfuse_lora",anchor:"diffusers.loaders.HiDreamImageLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5202",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(ls),o(Ia);var ns=e(Ia,2);d(ns,{title:"QwenImageLoraLoaderMixin",local:"diffusers.loaders.QwenImageLoraLoaderMixin",headingTag:"h2"});var Aa=e(ns,2),cs=r(Aa);a(cs,{name:"class diffusers.loaders.QwenImageLoraLoaderMixin",anchor:"diffusers.loaders.QwenImageLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5209",parameters:[]});var qa=e(cs,4),_d=r(qa);a(_d,{name:"fuse_lora",anchor:"diffusers.loaders.QwenImageLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5388",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),md=r(Ya);a(md,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.QwenImageLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5320",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 Qa=e(Ya,2),ud=r(Qa);a(ud,{name:"load_lora_weights",anchor:"diffusers.loaders.QwenImageLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5279",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(Qa);var za=e(Qa,2),hd=r(za);a(hd,{name:"lora_state_dict",anchor:"diffusers.loaders.QwenImageLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5217",parameters:[{name:"pretrained_model_name_or_path_or_dict",val:": str | dict[str, torch.Tensor]"},{name:"**kwargs",val:""}]}),s(2),o(za);var Pa=e(za,2),gd=r(Pa);a(gd,{name:"save_lora_weights",anchor:"diffusers.loaders.QwenImageLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5352",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 fs=e(Pa,2),vd=r(fs);a(vd,{name:"unfuse_lora",anchor:"diffusers.loaders.QwenImageLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5408",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(fs),o(Aa);var ps=e(Aa,2);d(ps,{title:"ZImageLoraLoaderMixin",local:"diffusers.loaders.ZImageLoraLoaderMixin",headingTag:"h2"});var Ea=e(ps,2),_s=r(Ea);a(_s,{name:"class diffusers.loaders.ZImageLoraLoaderMixin",anchor:"diffusers.loaders.ZImageLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5620",parameters:[]});var Ha=e(_s,4),bd=r(Ha);a(bd,{name:"fuse_lora",anchor:"diffusers.loaders.ZImageLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5799",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),Ld=r(Ka);a(Ld,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.ZImageLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5731",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),xd=r($a);a(xd,{name:"load_lora_weights",anchor:"diffusers.loaders.ZImageLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5690",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),yd=r(Oa);a(yd,{name:"lora_state_dict",anchor:"diffusers.loaders.ZImageLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5628",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),wd=r(er);a(wd,{name:"save_lora_weights",anchor:"diffusers.loaders.ZImageLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5763",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 ms=e(er,2),Md=r(ms);a(Md,{name:"unfuse_lora",anchor:"diffusers.loaders.ZImageLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5819",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(ms),o(Ea);var us=e(Ea,2);d(us,{title:"CosmosLoraLoaderMixin",local:"diffusers.loaders.CosmosLoraLoaderMixin",headingTag:"h2"});var ar=e(us,2),hs=r(ar);a(hs,{name:"class diffusers.loaders.CosmosLoraLoaderMixin",anchor:"diffusers.loaders.CosmosLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6646",parameters:[]});var rr=e(hs,4),Sd=r(rr);a(Sd,{name:"fuse_lora",anchor:"diffusers.loaders.CosmosLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6820",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),Td=r(or);a(Td,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.CosmosLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6752",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),Nd=r(sr);a(Nd,{name:"load_lora_weights",anchor:"diffusers.loaders.CosmosLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6711",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),kd=r(ir);a(kd,{name:"lora_state_dict",anchor:"diffusers.loaders.CosmosLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6655",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),Ud=r(tr);a(Ud,{name:"save_lora_weights",anchor:"diffusers.loaders.CosmosLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6784",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 gs=e(tr,2),Rd=r(gs);a(Rd,{name:"unfuse_lora",anchor:"diffusers.loaders.CosmosLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6840",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(gs),o(ar);var vs=e(ar,2);d(vs,{title:"KandinskyLoraLoaderMixin",local:"diffusers.loaders.KandinskyLoraLoaderMixin",headingTag:"h2"});var dr=e(vs,2),bs=r(dr);a(bs,{name:"class diffusers.loaders.KandinskyLoraLoaderMixin",anchor:"diffusers.loaders.KandinskyLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4055",parameters:[]});var lr=e(bs,4),Jd=r(lr);a(Jd,{name:"fuse_lora",anchor:"diffusers.loaders.KandinskyLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4228",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),Dd=r(nr);a(Dd,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.KandinskyLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4160",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),Zd=r(cr);a(Zd,{name:"load_lora_weights",anchor:"diffusers.loaders.KandinskyLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4119",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),Xd=r(fr);a(Xd,{name:"lora_state_dict",anchor:"diffusers.loaders.KandinskyLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4063",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),Fd=r(pr);a(Fd,{name:"save_lora_weights",anchor:"diffusers.loaders.KandinskyLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4192",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 Ls=e(pr,2),jd=r(Ls);a(jd,{name:"unfuse_lora",anchor:"diffusers.loaders.KandinskyLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L4248",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Ls),o(dr);var xs=e(dr,2);d(xs,{title:"Ideogram4LoraLoaderMixin",local:"diffusers.loaders.Ideogram4LoraLoaderMixin",headingTag:"h2"});var _r=e(xs,2),ys=r(_r);a(ys,{name:"class diffusers.loaders.Ideogram4LoraLoaderMixin",anchor:"diffusers.loaders.Ideogram4LoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6228",parameters:[]});var mr=e(ys,4),Id=r(mr);a(Id,{name:"fuse_lora",anchor:"diffusers.loaders.Ideogram4LoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6408",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),Gd=r(ur);a(Gd,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.Ideogram4LoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6340",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),Wd=r(hr);a(Wd,{name:"load_lora_weights",anchor:"diffusers.loaders.Ideogram4LoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6299",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),Bd=r(gr);a(Bd,{name:"lora_state_dict",anchor:"diffusers.loaders.Ideogram4LoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6236",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),Vd=r(vr);a(Vd,{name:"save_lora_weights",anchor:"diffusers.loaders.Ideogram4LoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6372",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 ws=e(vr,2),Cd=r(ws);a(Cd,{name:"unfuse_lora",anchor:"diffusers.loaders.Ideogram4LoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L6428",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(ws),o(_r);var Ms=e(_r,2);d(Ms,{title:"Krea2LoraLoaderMixin",local:"diffusers.loaders.Krea2LoraLoaderMixin",headingTag:"h2"});var br=e(Ms,2),Ss=r(br);a(Ss,{name:"class diffusers.loaders.Krea2LoraLoaderMixin",anchor:"diffusers.loaders.Krea2LoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5415",parameters:[]});var Lr=e(Ss,4),Ad=r(Lr);a(Ad,{name:"fuse_lora",anchor:"diffusers.loaders.Krea2LoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5593",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),qd=r(xr);a(qd,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.Krea2LoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5525",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),Yd=r(yr);a(Yd,{name:"load_lora_weights",anchor:"diffusers.loaders.Krea2LoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5484",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),Qd=r(wr);a(Qd,{name:"lora_state_dict",anchor:"diffusers.loaders.Krea2LoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5423",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),zd=r(Mr);a(zd,{name:"save_lora_weights",anchor:"diffusers.loaders.Krea2LoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5557",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 Ts=e(Mr,2),Pd=r(Ts);a(Pd,{name:"unfuse_lora",anchor:"diffusers.loaders.Krea2LoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_pipeline.py#L5613",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Ts),o(br);var Ns=e(br,2);d(Ns,{title:"LoraBaseMixin",local:"diffusers.loaders.lora_base.LoraBaseMixin",headingTag:"h2"});var Sr=e(Ns,2),ks=r(Sr);a(ks,{name:"class diffusers.loaders.lora_base.LoraBaseMixin",anchor:"diffusers.loaders.lora_base.LoraBaseMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_base.py#L479",parameters:[]});var Tr=e(ks,4),Us=r(Tr);a(Us,{name:"delete_adapters",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.delete_adapters",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_base.py#L845",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 Ed=e(Us,4);p(Ed,{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(Tr);var Nr=e(Tr,2),Rs=r(Nr);a(Rs,{name:"disable_lora",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.disable_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_base.py#L785",parameters:[]});var Hd=e(Rs,4);p(Hd,{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(Nr);var kr=e(Nr,2),Js=r(kr);a(Js,{name:"enable_lora",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.enable_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_base.py#L815",parameters:[]});var Kd=e(Js,4);p(Kd,{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(kr);var Ur=e(kr,2),$d=r(Ur);a($d,{name:"enable_lora_hotswap",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.enable_lora_hotswap",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_base.py#L992",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(Ur);var Rr=e(Ur,2),Ds=r(Rr);a(Ds,{name:"fuse_lora",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_base.py#L537",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 Od=e(Ds,6);p(Od,{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(Rr);var Jr=e(Rr,2),Zs=r(Jr);a(Zs,{name:"get_active_adapters",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.get_active_adapters",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_base.py#L883",parameters:[]});var el=e(Zs,4);p(el,{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(Jr);var Dr=e(Jr,2),al=r(Dr);a(al,{name:"get_list_adapters",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.get_list_adapters",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_base.py#L916",parameters:[]}),s(2),o(Dr);var Zr=e(Dr,2),Xs=r(Zr);a(Xs,{name:"set_adapters",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.set_adapters",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_base.py#L682",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 rl=e(Xs,4);p(rl,{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(Zr);var Xr=e(Zr,2),Fs=r(Xr);a(Fs,{name:"set_lora_device",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.set_lora_device",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_base.py#L938",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 ol=e(Fs,6);p(ol,{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(Xr);var Fr=e(Xr,2),sl=r(Fr);a(sl,{name:"unfuse_lora",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_base.py#L626",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(4),o(Fr);var jr=e(Fr,2),js=r(jr);a(js,{name:"unload_lora_weights",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.unload_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_base.py#L514",parameters:[]});var il=e(js,4);p(il,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.unload_lora_weights.example",children:(t,n)=>{var i=Ir(),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(jr);var Is=e(jr,2),tl=r(Is);a(tl,{name:"write_lora_layers",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.write_lora_layers",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/lora_base.py#L1015",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(Is),o(Sr);var dl=e(Sr,2);fl(dl,{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/loaders/lora.md"}),s(2),f(Gs,Gr),ul()}export{wl as component}; | |
Xet Storage Details
- Size:
- 231 kB
- Xet hash:
- 0057570dde5ff46fe0aef6602a4675d5020ff3f4926d8a7dd43ddec29fc8dd3e
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.