import{s as wn,o as qn,n as Tn}from"../chunks/scheduler.8c3d61f6.js";import{S as Cn,i as Dn,g as r,s as n,r as f,A as Ln,h as a,f as o,c as s,j as b,u as c,x as u,k as v,y as t,a as z,v as m,d as p,t as g,w as h}from"../chunks/index.da70eac4.js";import{T as kn}from"../chunks/Tip.1d9b8c37.js";import{D as $}from"../chunks/Docstring.6b390b9a.js";import{H as Xt,E as Mn}from"../chunks/EditOnGithub.1e64e623.js";function Bn(Fe){let x,S='Learn how to quantize models in the <a href="../quantization/overview">Quantization</a> guide.';return{c(){x=r("p"),x.innerHTML=S},l(w){x=a(w,"P",{"data-svelte-h":!0}),u(x)!=="svelte-1dd515k"&&(x.innerHTML=S)},m(w,ge){z(w,x,ge)},p:Tn,d(w){w&&o(x)}}}function Pn(Fe){let x,S,w,ge,O,Ve,U,Zt='Quantization techniques reduce memory and computational costs by representing weights and activations with lower-precision data types like 8-bit integers (int8). This enables loading larger models you normally wouldn’t be able to fit into memory, and speeding up inference. Diffusers supports 8-bit and 4-bit quantization with <a href="https://huggingface.co/docs/bitsandbytes/en/index" rel="nofollow">bitsandbytes</a>.',je,R,en='Quantization techniques that aren’t supported in Transformers can be added with the <a href="/docs/diffusers/pr_10056/en/api/quantization#diffusers.DiffusersQuantizer">DiffusersQuantizer</a> class.',Ne,q,Se,G,Oe,_,Y,mt,he,tn=`This is a wrapper class about all possible attributes and features that you can play with a model that has been
loaded using <code>bitsandbytes</code>.`,pt,_e,nn="This replaces <code>load_in_8bit</code> or <code>load_in_4bit</code>therefore both options are mutually exclusive.",gt,be,sn=`Currently only supports <code>LLM.int8()</code>, <code>FP4</code>, and <code>NF4</code> quantization. If more methods are added to <code>bitsandbytes</code>,
then more arguments will be added to this class.`,ht,T,J,_t,ve,rn="Returns <code>True</code> if the model is quantizable, <code>False</code> otherwise.",bt,C,W,vt,ye,an="Safety checker that arguments are correct - also replaces some NoneType arguments with their default values.",yt,D,K,$t,$e,on=`This method returns the quantization method used for the model. If the model is not quantizable, it returns
<code>None</code>.`,zt,L,X,xt,ze,dn=`Removes all attributes from config which correspond to the default config attributes for better readability and
serializes to a Python dictionary.`,Ue,Z,Re,i,ee,wt,xe,ln=`Abstract class of the HuggingFace quantizer. Supports for now quantizing HF diffusers models for inference and/or
quantization. This class is used only for diffusers.models.modeling_utils.ModelMixin.from_pretrained and cannot be
easily used outside the scope of that method yet.`,qt,we,un=`Attributes
quantization_config (<code>diffusers.quantizers.quantization_config.QuantizationConfigMixin</code>):
The quantization config that defines the quantization parameters of your model that you want to quantize.
modules_to_not_convert (<code>List[str]</code>, <em>optional</em>):
The list of module names to not convert when quantizing the model.
required_packages (<code>List[str]</code>, <em>optional</em>):
The list of required pip packages to install prior to using the quantizer
requires_calibration (<code>bool</code>):
Whether the quantization method requires to calibrate the model before using it.`,Tt,k,te,Ct,qe,fn="adjust max_memory argument for infer_auto_device_map() if extra memory is needed for quantization",Dt,M,ne,Lt,Te,cn=`Override this method if you want to adjust the <code>target_dtype</code> variable used in <code>from_pretrained</code> to compute the
device_map in case the device_map is a <code>str</code>. E.g. for bitsandbytes we force-set <code>target_dtype</code> to <code>torch.int8</code>
and for 4-bit we pass a custom enum <code>accelerate.CustomDtype.int4</code>.`,kt,B,se,Mt,Ce,mn=`checks if a loaded state_dict component is part of quantized param + some validation; only defined for
quantization methods that require to create a new parameters for quantization.`,Bt,P,re,Pt,De,pn="checks if the quantized param has expected shape.",Qt,Q,ae,Ht,Le,gn="takes needed components from state_dict and creates quantized param.",At,H,oe,Et,ke,hn=`Potentially dequantize the model to retrive the original model, with some loss in accuracy / performance. Note
not all quantization schemes support this.`,It,A,ie,Ft,Me,_n=`returns dtypes for modules that are not quantized - used for the computation of the device_map in case one
passes a str as a device_map. The method will use the <code>modules_to_not_convert</code> that is modified in
<code>_process_model_before_weight_loading</code>. <code>diffusers</code> models don’t have any <code>modules_to_not_convert</code> attributes
yet but this can change soon in the future.`,Vt,E,de,jt,Be,bn=`Post-process the model post weights loading. Make sure to override the abstract method
<code>_process_model_after_weight_loading</code>.`,Nt,I,le,St,Pe,vn=`Setting model attributes and/or converting model before weights loading. At this point the model should be
initialized on the meta device so you can freely manipulate the skeleton of the model in order to replace
modules in-place. Make sure to override the abstract method <code>_process_model_before_weight_loading</code>.`,Ot,F,ue,Ut,Qe,yn=`Override this method if you want to pass a override the existing device map with a new one. E.g. for
bitsandbytes, since <code>accelerate</code> is a hard requirement, if no device_map is passed, the device_map is set to
\`“auto”“`,Rt,V,fe,Gt,He,$n="Override this method if you want to adjust the <code>missing_keys</code>.",Yt,j,ce,Jt,Ae,zn=`Some quantization methods require to explicitly set the dtype of the model to a target dtype. You need to
override this method in case you want to make sure that behavior is preserved`,Wt,N,me,Kt,Ee,xn=`This method is used to potentially check for potential conflicts with arguments that are passed in
<code>from_pretrained</code>. You need to define it for all future quantizers that are integrated with diffusers. If no
explicit check are needed, simply return nothing.`,Ge,pe,Ye,Ie,Je;return O=new Xt({props:{title:"Quantization",local:"quantization",headingTag:"h1"}}),q=new kn({props:{$$slots:{default:[Bn]},$$scope:{ctx:Fe}}}),G=new Xt({props:{title:"BitsAndBytesConfig",local:"diffusers.BitsAndBytesConfig",headingTag:"h2"}}),Y=new $({props:{name:"class diffusers.BitsAndBytesConfig",anchor:"diffusers.BitsAndBytesConfig",parameters:[{name:"load_in_8bit",val:" = False"},{name:"load_in_4bit",val:" = False"},{name:"llm_int8_threshold",val:" = 6.0"},{name:"llm_int8_skip_modules",val:" = None"},{name:"llm_int8_enable_fp32_cpu_offload",val:" = False"},{name:"llm_int8_has_fp16_weight",val:" = False"},{name:"bnb_4bit_compute_dtype",val:" = None"},{name:"bnb_4bit_quant_type",val:" = 'fp4'"},{name:"bnb_4bit_use_double_quant",val:" = False"},{name:"bnb_4bit_quant_storage",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.BitsAndBytesConfig.load_in_8bit",description:`<strong>load_in_8bit</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
This flag is used to enable 8-bit quantization with LLM.int8().`,name:"load_in_8bit"},{anchor:"diffusers.BitsAndBytesConfig.load_in_4bit",description:`<strong>load_in_4bit</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
This flag is used to enable 4-bit quantization by replacing the Linear layers with FP4/NF4 layers from
<code>bitsandbytes</code>.`,name:"load_in_4bit"},{anchor:"diffusers.BitsAndBytesConfig.llm_int8_threshold",description:`<strong>llm_int8_threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 6.0) &#x2014;
This corresponds to the outlier threshold for outlier detection as described in <code>LLM.int8() : 8-bit Matrix Multiplication for Transformers at Scale</code> paper: <a href="https://arxiv.org/abs/2208.07339" rel="nofollow">https://arxiv.org/abs/2208.07339</a> Any hidden states value
that is above this threshold will be considered an outlier and the operation on those values will be done
in fp16. Values are usually normally distributed, that is, most values are in the range [-3.5, 3.5], but
there are some exceptional systematic outliers that are very differently distributed for large models.
These outliers are often in the interval [-60, -6] or [6, 60]. Int8 quantization works well for values of
magnitude ~5, but beyond that, there is a significant performance penalty. A good default threshold is 6,
but a lower threshold might be needed for more unstable models (small models, fine-tuning).`,name:"llm_int8_threshold"},{anchor:"diffusers.BitsAndBytesConfig.llm_int8_skip_modules",description:`<strong>llm_int8_skip_modules</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
An explicit list of the modules that we do not want to convert in 8-bit. This is useful for models such as
Jukebox that has several heads in different places and not necessarily at the last position. For example
for <code>CausalLM</code> models, the last <code>lm_head</code> is typically kept in its original <code>dtype</code>.`,name:"llm_int8_skip_modules"},{anchor:"diffusers.BitsAndBytesConfig.llm_int8_enable_fp32_cpu_offload",description:`<strong>llm_int8_enable_fp32_cpu_offload</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
This flag is used for advanced use cases and users that are aware of this feature. If you want to split
your model in different parts and run some parts in int8 on GPU and some parts in fp32 on CPU, you can use
this flag. This is useful for offloading large models such as <code>google/flan-t5-xxl</code>. Note that the int8
operations will not be run on CPU.`,name:"llm_int8_enable_fp32_cpu_offload"},{anchor:"diffusers.BitsAndBytesConfig.llm_int8_has_fp16_weight",description:`<strong>llm_int8_has_fp16_weight</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
This flag runs LLM.int8() with 16-bit main weights. This is useful for fine-tuning as the weights do not
have to be converted back and forth for the backward pass.`,name:"llm_int8_has_fp16_weight"},{anchor:"diffusers.BitsAndBytesConfig.bnb_4bit_compute_dtype",description:`<strong>bnb_4bit_compute_dtype</strong> (<code>torch.dtype</code> or str, <em>optional</em>, defaults to <code>torch.float32</code>) &#x2014;
This sets the computational type which might be different than the input type. For example, inputs might be
fp32, but computation can be set to bf16 for speedups.`,name:"bnb_4bit_compute_dtype"},{anchor:"diffusers.BitsAndBytesConfig.bnb_4bit_quant_type",description:`<strong>bnb_4bit_quant_type</strong> (<code>str</code>,  <em>optional</em>, defaults to <code>&quot;fp4&quot;</code>) &#x2014;
This sets the quantization data type in the bnb.nn.Linear4Bit layers. Options are FP4 and NF4 data types
which are specified by <code>fp4</code> or <code>nf4</code>.`,name:"bnb_4bit_quant_type"},{anchor:"diffusers.BitsAndBytesConfig.bnb_4bit_use_double_quant",description:`<strong>bnb_4bit_use_double_quant</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
This flag is used for nested quantization where the quantization constants from the first quantization are
quantized again.`,name:"bnb_4bit_use_double_quant"},{anchor:"diffusers.BitsAndBytesConfig.bnb_4bit_quant_storage",description:`<strong>bnb_4bit_quant_storage</strong> (<code>torch.dtype</code> or str, <em>optional</em>, defaults to <code>torch.uint8</code>) &#x2014;
This sets the storage type to pack the quanitzed 4-bit prarams.`,name:"bnb_4bit_quant_storage"},{anchor:"diffusers.BitsAndBytesConfig.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional parameters from which to initialize the configuration object.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/vr_10056/src/diffusers/quantizers/quantization_config.py#L161"}}),J=new $({props:{name:"is_quantizable",anchor:"diffusers.BitsAndBytesConfig.is_quantizable",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_10056/src/diffusers/quantizers/quantization_config.py#L334"}}),W=new $({props:{name:"post_init",anchor:"diffusers.BitsAndBytesConfig.post_init",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_10056/src/diffusers/quantizers/quantization_config.py#L297"}}),K=new $({props:{name:"quantization_method",anchor:"diffusers.BitsAndBytesConfig.quantization_method",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_10056/src/diffusers/quantizers/quantization_config.py#L340"}}),X=new $({props:{name:"to_diff_dict",anchor:"diffusers.BitsAndBytesConfig.to_diff_dict",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_10056/src/diffusers/quantizers/quantization_config.py#L371",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>Dictionary of all the attributes that make up this configuration instance,</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>Dict[str, Any]</code></p>
`}}),Z=new Xt({props:{title:"DiffusersQuantizer",local:"diffusers.DiffusersQuantizer",headingTag:"h2"}}),ee=new $({props:{name:"class diffusers.DiffusersQuantizer",anchor:"diffusers.DiffusersQuantizer",parameters:[{name:"quantization_config",val:": QuantizationConfigMixin"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/diffusers/blob/vr_10056/src/diffusers/quantizers/base.py#L34"}}),te=new $({props:{name:"adjust_max_memory",anchor:"diffusers.DiffusersQuantizer.adjust_max_memory",parameters:[{name:"max_memory",val:": typing.Dict[str, typing.Union[int, str]]"}],source:"https://github.com/huggingface/diffusers/blob/vr_10056/src/diffusers/quantizers/base.py#L133"}}),ne=new $({props:{name:"adjust_target_dtype",anchor:"diffusers.DiffusersQuantizer.adjust_target_dtype",parameters:[{name:"torch_dtype",val:": torch.dtype"}],parametersDescription:[{anchor:"diffusers.DiffusersQuantizer.adjust_target_dtype.torch_dtype",description:`<strong>torch_dtype</strong> (<code>torch.dtype</code>, <em>optional</em>) &#x2014;
The torch_dtype that is used to compute the device_map.`,name:"torch_dtype"}],source:"https://github.com/huggingface/diffusers/blob/vr_10056/src/diffusers/quantizers/base.py#L91"}}),se=new $({props:{name:"check_if_quantized_param",anchor:"diffusers.DiffusersQuantizer.check_if_quantized_param",parameters:[{name:"model",val:": ModelMixin"},{name:"param_value",val:": torch.Tensor"},{name:"param_name",val:": str"},{name:"state_dict",val:": typing.Dict[str, typing.Any]"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/diffusers/blob/vr_10056/src/diffusers/quantizers/base.py#L137"}}),re=new $({props:{name:"check_quantized_param_shape",anchor:"diffusers.DiffusersQuantizer.check_quantized_param_shape",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/diffusers/blob/vr_10056/src/diffusers/quantizers/base.py#L157"}}),ae=new $({props:{name:"create_quantized_param",anchor:"diffusers.DiffusersQuantizer.create_quantized_param",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/diffusers/blob/vr_10056/src/diffusers/quantizers/base.py#L151"}}),oe=new $({props:{name:"dequantize",anchor:"diffusers.DiffusersQuantizer.dequantize",parameters:[{name:"model",val:""}],source:"https://github.com/huggingface/diffusers/blob/vr_10056/src/diffusers/quantizers/base.py#L200"}}),ie=new $({props:{name:"get_special_dtypes_update",anchor:"diffusers.DiffusersQuantizer.get_special_dtypes_update",parameters:[{name:"model",val:""},{name:"torch_dtype",val:": torch.dtype"}],parametersDescription:[{anchor:"diffusers.DiffusersQuantizer.get_special_dtypes_update.model",description:`<strong>model</strong> (<code>~diffusers.models.modeling_utils.ModelMixin</code>) &#x2014;
The model to quantize`,name:"model"},{anchor:"diffusers.DiffusersQuantizer.get_special_dtypes_update.torch_dtype",description:`<strong>torch_dtype</strong> (<code>torch.dtype</code>) &#x2014;
The dtype passed in <code>from_pretrained</code> method.`,name:"torch_dtype"}],source:"https://github.com/huggingface/diffusers/blob/vr_10056/src/diffusers/quantizers/base.py#L113"}}),de=new $({props:{name:"postprocess_model",anchor:"diffusers.DiffusersQuantizer.postprocess_model",parameters:[{name:"model",val:": ModelMixin"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.DiffusersQuantizer.postprocess_model.model",description:`<strong>model</strong> (<code>~diffusers.models.modeling_utils.ModelMixin</code>) &#x2014;
The model to quantize`,name:"model"},{anchor:"diffusers.DiffusersQuantizer.postprocess_model.kwargs",description:`<strong>kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
The keyword arguments that are passed along <code>_process_model_after_weight_loading</code>.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/vr_10056/src/diffusers/quantizers/base.py#L187"}}),le=new $({props:{name:"preprocess_model",anchor:"diffusers.DiffusersQuantizer.preprocess_model",parameters:[{name:"model",val:": ModelMixin"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.DiffusersQuantizer.preprocess_model.model",description:`<strong>model</strong> (<code>~diffusers.models.modeling_utils.ModelMixin</code>) &#x2014;
The model to quantize`,name:"model"},{anchor:"diffusers.DiffusersQuantizer.preprocess_model.kwargs",description:`<strong>kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
The keyword arguments that are passed along <code>_process_model_before_weight_loading</code>.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/vr_10056/src/diffusers/quantizers/base.py#L171"}}),ue=new $({props:{name:"update_device_map",anchor:"diffusers.DiffusersQuantizer.update_device_map",parameters:[{name:"device_map",val:": typing.Optional[typing.Dict[str, typing.Any]]"}],parametersDescription:[{anchor:"diffusers.DiffusersQuantizer.update_device_map.device_map",description:`<strong>device_map</strong> (<code>Union[dict, str]</code>, <em>optional</em>) &#x2014;
The device_map that is passed through the <code>from_pretrained</code> method.`,name:"device_map"}],source:"https://github.com/huggingface/diffusers/blob/vr_10056/src/diffusers/quantizers/base.py#L79"}}),fe=new $({props:{name:"update_missing_keys",anchor:"diffusers.DiffusersQuantizer.update_missing_keys",parameters:[{name:"model",val:""},{name:"missing_keys",val:": typing.List[str]"},{name:"prefix",val:": str"}],parametersDescription:[{anchor:"diffusers.DiffusersQuantizer.update_missing_keys.missing_keys",description:`<strong>missing_keys</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
The list of missing keys in the checkpoint compared to the state dict of the model`,name:"missing_keys"}],source:"https://github.com/huggingface/diffusers/blob/vr_10056/src/diffusers/quantizers/base.py#L103"}}),ce=new $({props:{name:"update_torch_dtype",anchor:"diffusers.DiffusersQuantizer.update_torch_dtype",parameters:[{name:"torch_dtype",val:": torch.dtype"}],parametersDescription:[{anchor:"diffusers.DiffusersQuantizer.update_torch_dtype.torch_dtype",description:`<strong>torch_dtype</strong> (<code>torch.dtype</code>) &#x2014;
The input dtype that is passed in <code>from_pretrained</code>`,name:"torch_dtype"}],source:"https://github.com/huggingface/diffusers/blob/vr_10056/src/diffusers/quantizers/base.py#L68"}}),me=new $({props:{name:"validate_environment",anchor:"diffusers.DiffusersQuantizer.validate_environment",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/diffusers/blob/vr_10056/src/diffusers/quantizers/base.py#L163"}}),pe=new Mn({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/quantization.md"}}),{c(){x=r("meta"),S=n(),w=r("p"),ge=n(),f(O.$$.fragment),Ve=n(),U=r("p"),U.innerHTML=Zt,je=n(),R=r("p"),R.innerHTML=en,Ne=n(),f(q.$$.fragment),Se=n(),f(G.$$.fragment),Oe=n(),_=r("div"),f(Y.$$.fragment),mt=n(),he=r("p"),he.innerHTML=tn,pt=n(),_e=r("p"),_e.innerHTML=nn,gt=n(),be=r("p"),be.innerHTML=sn,ht=n(),T=r("div"),f(J.$$.fragment),_t=n(),ve=r("p"),ve.innerHTML=rn,bt=n(),C=r("div"),f(W.$$.fragment),vt=n(),ye=r("p"),ye.textContent=an,yt=n(),D=r("div"),f(K.$$.fragment),$t=n(),$e=r("p"),$e.innerHTML=on,zt=n(),L=r("div"),f(X.$$.fragment),xt=n(),ze=r("p"),ze.textContent=dn,Ue=n(),f(Z.$$.fragment),Re=n(),i=r("div"),f(ee.$$.fragment),wt=n(),xe=r("p"),xe.textContent=ln,qt=n(),we=r("p"),we.innerHTML=un,Tt=n(),k=r("div"),f(te.$$.fragment),Ct=n(),qe=r("p"),qe.textContent=fn,Dt=n(),M=r("div"),f(ne.$$.fragment),Lt=n(),Te=r("p"),Te.innerHTML=cn,kt=n(),B=r("div"),f(se.$$.fragment),Mt=n(),Ce=r("p"),Ce.textContent=mn,Bt=n(),P=r("div"),f(re.$$.fragment),Pt=n(),De=r("p"),De.textContent=pn,Qt=n(),Q=r("div"),f(ae.$$.fragment),Ht=n(),Le=r("p"),Le.textContent=gn,At=n(),H=r("div"),f(oe.$$.fragment),Et=n(),ke=r("p"),ke.textContent=hn,It=n(),A=r("div"),f(ie.$$.fragment),Ft=n(),Me=r("p"),Me.innerHTML=_n,Vt=n(),E=r("div"),f(de.$$.fragment),jt=n(),Be=r("p"),Be.innerHTML=bn,Nt=n(),I=r("div"),f(le.$$.fragment),St=n(),Pe=r("p"),Pe.innerHTML=vn,Ot=n(),F=r("div"),f(ue.$$.fragment),Ut=n(),Qe=r("p"),Qe.innerHTML=yn,Rt=n(),V=r("div"),f(fe.$$.fragment),Gt=n(),He=r("p"),He.innerHTML=$n,Yt=n(),j=r("div"),f(ce.$$.fragment),Jt=n(),Ae=r("p"),Ae.textContent=zn,Wt=n(),N=r("div"),f(me.$$.fragment),Kt=n(),Ee=r("p"),Ee.innerHTML=xn,Ge=n(),f(pe.$$.fragment),Ye=n(),Ie=r("p"),this.h()},l(e){const l=Ln("svelte-u9bgzb",document.head);x=a(l,"META",{name:!0,content:!0}),l.forEach(o),S=s(e),w=a(e,"P",{}),b(w).forEach(o),ge=s(e),c(O.$$.fragment,e),Ve=s(e),U=a(e,"P",{"data-svelte-h":!0}),u(U)!=="svelte-gx66go"&&(U.innerHTML=Zt),je=s(e),R=a(e,"P",{"data-svelte-h":!0}),u(R)!=="svelte-xu0kmp"&&(R.innerHTML=en),Ne=s(e),c(q.$$.fragment,e),Se=s(e),c(G.$$.fragment,e),Oe=s(e),_=a(e,"DIV",{class:!0});var y=b(_);c(Y.$$.fragment,y),mt=s(y),he=a(y,"P",{"data-svelte-h":!0}),u(he)!=="svelte-woamwr"&&(he.innerHTML=tn),pt=s(y),_e=a(y,"P",{"data-svelte-h":!0}),u(_e)!=="svelte-ki5gis"&&(_e.innerHTML=nn),gt=s(y),be=a(y,"P",{"data-svelte-h":!0}),u(be)!=="svelte-8qsk2q"&&(be.innerHTML=sn),ht=s(y),T=a(y,"DIV",{class:!0});var We=b(T);c(J.$$.fragment,We),_t=s(We),ve=a(We,"P",{"data-svelte-h":!0}),u(ve)!=="svelte-10tvzyv"&&(ve.innerHTML=rn),We.forEach(o),bt=s(y),C=a(y,"DIV",{class:!0});var Ke=b(C);c(W.$$.fragment,Ke),vt=s(Ke),ye=a(Ke,"P",{"data-svelte-h":!0}),u(ye)!=="svelte-gy26u4"&&(ye.textContent=an),Ke.forEach(o),yt=s(y),D=a(y,"DIV",{class:!0});var Xe=b(D);c(K.$$.fragment,Xe),$t=s(Xe),$e=a(Xe,"P",{"data-svelte-h":!0}),u($e)!=="svelte-19bn0da"&&($e.innerHTML=on),Xe.forEach(o),zt=s(y),L=a(y,"DIV",{class:!0});var Ze=b(L);c(X.$$.fragment,Ze),xt=s(Ze),ze=a(Ze,"P",{"data-svelte-h":!0}),u(ze)!=="svelte-1p6bdas"&&(ze.textContent=dn),Ze.forEach(o),y.forEach(o),Ue=s(e),c(Z.$$.fragment,e),Re=s(e),i=a(e,"DIV",{class:!0});var d=b(i);c(ee.$$.fragment,d),wt=s(d),xe=a(d,"P",{"data-svelte-h":!0}),u(xe)!=="svelte-n1gm3c"&&(xe.textContent=ln),qt=s(d),we=a(d,"P",{"data-svelte-h":!0}),u(we)!=="svelte-1fnduym"&&(we.innerHTML=un),Tt=s(d),k=a(d,"DIV",{class:!0});var et=b(k);c(te.$$.fragment,et),Ct=s(et),qe=a(et,"P",{"data-svelte-h":!0}),u(qe)!=="svelte-1d4i4z7"&&(qe.textContent=fn),et.forEach(o),Dt=s(d),M=a(d,"DIV",{class:!0});var tt=b(M);c(ne.$$.fragment,tt),Lt=s(tt),Te=a(tt,"P",{"data-svelte-h":!0}),u(Te)!=="svelte-eyxa3y"&&(Te.innerHTML=cn),tt.forEach(o),kt=s(d),B=a(d,"DIV",{class:!0});var nt=b(B);c(se.$$.fragment,nt),Mt=s(nt),Ce=a(nt,"P",{"data-svelte-h":!0}),u(Ce)!=="svelte-y0lxmf"&&(Ce.textContent=mn),nt.forEach(o),Bt=s(d),P=a(d,"DIV",{class:!0});var st=b(P);c(re.$$.fragment,st),Pt=s(st),De=a(st,"P",{"data-svelte-h":!0}),u(De)!=="svelte-1170ss6"&&(De.textContent=pn),st.forEach(o),Qt=s(d),Q=a(d,"DIV",{class:!0});var rt=b(Q);c(ae.$$.fragment,rt),Ht=s(rt),Le=a(rt,"P",{"data-svelte-h":!0}),u(Le)!=="svelte-odkanz"&&(Le.textContent=gn),rt.forEach(o),At=s(d),H=a(d,"DIV",{class:!0});var at=b(H);c(oe.$$.fragment,at),Et=s(at),ke=a(at,"P",{"data-svelte-h":!0}),u(ke)!=="svelte-1wzx7fq"&&(ke.textContent=hn),at.forEach(o),It=s(d),A=a(d,"DIV",{class:!0});var ot=b(A);c(ie.$$.fragment,ot),Ft=s(ot),Me=a(ot,"P",{"data-svelte-h":!0}),u(Me)!=="svelte-1cb2fzf"&&(Me.innerHTML=_n),ot.forEach(o),Vt=s(d),E=a(d,"DIV",{class:!0});var it=b(E);c(de.$$.fragment,it),jt=s(it),Be=a(it,"P",{"data-svelte-h":!0}),u(Be)!=="svelte-6rgq61"&&(Be.innerHTML=bn),it.forEach(o),Nt=s(d),I=a(d,"DIV",{class:!0});var dt=b(I);c(le.$$.fragment,dt),St=s(dt),Pe=a(dt,"P",{"data-svelte-h":!0}),u(Pe)!=="svelte-wiwxpv"&&(Pe.innerHTML=vn),dt.forEach(o),Ot=s(d),F=a(d,"DIV",{class:!0});var lt=b(F);c(ue.$$.fragment,lt),Ut=s(lt),Qe=a(lt,"P",{"data-svelte-h":!0}),u(Qe)!=="svelte-5g503h"&&(Qe.innerHTML=yn),lt.forEach(o),Rt=s(d),V=a(d,"DIV",{class:!0});var ut=b(V);c(fe.$$.fragment,ut),Gt=s(ut),He=a(ut,"P",{"data-svelte-h":!0}),u(He)!=="svelte-13hqoy0"&&(He.innerHTML=$n),ut.forEach(o),Yt=s(d),j=a(d,"DIV",{class:!0});var ft=b(j);c(ce.$$.fragment,ft),Jt=s(ft),Ae=a(ft,"P",{"data-svelte-h":!0}),u(Ae)!=="svelte-udr2k7"&&(Ae.textContent=zn),ft.forEach(o),Wt=s(d),N=a(d,"DIV",{class:!0});var ct=b(N);c(me.$$.fragment,ct),Kt=s(ct),Ee=a(ct,"P",{"data-svelte-h":!0}),u(Ee)!=="svelte-1ra2q1u"&&(Ee.innerHTML=xn),ct.forEach(o),d.forEach(o),Ge=s(e),c(pe.$$.fragment,e),Ye=s(e),Ie=a(e,"P",{}),b(Ie).forEach(o),this.h()},h(){v(x,"name","hf:doc:metadata"),v(x,"content",Qn),v(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(_,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(i,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,l){t(document.head,x),z(e,S,l),z(e,w,l),z(e,ge,l),m(O,e,l),z(e,Ve,l),z(e,U,l),z(e,je,l),z(e,R,l),z(e,Ne,l),m(q,e,l),z(e,Se,l),m(G,e,l),z(e,Oe,l),z(e,_,l),m(Y,_,null),t(_,mt),t(_,he),t(_,pt),t(_,_e),t(_,gt),t(_,be),t(_,ht),t(_,T),m(J,T,null),t(T,_t),t(T,ve),t(_,bt),t(_,C),m(W,C,null),t(C,vt),t(C,ye),t(_,yt),t(_,D),m(K,D,null),t(D,$t),t(D,$e),t(_,zt),t(_,L),m(X,L,null),t(L,xt),t(L,ze),z(e,Ue,l),m(Z,e,l),z(e,Re,l),z(e,i,l),m(ee,i,null),t(i,wt),t(i,xe),t(i,qt),t(i,we),t(i,Tt),t(i,k),m(te,k,null),t(k,Ct),t(k,qe),t(i,Dt),t(i,M),m(ne,M,null),t(M,Lt),t(M,Te),t(i,kt),t(i,B),m(se,B,null),t(B,Mt),t(B,Ce),t(i,Bt),t(i,P),m(re,P,null),t(P,Pt),t(P,De),t(i,Qt),t(i,Q),m(ae,Q,null),t(Q,Ht),t(Q,Le),t(i,At),t(i,H),m(oe,H,null),t(H,Et),t(H,ke),t(i,It),t(i,A),m(ie,A,null),t(A,Ft),t(A,Me),t(i,Vt),t(i,E),m(de,E,null),t(E,jt),t(E,Be),t(i,Nt),t(i,I),m(le,I,null),t(I,St),t(I,Pe),t(i,Ot),t(i,F),m(ue,F,null),t(F,Ut),t(F,Qe),t(i,Rt),t(i,V),m(fe,V,null),t(V,Gt),t(V,He),t(i,Yt),t(i,j),m(ce,j,null),t(j,Jt),t(j,Ae),t(i,Wt),t(i,N),m(me,N,null),t(N,Kt),t(N,Ee),z(e,Ge,l),m(pe,e,l),z(e,Ye,l),z(e,Ie,l),Je=!0},p(e,[l]){const y={};l&2&&(y.$$scope={dirty:l,ctx:e}),q.$set(y)},i(e){Je||(p(O.$$.fragment,e),p(q.$$.fragment,e),p(G.$$.fragment,e),p(Y.$$.fragment,e),p(J.$$.fragment,e),p(W.$$.fragment,e),p(K.$$.fragment,e),p(X.$$.fragment,e),p(Z.$$.fragment,e),p(ee.$$.fragment,e),p(te.$$.fragment,e),p(ne.$$.fragment,e),p(se.$$.fragment,e),p(re.$$.fragment,e),p(ae.$$.fragment,e),p(oe.$$.fragment,e),p(ie.$$.fragment,e),p(de.$$.fragment,e),p(le.$$.fragment,e),p(ue.$$.fragment,e),p(fe.$$.fragment,e),p(ce.$$.fragment,e),p(me.$$.fragment,e),p(pe.$$.fragment,e),Je=!0)},o(e){g(O.$$.fragment,e),g(q.$$.fragment,e),g(G.$$.fragment,e),g(Y.$$.fragment,e),g(J.$$.fragment,e),g(W.$$.fragment,e),g(K.$$.fragment,e),g(X.$$.fragment,e),g(Z.$$.fragment,e),g(ee.$$.fragment,e),g(te.$$.fragment,e),g(ne.$$.fragment,e),g(se.$$.fragment,e),g(re.$$.fragment,e),g(ae.$$.fragment,e),g(oe.$$.fragment,e),g(ie.$$.fragment,e),g(de.$$.fragment,e),g(le.$$.fragment,e),g(ue.$$.fragment,e),g(fe.$$.fragment,e),g(ce.$$.fragment,e),g(me.$$.fragment,e),g(pe.$$.fragment,e),Je=!1},d(e){e&&(o(S),o(w),o(ge),o(Ve),o(U),o(je),o(R),o(Ne),o(Se),o(Oe),o(_),o(Ue),o(Re),o(i),o(Ge),o(Ye),o(Ie)),o(x),h(O,e),h(q,e),h(G,e),h(Y),h(J),h(W),h(K),h(X),h(Z,e),h(ee),h(te),h(ne),h(se),h(re),h(ae),h(oe),h(ie),h(de),h(le),h(ue),h(fe),h(ce),h(me),h(pe,e)}}}const Qn='{"title":"Quantization","local":"quantization","sections":[{"title":"BitsAndBytesConfig","local":"diffusers.BitsAndBytesConfig","sections":[],"depth":2},{"title":"DiffusersQuantizer","local":"diffusers.DiffusersQuantizer","sections":[],"depth":2}],"depth":1}';function Hn(Fe){return qn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class jn extends Cn{constructor(x){super(),Dn(this,x,Hn,Pn,wn,{})}}export{jn as component};
