Buckets:
| import"../chunks/DsnmJJEf.js";import{i as T,h as w,C as v,H as c,D as m,E as L,s as S}from"../chunks/BtE7mKSK.js";import{p as y,o as M,s as e,f as P,a as f,b as A,c as p,d as g,n as u,r as h}from"../chunks/jDjavuwI.js";const k='{"title":"SD3Transformer2D","local":"sd3transformer2d","sections":[{"title":"SD3Transformer2DLoadersMixin","local":"diffusers.loaders.SD3Transformer2DLoadersMixin","sections":[],"depth":2}],"depth":1}';var C=g('<meta name="hf:doc:metadata"/>'),I=g('<p></p> <!> <!> <p>This class is useful when <em>only</em> loading weights into a <a href="/docs/diffusers/pr_13881/en/api/models/sd3_transformer2d#diffusers.SD3Transformer2DModel">SD3Transformer2DModel</a>. If you need to load weights into the text encoder or a text encoder and SD3Transformer2DModel, check <a href="lora#diffusers.loaders.SD3LoraLoaderMixin"><code>SD3LoraLoaderMixin</code></a> class instead.</p> <p>The <code>SD3Transformer2DLoadersMixin</code> class currently only loads IP-Adapter weights, but will be used in the future to save weights and load LoRAs.</p> <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>Load IP-Adapters and LoRA layers into a <code>[SD3Transformer2DModel]</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>Sets IP-Adapter attention processors, image projection, and loads state_dict.</p></div></div> <!> <p></p>',1);function q(_,D){y(D,!1),M(()=>{new URLSearchParams(window.location.search).get("fw")}),T();var o=I();w("gimp7f",n=>{var l=C();S(l,"content",k),f(n,l)});var a=e(P(o),2);v(a,{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"});var s=e(a,2);c(s,{title:"SD3Transformer2D",local:"sd3transformer2d",headingTag:"h1"});var t=e(s,8);c(t,{title:"SD3Transformer2DLoadersMixin",local:"diffusers.loaders.SD3Transformer2DLoadersMixin",headingTag:"h2"});var r=e(t,2),i=p(r);m(i,{name:"class diffusers.loaders.SD3Transformer2DLoadersMixin",anchor:"diffusers.loaders.SD3Transformer2DLoadersMixin",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/transformer_sd3.py#L27",parameters:[]});var d=e(i,4),x=p(d);m(x,{name:"_load_ip_adapter_weights",anchor:"diffusers.loaders.SD3Transformer2DLoadersMixin._load_ip_adapter_weights",source:"https://github.com/huggingface/diffusers/blob/vr_13881/src/diffusers/loaders/transformer_sd3.py#L157",parameters:[{name:"state_dict",val:": dict"},{name:"low_cpu_mem_usage",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.loaders.SD3Transformer2DLoadersMixin._load_ip_adapter_weights.state_dict",description:`<strong>state_dict</strong> (<code>Dict</code>) — | |
| State dict with keys “ip_adapter”, which contains parameters for attention processors, and | |
| “image_proj”, which contains parameters for image projection net.`,name:"state_dict"},{anchor:"diffusers.loaders.SD3Transformer2DLoadersMixin._load_ip_adapter_weights.low_cpu_mem_usage",description:`<strong>low_cpu_mem_usage</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code> if torch version >= 1.9.0 else <code>False</code>) — | |
| Speed up model loading only loading the pretrained weights and not initializing the weights. This also | |
| tries to not use more than 1x model size in CPU memory (including peak memory) while loading the model. | |
| Only supported for PyTorch >= 1.9.0. If you are using an older version of PyTorch, setting this | |
| argument to <code>True</code> will raise an error.`,name:"low_cpu_mem_usage"}]}),u(2),h(d),h(r);var b=e(r,2);L(b,{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/loaders/transformer_sd3.md"}),u(2),f(_,o),A()}export{q as component}; | |
Xet Storage Details
- Size:
- 3.97 kB
- Xet hash:
- 91a94dd1eceb1e8f5fdedde642d804d6f8235d4337fc14c88592a92c0658a784
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.