Buckets:
| import"../chunks/DsnmJJEf.js";import{i as fl,h as cl,C as pl,H as d,D as a,E as _l,s as ml,a as f}from"../chunks/BtE7mKSK.js";import{p as ul,o as hl,s as e,f as _,a as c,b as gl,c as r,d as u,r as o,n as s}from"../chunks/jDjavuwI.js";import{E as p}from"../chunks/SrSJA0zO.js";const vl='{"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 bl=u('<meta name="hf:doc:metadata"/>'),m=u("<p>Example:</p> <!>",1),Gr=u("<p>Examples:</p> <!>",1),Ll=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_14215/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>, for example) or a Transformer (<a href="/docs/diffusers/pr_14215/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> <p>Note that <code>num_fused_loras</code>/<code>fused_loras</code> (backed by <code>self._merged_adapters</code>) are tracked pipeline-wide, | |
| not per component. An adapter fused into multiple <code>_lora_loadable_modules</code> components only drops out of <code>fused_loras</code> once it has been unfused from all of them; unfusing it from only some components leaves it | |
| listed as fused.</p></div> <div 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_14215/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_14215/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_14215/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_14215/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 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> <!> <div 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_14215/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_14215/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_14215/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 <a href="/docs/diffusers/pr_14215/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.unfuse_lora">unfuse_lora()</a> 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_14215/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_14215/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_14215/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_14215/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_14215/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_14215/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 <a href="/docs/diffusers/pr_14215/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.unfuse_lora">unfuse_lora()</a> 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_14215/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_14215/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_14215/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_14215/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_14215/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_14215/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_14215/en/api/models/flux2_transformer#diffusers.Flux2Transformer2DModel">Flux2Transformer2DModel</a>. Specific to <a href="/docs/diffusers/pr_14215/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_14215/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_14215/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_14215/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_14215/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 <a href="/docs/diffusers/pr_14215/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.unfuse_lora">unfuse_lora()</a> 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_14215/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_14215/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_14215/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_14215/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_14215/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 <a href="/docs/diffusers/pr_14215/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.unfuse_lora">unfuse_lora()</a> 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_14215/en/api/models/ltx2_video_transformer3d#diffusers.LTX2VideoTransformer3DModel">LTX2VideoTransformer3DModel</a>. Specific to <a href="/docs/diffusers/pr_14215/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_14215/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_14215/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_14215/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_14215/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 <a href="/docs/diffusers/pr_14215/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.unfuse_lora">unfuse_lora()</a> 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_14215/en/api/models/cogvideox_transformer3d#diffusers.CogVideoXTransformer3DModel">CogVideoXTransformer3DModel</a>. Specific to <a href="/docs/diffusers/pr_14215/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_14215/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_14215/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_14215/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_14215/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 <a href="/docs/diffusers/pr_14215/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.unfuse_lora">unfuse_lora()</a> 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_14215/en/api/models/mochi_transformer3d#diffusers.MochiTransformer3DModel">MochiTransformer3DModel</a>. Specific to <a href="/docs/diffusers/pr_14215/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_14215/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_14215/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_14215/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_14215/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 <a href="/docs/diffusers/pr_14215/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.unfuse_lora">unfuse_lora()</a> 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_14215/en/api/models/aura_flow_transformer2d#diffusers.AuraFlowTransformer2DModel">AuraFlowTransformer2DModel</a> Specific to <a href="/docs/diffusers/pr_14215/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_14215/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_14215/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_14215/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_14215/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 <a href="/docs/diffusers/pr_14215/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.unfuse_lora">unfuse_lora()</a> 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_14215/en/api/models/ltx_video_transformer3d#diffusers.LTXVideoTransformer3DModel">LTXVideoTransformer3DModel</a>. Specific to <a href="/docs/diffusers/pr_14215/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_14215/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_14215/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_14215/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_14215/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 <a href="/docs/diffusers/pr_14215/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.unfuse_lora">unfuse_lora()</a> 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_14215/en/api/models/sana_transformer2d#diffusers.SanaTransformer2DModel">SanaTransformer2DModel</a>. Specific to <a href="/docs/diffusers/pr_14215/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_14215/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_14215/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_14215/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_14215/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 <a href="/docs/diffusers/pr_14215/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.unfuse_lora">unfuse_lora()</a> 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_14215/en/api/models/helios_transformer3d#diffusers.HeliosTransformer3DModel">HeliosTransformer3DModel</a>. Specific to <a href="/docs/diffusers/pr_14215/en/api/pipelines/helios#diffusers.HeliosPipeline">HeliosPipeline</a> and <a href="/docs/diffusers/pr_14215/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_14215/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_14215/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_14215/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_14215/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 <a href="/docs/diffusers/pr_14215/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.unfuse_lora">unfuse_lora()</a> 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_14215/en/api/models/hunyuan_video_transformer_3d#diffusers.HunyuanVideoTransformer3DModel">HunyuanVideoTransformer3DModel</a>. Specific to <a href="/docs/diffusers/pr_14215/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_14215/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_14215/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_14215/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_14215/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 <a href="/docs/diffusers/pr_14215/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.unfuse_lora">unfuse_lora()</a> 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_14215/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_14215/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_14215/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_14215/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_14215/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 <a href="/docs/diffusers/pr_14215/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.unfuse_lora">unfuse_lora()</a> 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_14215/en/api/models/wan_transformer_3d#diffusers.WanTransformer3DModel">WanTransformer3DModel</a>. Specific to <a href="/docs/diffusers/pr_14215/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_14215/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_14215/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_14215/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_14215/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 <a href="/docs/diffusers/pr_14215/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.unfuse_lora">unfuse_lora()</a> 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_14215/en/api/models/wan_transformer_3d#diffusers.WanTransformer3DModel">WanTransformer3DModel</a>. Specific to <a href="/docs/diffusers/pr_14215/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_14215/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_14215/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_14215/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_14215/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 <a href="/docs/diffusers/pr_14215/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.unfuse_lora">unfuse_lora()</a> 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_14215/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_14215/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_14215/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_14215/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_14215/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 <a href="/docs/diffusers/pr_14215/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.unfuse_lora">unfuse_lora()</a> 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_14215/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_14215/en/api/models/cosmos_transformer3d#diffusers.CosmosTransformer3DModel">CosmosTransformer3DModel</a> and <a href="/docs/diffusers/pr_14215/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_14215/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_14215/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_14215/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.unfuse_lora">unfuse_lora()</a> 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_14215/en/api/models/hidream_image_transformer#diffusers.HiDreamImageTransformer2DModel">HiDreamImageTransformer2DModel</a>. Specific to <a href="/docs/diffusers/pr_14215/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_14215/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_14215/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_14215/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_14215/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 <a href="/docs/diffusers/pr_14215/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.unfuse_lora">unfuse_lora()</a> 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_14215/en/api/models/qwenimage_transformer2d#diffusers.QwenImageTransformer2DModel">QwenImageTransformer2DModel</a>. Specific to <a href="/docs/diffusers/pr_14215/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_14215/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_14215/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_14215/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_14215/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 <a href="/docs/diffusers/pr_14215/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.unfuse_lora">unfuse_lora()</a> 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_14215/en/api/models/z_image_transformer2d#diffusers.ZImageTransformer2DModel">ZImageTransformer2DModel</a>. Specific to <a href="/docs/diffusers/pr_14215/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_14215/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_14215/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_14215/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_14215/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 <a href="/docs/diffusers/pr_14215/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.unfuse_lora">unfuse_lora()</a> 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_14215/en/api/models/cosmos_transformer3d#diffusers.CosmosTransformer3DModel">CosmosTransformer3DModel</a>, Specific to <a href="/docs/diffusers/pr_14215/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_14215/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_14215/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_14215/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_14215/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 <a href="/docs/diffusers/pr_14215/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.unfuse_lora">unfuse_lora()</a> 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_14215/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_14215/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_14215/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_14215/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 <a href="/docs/diffusers/pr_14215/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.unfuse_lora">unfuse_lora()</a> 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_14215/en/api/models/ideogram4_transformer2d#diffusers.Ideogram4Transformer2DModel">Ideogram4Transformer2DModel</a>. Specific to <a href="/docs/diffusers/pr_14215/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_14215/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_14215/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_14215/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_14215/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 <a href="/docs/diffusers/pr_14215/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.unfuse_lora">unfuse_lora()</a> 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_14215/en/api/models/krea2_transformer2d#diffusers.Krea2Transformer2DModel">Krea2Transformer2DModel</a>. Specific to <a href="/docs/diffusers/pr_14215/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_14215/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_14215/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_14215/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_14215/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 <a href="/docs/diffusers/pr_14215/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.unfuse_lora">unfuse_lora()</a> 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> <p>Note that <code>num_fused_loras</code>/<code>fused_loras</code> (backed by <code>self._merged_adapters</code>) are tracked pipeline-wide, | |
| not per component. An adapter fused into multiple <code>_lora_loadable_modules</code> components only drops out of <code>fused_loras</code> once it has been unfused from all of them; unfusing it from only some components leaves it | |
| listed as fused.</p></div> <div 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 Sl(Ws,Bs){ul(Bs,!1),hl(()=>{new URLSearchParams(window.location.search).get("fw")}),fl();var Wr=Ll();cl("yjofn9",t=>{var n=bl();ml(n,"content",vl),c(t,n)});var Br=e(_(Wr),2);pl(Br,{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"});var Vr=e(Br,2);d(Vr,{title:"LoRA",local:"lora",headingTag:"h1"});var Cr=e(Vr,8);d(Cr,{title:"LoraBaseMixin",local:"diffusers.loaders.lora_base.LoraBaseMixin",headingTag:"h2"});var h=e(Cr,2),Ar=r(h);a(Ar,{name:"class diffusers.loaders.lora_base.LoraBaseMixin",anchor:"diffusers.loaders.lora_base.LoraBaseMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_base.py#L478",parameters:[]});var g=e(Ar,4),qr=r(g);a(qr,{name:"delete_adapters",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.delete_adapters",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_base.py#L873",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 Vs=e(qr,4);p(Vs,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.delete_adapters.example",children:(t,n)=>{var i=m(),l=e(_(i),2);f(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}),c(t,i)},$$slots:{default:!0}}),o(g);var v=e(g,2),Yr=r(v);a(Yr,{name:"disable_lora",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.disable_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_base.py#L813",parameters:[]});var Cs=e(Yr,4);p(Cs,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.disable_lora.example",children:(t,n)=>{var i=m(),l=e(_(i),2);f(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}),c(t,i)},$$slots:{default:!0}}),o(v);var b=e(v,2),Qr=r(b);a(Qr,{name:"enable_lora",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.enable_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_base.py#L843",parameters:[]});var As=e(Qr,4);p(As,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.enable_lora.example",children:(t,n)=>{var i=m(),l=e(_(i),2);f(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}),c(t,i)},$$slots:{default:!0}}),o(b);var L=e(b,2),qs=r(L);a(qs,{name:"enable_lora_hotswap",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.enable_lora_hotswap",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_base.py#L1020",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),zr=r(x);a(zr,{name:"fuse_lora",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_base.py#L536",parameters:[{name:"components",val:": list[str] | None = None"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.fuse_lora.components",description:"<strong>components</strong> — (<code>list[str]</code>): list of LoRA-injectable components to fuse the LoRAs into.",name:"components"},{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.fuse_lora.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>, defaults to 1.0) — | |
| Controls how much to influence the outputs with the LoRA parameters.`,name:"lora_scale"},{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.fuse_lora.safe_fusing",description:`<strong>safe_fusing</strong> (<code>bool</code>, defaults to <code>False</code>) — | |
| Whether to check fused weights for NaN values before fusing and if values are NaN not fusing them.`,name:"safe_fusing"},{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.fuse_lora.adapter_names",description:`<strong>adapter_names</strong> (<code>list[str]</code>, <em>optional</em>) — | |
| Adapter names to be used for fusing. If nothing is passed, all active adapters will be fused.`,name:"adapter_names"}]});var Ys=e(zr,6);p(Ys,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.fuse_lora.example",children:(t,n)=>{var i=m(),l=e(_(i),2);f(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}),c(t,i)},$$slots:{default:!0}}),o(x);var y=e(x,2),Pr=r(y);a(Pr,{name:"get_active_adapters",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.get_active_adapters",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_base.py#L911",parameters:[]});var Qs=e(Pr,4);p(Qs,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.get_active_adapters.example",children:(t,n)=>{var i=m(),l=e(_(i),2);f(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}),c(t,i)},$$slots:{default:!0}}),o(y);var w=e(y,2),zs=r(w);a(zs,{name:"get_list_adapters",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.get_list_adapters",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_base.py#L944",parameters:[]}),s(2),o(w);var M=e(w,2),Er=r(M);a(Er,{name:"set_adapters",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.set_adapters",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_base.py#L710",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 Ps=e(Er,4);p(Ps,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.set_adapters.example",children:(t,n)=>{var i=m(),l=e(_(i),2);f(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}),c(t,i)},$$slots:{default:!0}}),o(M);var S=e(M,2),Hr=r(S);a(Hr,{name:"set_lora_device",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.set_lora_device",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_base.py#L966",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 Es=e(Hr,6);p(Es,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.set_lora_device.example",children:(t,n)=>{f(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),Hs=r(T);a(Hs,{name:"unfuse_lora",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_base.py#L625",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(6),o(T);var N=e(T,2),Kr=r(N);a(Kr,{name:"unload_lora_weights",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.unload_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_base.py#L513",parameters:[]});var Ks=e(Kr,4);p(Ks,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.unload_lora_weights.example",children:(t,n)=>{var i=Gr(),l=e(_(i),2);f(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}),c(t,i)},$$slots:{default:!0}}),o(N);var $r=e(N,2),$s=r($r);a($s,{name:"write_lora_layers",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.write_lora_layers",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_base.py#L1043",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($r),o(h);var Or=e(h,2);d(Or,{title:"StableDiffusionLoraLoaderMixin",local:"diffusers.loaders.StableDiffusionLoraLoaderMixin",headingTag:"h2"});var k=e(Or,2),eo=r(k);a(eo,{name:"class diffusers.loaders.StableDiffusionLoraLoaderMixin",anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L136",parameters:[]});var D=e(eo,4),Os=r(D);a(Os,{name:"load_lora_into_text_encoder",anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_text_encoder",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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_14215/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(D);var R=e(D,2),ei=r(R);a(ei,{name:"load_lora_into_unet",anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_into_unet",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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_14215/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 U=e(R,2),ai=r(U);a(ai,{name:"load_lora_weights",anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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_14215/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(U);var J=e(U,2),ri=r(J);a(ri,{name:"lora_state_dict",anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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_14215/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(J);var Z=e(J,2),oi=r(Z);a(oi,{name:"save_lora_weights",anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Z);var ao=e(Z,2),si=r(ao);a(si,{name:"unfuse_lora",anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L583",parameters:[{name:"components",val:": list = ['unet', 'text_encoder']"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.loaders.StableDiffusionLoraLoaderMixin.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.StableDiffusionLoraLoaderMixin.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.StableDiffusionLoraLoaderMixin.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(ao),o(k);var ro=e(k,2);d(ro,{title:"StableDiffusionXLLoraLoaderMixin",local:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin",headingTag:"h2"});var X=e(ro,2),oo=r(X);a(oo,{name:"class diffusers.loaders.StableDiffusionXLLoraLoaderMixin",anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L600",parameters:[]});var F=e(oo,4),ii=r(F);a(ii,{name:"fuse_lora",anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(F);var j=e(F,2),ti=r(j);a(ti,{name:"load_lora_into_text_encoder",anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_into_text_encoder",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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_14215/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(j);var I=e(j,2),di=r(I);a(di,{name:"load_lora_into_unet",anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_into_unet",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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_14215/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(I);var G=e(I,2),li=r(G);a(li,{name:"load_lora_weights",anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(G);var W=e(G,2),ni=r(W);a(ni,{name:"lora_state_dict",anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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_14215/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(W);var B=e(W,2),fi=r(B);a(fi,{name:"save_lora_weights",anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(B);var so=e(B,2),ci=r(so);a(ci,{name:"unfuse_lora",anchor:"diffusers.loaders.StableDiffusionXLLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L985",parameters:[{name:"components",val:": list = ['unet', 'text_encoder', 'text_encoder_2']"},{name:"**kwargs",val:""}]}),s(2),o(so),o(X);var io=e(X,2);d(io,{title:"SD3LoraLoaderMixin",local:"diffusers.loaders.SD3LoraLoaderMixin",headingTag:"h2"});var V=e(io,2),to=r(V);a(to,{name:"class diffusers.loaders.SD3LoraLoaderMixin",anchor:"diffusers.loaders.SD3LoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L992",parameters:[]});var C=e(to,6),pi=r(C);a(pi,{name:"fuse_lora",anchor:"diffusers.loaders.SD3LoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(C);var A=e(C,2),_i=r(A);a(_i,{name:"load_lora_into_text_encoder",anchor:"diffusers.loaders.SD3LoraLoaderMixin.load_lora_into_text_encoder",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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_14215/en/api/loaders/lora#diffusers.loaders.StableDiffusionLoraLoaderMixin.load_lora_weights">load_lora_weights()</a>.`,name:"hotswap"},{anchor:"diffusers.loaders.SD3LoraLoaderMixin.load_lora_into_text_encoder.metadata",description:`<strong>metadata</strong> (<code>dict</code>) — | |
| Optional LoRA adapter metadata. When supplied, the <code>LoraConfig</code> arguments of <code>peft</code> won’t be derived | |
| from the state dict.`,name:"metadata"}]}),s(2),o(A);var q=e(A,2),mi=r(q);a(mi,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.SD3LoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(q);var Y=e(q,2),ui=r(Y);a(ui,{name:"load_lora_weights",anchor:"diffusers.loaders.SD3LoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Y);var Q=e(Y,2),hi=r(Q);a(hi,{name:"lora_state_dict",anchor:"diffusers.loaders.SD3LoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Q);var z=e(Q,2),gi=r(z);a(gi,{name:"save_lora_weights",anchor:"diffusers.loaders.SD3LoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(z);var lo=e(z,2),vi=r(lo);a(vi,{name:"unfuse_lora",anchor:"diffusers.loaders.SD3LoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L1284",parameters:[{name:"components",val:": list = ['transformer', 'text_encoder', 'text_encoder_2']"},{name:"**kwargs",val:""}]}),s(2),o(lo),o(V);var no=e(V,2);d(no,{title:"FluxLoraLoaderMixin",local:"diffusers.loaders.FluxLoraLoaderMixin",headingTag:"h2"});var P=e(no,2),fo=r(P);a(fo,{name:"class diffusers.loaders.FluxLoraLoaderMixin",anchor:"diffusers.loaders.FluxLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L1491",parameters:[]});var E=e(fo,6),bi=r(E);a(bi,{name:"fuse_lora",anchor:"diffusers.loaders.FluxLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(E);var H=e(E,2),Li=r(H);a(Li,{name:"load_lora_into_text_encoder",anchor:"diffusers.loaders.FluxLoraLoaderMixin.load_lora_into_text_encoder",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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_14215/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(H);var K=e(H,2),xi=r(K);a(xi,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.FluxLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(K);var $=e(K,2),yi=r($);a(yi,{name:"load_lora_weights",anchor:"diffusers.loaders.FluxLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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($);var O=e($,2),wi=r(O);a(wi,{name:"lora_state_dict",anchor:"diffusers.loaders.FluxLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(O);var ee=e(O,2),Mi=r(ee);a(Mi,{name:"save_lora_weights",anchor:"diffusers.loaders.FluxLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(ee);var ae=e(ee,2),Si=r(ae);a(Si,{name:"unfuse_lora",anchor:"diffusers.loaders.FluxLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(ae);var co=e(ae,2),po=r(co);a(po,{name:"unload_lora_weights",anchor:"diffusers.loaders.FluxLoraLoaderMixin.unload_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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 Ti=e(po,4);p(Ti,{anchor:"diffusers.loaders.FluxLoraLoaderMixin.unload_lora_weights.example",children:(t,n)=>{var i=Gr(),l=e(_(i),2);f(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}),c(t,i)},$$slots:{default:!0}}),o(co),o(P);var _o=e(P,2);d(_o,{title:"Flux2LoraLoaderMixin",local:"diffusers.loaders.Flux2LoraLoaderMixin",headingTag:"h2"});var re=e(_o,2),mo=r(re);a(mo,{name:"class diffusers.loaders.Flux2LoraLoaderMixin",anchor:"diffusers.loaders.Flux2LoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L6014",parameters:[]});var oe=e(mo,4),Ni=r(oe);a(Ni,{name:"fuse_lora",anchor:"diffusers.loaders.Flux2LoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(oe);var se=e(oe,2),ki=r(se);a(ki,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.Flux2LoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(se);var ie=e(se,2),Di=r(ie);a(Di,{name:"load_lora_weights",anchor:"diffusers.loaders.Flux2LoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(ie);var te=e(ie,2),Ri=r(te);a(Ri,{name:"lora_state_dict",anchor:"diffusers.loaders.Flux2LoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(te);var de=e(te,2),Ui=r(de);a(Ui,{name:"save_lora_weights",anchor:"diffusers.loaders.Flux2LoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(de);var uo=e(de,2),Ji=r(uo);a(Ji,{name:"unfuse_lora",anchor:"diffusers.loaders.Flux2LoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L6221",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(uo),o(re);var ho=e(re,2);d(ho,{title:"ErnieImageLoraLoaderMixin",local:"diffusers.loaders.ErnieImageLoraLoaderMixin",headingTag:"h2"});var le=e(ho,2),go=r(le);a(go,{name:"class diffusers.loaders.ErnieImageLoraLoaderMixin",anchor:"diffusers.loaders.ErnieImageLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L6435",parameters:[]});var ne=e(go,4),Zi=r(ne);a(Zi,{name:"fuse_lora",anchor:"diffusers.loaders.ErnieImageLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(ne);var fe=e(ne,2),Xi=r(fe);a(Xi,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.ErnieImageLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(fe);var ce=e(fe,2),Fi=r(ce);a(Fi,{name:"load_lora_weights",anchor:"diffusers.loaders.ErnieImageLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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 pe=e(ce,2),ji=r(pe);a(ji,{name:"lora_state_dict",anchor:"diffusers.loaders.ErnieImageLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(pe);var _e=e(pe,2),Ii=r(_e);a(Ii,{name:"save_lora_weights",anchor:"diffusers.loaders.ErnieImageLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(_e);var vo=e(_e,2),Gi=r(vo);a(Gi,{name:"unfuse_lora",anchor:"diffusers.loaders.ErnieImageLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L6639",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(vo),o(le);var bo=e(le,2);d(bo,{title:"LTX2LoraLoaderMixin",local:"diffusers.loaders.LTX2LoraLoaderMixin",headingTag:"h2"});var me=e(bo,2),Lo=r(me);a(Lo,{name:"class diffusers.loaders.LTX2LoraLoaderMixin",anchor:"diffusers.loaders.LTX2LoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L3020",parameters:[]});var ue=e(Lo,4),Wi=r(ue);a(Wi,{name:"fuse_lora",anchor:"diffusers.loaders.LTX2LoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(ue);var he=e(ue,2),Bi=r(he);a(Bi,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.LTX2LoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(he);var ge=e(he,2),Vi=r(ge);a(Vi,{name:"load_lora_weights",anchor:"diffusers.loaders.LTX2LoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(ge);var ve=e(ge,2),Ci=r(ve);a(Ci,{name:"lora_state_dict",anchor:"diffusers.loaders.LTX2LoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(ve);var be=e(ve,2),Ai=r(be);a(Ai,{name:"save_lora_weights",anchor:"diffusers.loaders.LTX2LoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(be);var xo=e(be,2),qi=r(xo);a(qi,{name:"unfuse_lora",anchor:"diffusers.loaders.LTX2LoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L3240",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(xo),o(me);var yo=e(me,2);d(yo,{title:"CogVideoXLoraLoaderMixin",local:"diffusers.loaders.CogVideoXLoraLoaderMixin",headingTag:"h2"});var Le=e(yo,2),wo=r(Le);a(wo,{name:"class diffusers.loaders.CogVideoXLoraLoaderMixin",anchor:"diffusers.loaders.CogVideoXLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L2421",parameters:[]});var xe=e(wo,4),Yi=r(xe);a(Yi,{name:"fuse_lora",anchor:"diffusers.loaders.CogVideoXLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(xe);var ye=e(xe,2),Qi=r(ye);a(Qi,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.CogVideoXLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(ye);var we=e(ye,2),zi=r(we);a(zi,{name:"load_lora_weights",anchor:"diffusers.loaders.CogVideoXLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(we);var Me=e(we,2),Pi=r(Me);a(Pi,{name:"lora_state_dict",anchor:"diffusers.loaders.CogVideoXLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Me);var Se=e(Me,2),Ei=r(Se);a(Ei,{name:"save_lora_weights",anchor:"diffusers.loaders.CogVideoXLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Se);var Mo=e(Se,2),Hi=r(Mo);a(Hi,{name:"unfuse_lora",anchor:"diffusers.loaders.CogVideoXLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L2610",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Mo),o(Le);var So=e(Le,2);d(So,{title:"Mochi1LoraLoaderMixin",local:"diffusers.loaders.Mochi1LoraLoaderMixin",headingTag:"h2"});var Te=e(So,2),To=r(Te);a(To,{name:"class diffusers.loaders.Mochi1LoraLoaderMixin",anchor:"diffusers.loaders.Mochi1LoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L2617",parameters:[]});var Ne=e(To,4),Ki=r(Ne);a(Ki,{name:"fuse_lora",anchor:"diffusers.loaders.Mochi1LoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Ne);var ke=e(Ne,2),$i=r(ke);a($i,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.Mochi1LoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(ke);var De=e(ke,2),Oi=r(De);a(Oi,{name:"load_lora_weights",anchor:"diffusers.loaders.Mochi1LoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(De);var Re=e(De,2),et=r(Re);a(et,{name:"lora_state_dict",anchor:"diffusers.loaders.Mochi1LoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Re);var Ue=e(Re,2),at=r(Ue);a(at,{name:"save_lora_weights",anchor:"diffusers.loaders.Mochi1LoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Ue);var No=e(Ue,2),rt=r(No);a(rt,{name:"unfuse_lora",anchor:"diffusers.loaders.Mochi1LoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L2810",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(No),o(Te);var ko=e(Te,2);d(ko,{title:"AuraFlowLoraLoaderMixin",local:"diffusers.loaders.AuraFlowLoraLoaderMixin",headingTag:"h2"});var Je=e(ko,2),Do=r(Je);a(Do,{name:"class diffusers.loaders.AuraFlowLoraLoaderMixin",anchor:"diffusers.loaders.AuraFlowLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L1291",parameters:[]});var Ze=e(Do,4),ot=r(Ze);a(ot,{name:"fuse_lora",anchor:"diffusers.loaders.AuraFlowLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Ze);var Xe=e(Ze,2),st=r(Xe);a(st,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.AuraFlowLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Xe);var Fe=e(Xe,2),it=r(Fe);a(it,{name:"load_lora_weights",anchor:"diffusers.loaders.AuraFlowLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Fe);var je=e(Fe,2),tt=r(je);a(tt,{name:"lora_state_dict",anchor:"diffusers.loaders.AuraFlowLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(je);var Ie=e(je,2),dt=r(Ie);a(dt,{name:"save_lora_weights",anchor:"diffusers.loaders.AuraFlowLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Ie);var Ro=e(Ie,2),lt=r(Ro);a(lt,{name:"unfuse_lora",anchor:"diffusers.loaders.AuraFlowLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L1484",parameters:[{name:"components",val:": list = ['transformer', 'text_encoder']"},{name:"**kwargs",val:""}]}),s(2),o(Ro),o(Je);var Uo=e(Je,2);d(Uo,{title:"LTXVideoLoraLoaderMixin",local:"diffusers.loaders.LTXVideoLoraLoaderMixin",headingTag:"h2"});var Ge=e(Uo,2),Jo=r(Ge);a(Jo,{name:"class diffusers.loaders.LTXVideoLoraLoaderMixin",anchor:"diffusers.loaders.LTXVideoLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L2817",parameters:[]});var We=e(Jo,4),nt=r(We);a(nt,{name:"fuse_lora",anchor:"diffusers.loaders.LTXVideoLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(We);var Be=e(We,2),ft=r(Be);a(ft,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.LTXVideoLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Be);var Ve=e(Be,2),ct=r(Ve);a(ct,{name:"load_lora_weights",anchor:"diffusers.loaders.LTXVideoLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Ve);var Ce=e(Ve,2),pt=r(Ce);a(pt,{name:"lora_state_dict",anchor:"diffusers.loaders.LTXVideoLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Ce);var Ae=e(Ce,2),_t=r(Ae);a(_t,{name:"save_lora_weights",anchor:"diffusers.loaders.LTXVideoLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Ae);var Zo=e(Ae,2),mt=r(Zo);a(mt,{name:"unfuse_lora",anchor:"diffusers.loaders.LTXVideoLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L3013",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Zo),o(Ge);var Xo=e(Ge,2);d(Xo,{title:"SanaLoraLoaderMixin",local:"diffusers.loaders.SanaLoraLoaderMixin",headingTag:"h2"});var qe=e(Xo,2),Fo=r(qe);a(Fo,{name:"class diffusers.loaders.SanaLoraLoaderMixin",anchor:"diffusers.loaders.SanaLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L3247",parameters:[]});var Ye=e(Fo,4),ut=r(Ye);a(ut,{name:"fuse_lora",anchor:"diffusers.loaders.SanaLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Ye);var Qe=e(Ye,2),ht=r(Qe);a(ht,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.SanaLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Qe);var ze=e(Qe,2),gt=r(ze);a(gt,{name:"load_lora_weights",anchor:"diffusers.loaders.SanaLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(ze);var Pe=e(ze,2),vt=r(Pe);a(vt,{name:"lora_state_dict",anchor:"diffusers.loaders.SanaLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Pe);var Ee=e(Pe,2),bt=r(Ee);a(bt,{name:"save_lora_weights",anchor:"diffusers.loaders.SanaLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Ee);var jo=e(Ee,2),Lt=r(jo);a(Lt,{name:"unfuse_lora",anchor:"diffusers.loaders.SanaLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L3440",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(jo),o(qe);var Io=e(qe,2);d(Io,{title:"HeliosLoraLoaderMixin",local:"diffusers.loaders.HeliosLoraLoaderMixin",headingTag:"h2"});var He=e(Io,2),Go=r(He);a(Go,{name:"class diffusers.loaders.HeliosLoraLoaderMixin",anchor:"diffusers.loaders.HeliosLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L3447",parameters:[]});var Ke=e(Go,4),xt=r(Ke);a(xt,{name:"fuse_lora",anchor:"diffusers.loaders.HeliosLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Ke);var $e=e(Ke,2),yt=r($e);a(yt,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.HeliosLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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($e);var Oe=e($e,2),wt=r(Oe);a(wt,{name:"load_lora_weights",anchor:"diffusers.loaders.HeliosLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Oe);var ea=e(Oe,2),Mt=r(ea);a(Mt,{name:"lora_state_dict",anchor:"diffusers.loaders.HeliosLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(ea);var aa=e(ea,2),St=r(aa);a(St,{name:"save_lora_weights",anchor:"diffusers.loaders.HeliosLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(aa);var Wo=e(aa,2),Tt=r(Wo);a(Tt,{name:"unfuse_lora",anchor:"diffusers.loaders.HeliosLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L3641",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Wo),o(He);var Bo=e(He,2);d(Bo,{title:"HunyuanVideoLoraLoaderMixin",local:"diffusers.loaders.HunyuanVideoLoraLoaderMixin",headingTag:"h2"});var ra=e(Bo,2),Vo=r(ra);a(Vo,{name:"class diffusers.loaders.HunyuanVideoLoraLoaderMixin",anchor:"diffusers.loaders.HunyuanVideoLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L3648",parameters:[]});var oa=e(Vo,4),Nt=r(oa);a(Nt,{name:"fuse_lora",anchor:"diffusers.loaders.HunyuanVideoLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(oa);var sa=e(oa,2),kt=r(sa);a(kt,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.HunyuanVideoLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(sa);var ia=e(sa,2),Dt=r(ia);a(Dt,{name:"load_lora_weights",anchor:"diffusers.loaders.HunyuanVideoLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(ia);var ta=e(ia,2),Rt=r(ta);a(Rt,{name:"lora_state_dict",anchor:"diffusers.loaders.HunyuanVideoLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(ta);var da=e(ta,2),Ut=r(da);a(Ut,{name:"save_lora_weights",anchor:"diffusers.loaders.HunyuanVideoLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(da);var Co=e(da,2),Jt=r(Co);a(Jt,{name:"unfuse_lora",anchor:"diffusers.loaders.HunyuanVideoLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L3844",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Co),o(ra);var Ao=e(ra,2);d(Ao,{title:"Lumina2LoraLoaderMixin",local:"diffusers.loaders.Lumina2LoraLoaderMixin",headingTag:"h2"});var la=e(Ao,2),qo=r(la);a(qo,{name:"class diffusers.loaders.Lumina2LoraLoaderMixin",anchor:"diffusers.loaders.Lumina2LoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L3851",parameters:[]});var na=e(qo,4),Zt=r(na);a(Zt,{name:"fuse_lora",anchor:"diffusers.loaders.Lumina2LoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(na);var fa=e(na,2),Xt=r(fa);a(Xt,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.Lumina2LoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(fa);var ca=e(fa,2),Ft=r(ca);a(Ft,{name:"load_lora_weights",anchor:"diffusers.loaders.Lumina2LoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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 pa=e(ca,2),jt=r(pa);a(jt,{name:"lora_state_dict",anchor:"diffusers.loaders.Lumina2LoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(pa);var _a=e(pa,2),It=r(_a);a(It,{name:"save_lora_weights",anchor:"diffusers.loaders.Lumina2LoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(_a);var Yo=e(_a,2),Gt=r(Yo);a(Gt,{name:"unfuse_lora",anchor:"diffusers.loaders.Lumina2LoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L4048",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Yo),o(la);var Qo=e(la,2);d(Qo,{title:"CogView4LoraLoaderMixin",local:"diffusers.loaders.CogView4LoraLoaderMixin",headingTag:"h2"});var ma=e(Qo,2),zo=r(ma);a(zo,{name:"class diffusers.loaders.CogView4LoraLoaderMixin",anchor:"diffusers.loaders.CogView4LoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L4806",parameters:[]});var ua=e(zo,4),Wt=r(ua);a(Wt,{name:"fuse_lora",anchor:"diffusers.loaders.CogView4LoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(ua);var ha=e(ua,2),Bt=r(ha);a(Bt,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.CogView4LoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(ha);var ga=e(ha,2),Vt=r(ga);a(Vt,{name:"load_lora_weights",anchor:"diffusers.loaders.CogView4LoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(ga);var va=e(ga,2),Ct=r(va);a(Ct,{name:"lora_state_dict",anchor:"diffusers.loaders.CogView4LoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(va);var ba=e(va,2),At=r(ba);a(At,{name:"save_lora_weights",anchor:"diffusers.loaders.CogView4LoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(ba);var Po=e(ba,2),qt=r(Po);a(qt,{name:"unfuse_lora",anchor:"diffusers.loaders.CogView4LoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L4999",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Po),o(ma);var Eo=e(ma,2);d(Eo,{title:"WanLoraLoaderMixin",local:"diffusers.loaders.WanLoraLoaderMixin",headingTag:"h2"});var La=e(Eo,2),Ho=r(La);a(Ho,{name:"class diffusers.loaders.WanLoraLoaderMixin",anchor:"diffusers.loaders.WanLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L4255",parameters:[]});var xa=e(Ho,4),Yt=r(xa);a(Yt,{name:"fuse_lora",anchor:"diffusers.loaders.WanLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(xa);var ya=e(xa,2),Qt=r(ya);a(Qt,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.WanLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(ya);var wa=e(ya,2),zt=r(wa);a(zt,{name:"load_lora_weights",anchor:"diffusers.loaders.WanLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(wa);var Ma=e(wa,2),Pt=r(Ma);a(Pt,{name:"lora_state_dict",anchor:"diffusers.loaders.WanLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Ma);var Sa=e(Ma,2),Et=r(Sa);a(Et,{name:"save_lora_weights",anchor:"diffusers.loaders.WanLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Sa);var Ko=e(Sa,2),Ht=r(Ko);a(Ht,{name:"unfuse_lora",anchor:"diffusers.loaders.WanLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L4522",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Ko),o(La);var $o=e(La,2);d($o,{title:"SkyReelsV2LoraLoaderMixin",local:"diffusers.loaders.SkyReelsV2LoraLoaderMixin",headingTag:"h2"});var Ta=e($o,2),Oo=r(Ta);a(Oo,{name:"class diffusers.loaders.SkyReelsV2LoraLoaderMixin",anchor:"diffusers.loaders.SkyReelsV2LoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L4529",parameters:[]});var Na=e(Oo,4),Kt=r(Na);a(Kt,{name:"fuse_lora",anchor:"diffusers.loaders.SkyReelsV2LoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Na);var ka=e(Na,2),$t=r(ka);a($t,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.SkyReelsV2LoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(ka);var Da=e(ka,2),Ot=r(Da);a(Ot,{name:"load_lora_weights",anchor:"diffusers.loaders.SkyReelsV2LoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Da);var Ra=e(Da,2),ed=r(Ra);a(ed,{name:"lora_state_dict",anchor:"diffusers.loaders.SkyReelsV2LoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Ra);var Ua=e(Ra,2),ad=r(Ua);a(ad,{name:"save_lora_weights",anchor:"diffusers.loaders.SkyReelsV2LoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Ua);var es=e(Ua,2),rd=r(es);a(rd,{name:"unfuse_lora",anchor:"diffusers.loaders.SkyReelsV2LoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L4799",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(es),o(Ta);var as=e(Ta,2);d(as,{title:"AmusedLoraLoaderMixin",local:"diffusers.loaders.AmusedLoraLoaderMixin",headingTag:"h2"});var Ja=e(as,2),rs=r(Ja);a(rs,{name:"class diffusers.loaders.AmusedLoraLoaderMixin",anchor:"diffusers.loaders.AmusedLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L2269",parameters:[]});var Za=e(rs,2),od=r(Za);a(od,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.AmusedLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Za);var os=e(Za,2),sd=r(os);a(sd,{name:"save_lora_weights",anchor:"diffusers.loaders.AmusedLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(os),o(Ja);var ss=e(Ja,2);d(ss,{title:"AnimaLoraLoaderMixin",local:"diffusers.loaders.AnimaLoraLoaderMixin",headingTag:"h2"});var Xa=e(ss,2),is=r(Xa);a(is,{name:"class diffusers.loaders.AnimaLoraLoaderMixin",anchor:"diffusers.loaders.AnimaLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L5826",parameters:[]});var Fa=e(is,4),id=r(Fa);a(id,{name:"fuse_lora",anchor:"diffusers.loaders.AnimaLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Fa);var ja=e(Fa,2),td=r(ja);a(td,{name:"load_lora_weights",anchor:"diffusers.loaders.AnimaLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(ja);var Ia=e(ja,2),dd=r(Ia);a(dd,{name:"lora_state_dict",anchor:"diffusers.loaders.AnimaLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Ia);var ts=e(Ia,2),ld=r(ts);a(ld,{name:"unfuse_lora",anchor:"diffusers.loaders.AnimaLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L6007",parameters:[{name:"components",val:": list = ['transformer', 'text_conditioner']"},{name:"**kwargs",val:""}]}),s(2),o(ts),o(Xa);var ds=e(Xa,2);d(ds,{title:"HiDreamImageLoraLoaderMixin",local:"diffusers.loaders.HiDreamImageLoraLoaderMixin",headingTag:"h2"});var Ga=e(ds,2),ls=r(Ga);a(ls,{name:"class diffusers.loaders.HiDreamImageLoraLoaderMixin",anchor:"diffusers.loaders.HiDreamImageLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L5006",parameters:[]});var Wa=e(ls,4),nd=r(Wa);a(nd,{name:"fuse_lora",anchor:"diffusers.loaders.HiDreamImageLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Wa);var Ba=e(Wa,2),fd=r(Ba);a(fd,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.HiDreamImageLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Ba);var Va=e(Ba,2),cd=r(Va);a(cd,{name:"load_lora_weights",anchor:"diffusers.loaders.HiDreamImageLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Va);var Ca=e(Va,2),pd=r(Ca);a(pd,{name:"lora_state_dict",anchor:"diffusers.loaders.HiDreamImageLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Ca);var Aa=e(Ca,2),_d=r(Aa);a(_d,{name:"save_lora_weights",anchor:"diffusers.loaders.HiDreamImageLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Aa);var ns=e(Aa,2),md=r(ns);a(md,{name:"unfuse_lora",anchor:"diffusers.loaders.HiDreamImageLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L5202",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(ns),o(Ga);var fs=e(Ga,2);d(fs,{title:"QwenImageLoraLoaderMixin",local:"diffusers.loaders.QwenImageLoraLoaderMixin",headingTag:"h2"});var qa=e(fs,2),cs=r(qa);a(cs,{name:"class diffusers.loaders.QwenImageLoraLoaderMixin",anchor:"diffusers.loaders.QwenImageLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L5209",parameters:[]});var Ya=e(cs,4),ud=r(Ya);a(ud,{name:"fuse_lora",anchor:"diffusers.loaders.QwenImageLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Ya);var Qa=e(Ya,2),hd=r(Qa);a(hd,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.QwenImageLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Qa);var za=e(Qa,2),gd=r(za);a(gd,{name:"load_lora_weights",anchor:"diffusers.loaders.QwenImageLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(za);var Pa=e(za,2),vd=r(Pa);a(vd,{name:"lora_state_dict",anchor:"diffusers.loaders.QwenImageLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Pa);var Ea=e(Pa,2),bd=r(Ea);a(bd,{name:"save_lora_weights",anchor:"diffusers.loaders.QwenImageLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Ea);var ps=e(Ea,2),Ld=r(ps);a(Ld,{name:"unfuse_lora",anchor:"diffusers.loaders.QwenImageLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L5408",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(ps),o(qa);var _s=e(qa,2);d(_s,{title:"ZImageLoraLoaderMixin",local:"diffusers.loaders.ZImageLoraLoaderMixin",headingTag:"h2"});var Ha=e(_s,2),ms=r(Ha);a(ms,{name:"class diffusers.loaders.ZImageLoraLoaderMixin",anchor:"diffusers.loaders.ZImageLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L5620",parameters:[]});var Ka=e(ms,4),xd=r(Ka);a(xd,{name:"fuse_lora",anchor:"diffusers.loaders.ZImageLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Ka);var $a=e(Ka,2),yd=r($a);a(yd,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.ZImageLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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($a);var Oa=e($a,2),wd=r(Oa);a(wd,{name:"load_lora_weights",anchor:"diffusers.loaders.ZImageLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Oa);var er=e(Oa,2),Md=r(er);a(Md,{name:"lora_state_dict",anchor:"diffusers.loaders.ZImageLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(er);var ar=e(er,2),Sd=r(ar);a(Sd,{name:"save_lora_weights",anchor:"diffusers.loaders.ZImageLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(ar);var us=e(ar,2),Td=r(us);a(Td,{name:"unfuse_lora",anchor:"diffusers.loaders.ZImageLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L5819",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(us),o(Ha);var hs=e(Ha,2);d(hs,{title:"CosmosLoraLoaderMixin",local:"diffusers.loaders.CosmosLoraLoaderMixin",headingTag:"h2"});var rr=e(hs,2),gs=r(rr);a(gs,{name:"class diffusers.loaders.CosmosLoraLoaderMixin",anchor:"diffusers.loaders.CosmosLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L6646",parameters:[]});var or=e(gs,4),Nd=r(or);a(Nd,{name:"fuse_lora",anchor:"diffusers.loaders.CosmosLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(or);var sr=e(or,2),kd=r(sr);a(kd,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.CosmosLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(sr);var ir=e(sr,2),Dd=r(ir);a(Dd,{name:"load_lora_weights",anchor:"diffusers.loaders.CosmosLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(ir);var tr=e(ir,2),Rd=r(tr);a(Rd,{name:"lora_state_dict",anchor:"diffusers.loaders.CosmosLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(tr);var dr=e(tr,2),Ud=r(dr);a(Ud,{name:"save_lora_weights",anchor:"diffusers.loaders.CosmosLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(dr);var vs=e(dr,2),Jd=r(vs);a(Jd,{name:"unfuse_lora",anchor:"diffusers.loaders.CosmosLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L6840",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(vs),o(rr);var bs=e(rr,2);d(bs,{title:"KandinskyLoraLoaderMixin",local:"diffusers.loaders.KandinskyLoraLoaderMixin",headingTag:"h2"});var lr=e(bs,2),Ls=r(lr);a(Ls,{name:"class diffusers.loaders.KandinskyLoraLoaderMixin",anchor:"diffusers.loaders.KandinskyLoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L4055",parameters:[]});var nr=e(Ls,4),Zd=r(nr);a(Zd,{name:"fuse_lora",anchor:"diffusers.loaders.KandinskyLoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(nr);var fr=e(nr,2),Xd=r(fr);a(Xd,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.KandinskyLoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(fr);var cr=e(fr,2),Fd=r(cr);a(Fd,{name:"load_lora_weights",anchor:"diffusers.loaders.KandinskyLoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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 pr=e(cr,2),jd=r(pr);a(jd,{name:"lora_state_dict",anchor:"diffusers.loaders.KandinskyLoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(pr);var _r=e(pr,2),Id=r(_r);a(Id,{name:"save_lora_weights",anchor:"diffusers.loaders.KandinskyLoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(_r);var xs=e(_r,2),Gd=r(xs);a(Gd,{name:"unfuse_lora",anchor:"diffusers.loaders.KandinskyLoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L4248",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(xs),o(lr);var ys=e(lr,2);d(ys,{title:"Ideogram4LoraLoaderMixin",local:"diffusers.loaders.Ideogram4LoraLoaderMixin",headingTag:"h2"});var mr=e(ys,2),ws=r(mr);a(ws,{name:"class diffusers.loaders.Ideogram4LoraLoaderMixin",anchor:"diffusers.loaders.Ideogram4LoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L6228",parameters:[]});var ur=e(ws,4),Wd=r(ur);a(Wd,{name:"fuse_lora",anchor:"diffusers.loaders.Ideogram4LoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(ur);var hr=e(ur,2),Bd=r(hr);a(Bd,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.Ideogram4LoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(hr);var gr=e(hr,2),Vd=r(gr);a(Vd,{name:"load_lora_weights",anchor:"diffusers.loaders.Ideogram4LoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(gr);var vr=e(gr,2),Cd=r(vr);a(Cd,{name:"lora_state_dict",anchor:"diffusers.loaders.Ideogram4LoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(vr);var br=e(vr,2),Ad=r(br);a(Ad,{name:"save_lora_weights",anchor:"diffusers.loaders.Ideogram4LoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(br);var Ms=e(br,2),qd=r(Ms);a(qd,{name:"unfuse_lora",anchor:"diffusers.loaders.Ideogram4LoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L6428",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Ms),o(mr);var Ss=e(mr,2);d(Ss,{title:"Krea2LoraLoaderMixin",local:"diffusers.loaders.Krea2LoraLoaderMixin",headingTag:"h2"});var Lr=e(Ss,2),Ts=r(Lr);a(Ts,{name:"class diffusers.loaders.Krea2LoraLoaderMixin",anchor:"diffusers.loaders.Krea2LoraLoaderMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L5415",parameters:[]});var xr=e(Ts,4),Yd=r(xr);a(Yd,{name:"fuse_lora",anchor:"diffusers.loaders.Krea2LoraLoaderMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(xr);var yr=e(xr,2),Qd=r(yr);a(Qd,{name:"load_lora_into_transformer",anchor:"diffusers.loaders.Krea2LoraLoaderMixin.load_lora_into_transformer",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(yr);var wr=e(yr,2),zd=r(wr);a(zd,{name:"load_lora_weights",anchor:"diffusers.loaders.Krea2LoraLoaderMixin.load_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(wr);var Mr=e(wr,2),Pd=r(Mr);a(Pd,{name:"lora_state_dict",anchor:"diffusers.loaders.Krea2LoraLoaderMixin.lora_state_dict",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Mr);var Sr=e(Mr,2),Ed=r(Sr);a(Ed,{name:"save_lora_weights",anchor:"diffusers.loaders.Krea2LoraLoaderMixin.save_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/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(Sr);var Ns=e(Sr,2),Hd=r(Ns);a(Hd,{name:"unfuse_lora",anchor:"diffusers.loaders.Krea2LoraLoaderMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_pipeline.py#L5613",parameters:[{name:"components",val:": list = ['transformer']"},{name:"**kwargs",val:""}]}),s(2),o(Ns),o(Lr);var ks=e(Lr,2);d(ks,{title:"LoraBaseMixin",local:"diffusers.loaders.lora_base.LoraBaseMixin",headingTag:"h2"});var Tr=e(ks,2),Ds=r(Tr);a(Ds,{name:"class diffusers.loaders.lora_base.LoraBaseMixin",anchor:"diffusers.loaders.lora_base.LoraBaseMixin",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_base.py#L478",parameters:[]});var Nr=e(Ds,4),Rs=r(Nr);a(Rs,{name:"delete_adapters",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.delete_adapters",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_base.py#L873",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 Kd=e(Rs,4);p(Kd,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.delete_adapters.example",children:(t,n)=>{var i=m(),l=e(_(i),2);f(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}),c(t,i)},$$slots:{default:!0}}),o(Nr);var kr=e(Nr,2),Us=r(kr);a(Us,{name:"disable_lora",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.disable_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_base.py#L813",parameters:[]});var $d=e(Us,4);p($d,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.disable_lora.example",children:(t,n)=>{var i=m(),l=e(_(i),2);f(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}),c(t,i)},$$slots:{default:!0}}),o(kr);var Dr=e(kr,2),Js=r(Dr);a(Js,{name:"enable_lora",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.enable_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_base.py#L843",parameters:[]});var Od=e(Js,4);p(Od,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.enable_lora.example",children:(t,n)=>{var i=m(),l=e(_(i),2);f(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}),c(t,i)},$$slots:{default:!0}}),o(Dr);var Rr=e(Dr,2),el=r(Rr);a(el,{name:"enable_lora_hotswap",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.enable_lora_hotswap",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_base.py#L1020",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(Rr);var Ur=e(Rr,2),Zs=r(Ur);a(Zs,{name:"fuse_lora",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.fuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_base.py#L536",parameters:[{name:"components",val:": list[str] | None = None"},{name:"lora_scale",val:": float = 1.0"},{name:"safe_fusing",val:": bool = False"},{name:"adapter_names",val:": list[str] | None = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.fuse_lora.components",description:"<strong>components</strong> — (<code>list[str]</code>): list of LoRA-injectable components to fuse the LoRAs into.",name:"components"},{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.fuse_lora.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>, defaults to 1.0) — | |
| Controls how much to influence the outputs with the LoRA parameters.`,name:"lora_scale"},{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.fuse_lora.safe_fusing",description:`<strong>safe_fusing</strong> (<code>bool</code>, defaults to <code>False</code>) — | |
| Whether to check fused weights for NaN values before fusing and if values are NaN not fusing them.`,name:"safe_fusing"},{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.fuse_lora.adapter_names",description:`<strong>adapter_names</strong> (<code>list[str]</code>, <em>optional</em>) — | |
| Adapter names to be used for fusing. If nothing is passed, all active adapters will be fused.`,name:"adapter_names"}]});var al=e(Zs,6);p(al,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.fuse_lora.example",children:(t,n)=>{var i=m(),l=e(_(i),2);f(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}),c(t,i)},$$slots:{default:!0}}),o(Ur);var Jr=e(Ur,2),Xs=r(Jr);a(Xs,{name:"get_active_adapters",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.get_active_adapters",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_base.py#L911",parameters:[]});var rl=e(Xs,4);p(rl,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.get_active_adapters.example",children:(t,n)=>{var i=m(),l=e(_(i),2);f(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}),c(t,i)},$$slots:{default:!0}}),o(Jr);var Zr=e(Jr,2),ol=r(Zr);a(ol,{name:"get_list_adapters",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.get_list_adapters",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_base.py#L944",parameters:[]}),s(2),o(Zr);var Xr=e(Zr,2),Fs=r(Xr);a(Fs,{name:"set_adapters",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.set_adapters",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_base.py#L710",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 sl=e(Fs,4);p(sl,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.set_adapters.example",children:(t,n)=>{var i=m(),l=e(_(i),2);f(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}),c(t,i)},$$slots:{default:!0}}),o(Xr);var Fr=e(Xr,2),js=r(Fr);a(js,{name:"set_lora_device",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.set_lora_device",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_base.py#L966",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 il=e(js,6);p(il,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.set_lora_device.example",children:(t,n)=>{f(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(Fr);var jr=e(Fr,2),tl=r(jr);a(tl,{name:"unfuse_lora",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.unfuse_lora",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_base.py#L625",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(6),o(jr);var Ir=e(jr,2),Is=r(Ir);a(Is,{name:"unload_lora_weights",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.unload_lora_weights",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_base.py#L513",parameters:[]});var dl=e(Is,4);p(dl,{anchor:"diffusers.loaders.lora_base.LoraBaseMixin.unload_lora_weights.example",children:(t,n)=>{var i=Gr(),l=e(_(i),2);f(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}),c(t,i)},$$slots:{default:!0}}),o(Ir);var Gs=e(Ir,2),ll=r(Gs);a(ll,{name:"write_lora_layers",anchor:"diffusers.loaders.lora_base.LoraBaseMixin.write_lora_layers",source:"https://github.com/huggingface/diffusers/blob/vr_14215/src/diffusers/loaders/lora_base.py#L1043",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(Gs),o(Tr);var nl=e(Tr,2);_l(nl,{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/loaders/lora.md"}),s(2),c(Ws,Wr),gl()}export{Sl as component}; | |
Xet Storage Details
- Size:
- 236 kB
- Xet hash:
- 8bf35453eb3910d656f7341d1193d0caa6f7e1dbf2411f03f464e70211ae48e4
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.