import{s as Zo,o as No,n as Vo}from"../chunks/scheduler.8c3d61f6.js";import{S as Wo,i as So,g as i,s as n,r as l,A as Xo,h as a,f as r,c as o,j as _,u as f,x as g,k as b,y as t,a as v,v as c,d as u,t as m,w as p}from"../chunks/index.da70eac4.js";import{T as Ro}from"../chunks/Tip.6f698f24.js";import{D as y}from"../chunks/Docstring.367be9ed.js";import{C as Oo}from"../chunks/CodeBlock.a9c4becf.js";import{E as Yo}from"../chunks/ExampleCodeBlock.dd9ee828.js";import{H as Je,E as Ko}from"../chunks/getInferenceSnippets.cb466318.js";function ei(Ge){let $,Q='Learn how to quantize models in the <a href="../quantization/overview">Quantization</a> guide.';return{c(){$=i("p"),$.innerHTML=Q},l(C){$=a(C,"P",{"data-svelte-h":!0}),g($)!=="svelte-1dd515k"&&($.innerHTML=Q)},m(C,T){v(C,$,T)},p:Vo,d(C){C&&r($)}}}function ti(Ge){let $,Q="Example:",C,T,k;return T=new Oo({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEZsdXhUcmFuc2Zvcm1lcjJETW9kZWwlMkMlMjBUb3JjaEFvQ29uZmlnJTBBJTBBJTIzJTIwQU9CYXNlQ29uZmlnLWJhc2VkJTIwY29uZmlndXJhdGlvbiUwQWZyb20lMjB0b3JjaGFvLnF1YW50aXphdGlvbiUyMGltcG9ydCUyMEludDhXZWlnaHRPbmx5Q29uZmlnJTBBJTBBcXVhbnRpemF0aW9uX2NvbmZpZyUyMCUzRCUyMFRvcmNoQW9Db25maWcoSW50OFdlaWdodE9ubHlDb25maWcoKSklMEElMEElMjMlMjBTdHJpbmctYmFzZWQlMjBjb25maWclMEFxdWFudGl6YXRpb25fY29uZmlnJTIwJTNEJTIwVG9yY2hBb0NvbmZpZyglMjJpbnQ4d28lMjIpJTBBdHJhbnNmb3JtZXIlMjAlM0QlMjBGbHV4VHJhbnNmb3JtZXIyRE1vZGVsLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJibGFjay1mb3Jlc3QtbGFicyUyRkZsdXguMS1EZXYlMjIlMkMlMEElMjAlMjAlMjAlMjBzdWJmb2xkZXIlM0QlMjJ0cmFuc2Zvcm1lciUyMiUyQyUwQSUyMCUyMCUyMCUyMHF1YW50aXphdGlvbl9jb25maWclM0RxdWFudGl6YXRpb25fY29uZmlnJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5iZmxvYXQxNiUyQyUwQSk=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> FluxTransformer2DModel, TorchAoConfig

<span class="hljs-comment"># AOBaseConfig-based configuration</span>
<span class="hljs-keyword">from</span> torchao.quantization <span class="hljs-keyword">import</span> Int8WeightOnlyConfig

quantization_config = TorchAoConfig(Int8WeightOnlyConfig())

<span class="hljs-comment"># String-based config</span>
quantization_config = TorchAoConfig(<span class="hljs-string">&quot;int8wo&quot;</span>)
transformer = FluxTransformer2DModel.from_pretrained(
    <span class="hljs-string">&quot;black-forest-labs/Flux.1-Dev&quot;</span>,
    subfolder=<span class="hljs-string">&quot;transformer&quot;</span>,
    quantization_config=quantization_config,
    torch_dtype=torch.bfloat16,
)`,wrap:!1}}),{c(){$=i("p"),$.textContent=Q,C=n(),l(T.$$.fragment)},l(z){$=a(z,"P",{"data-svelte-h":!0}),g($)!=="svelte-11lpom8"&&($.textContent=Q),C=o(z),f(T.$$.fragment,z)},m(z,L){v(z,$,L),v(z,C,L),c(T,z,L),k=!0},p:Vo,i(z){k||(u(T.$$.fragment,z),k=!0)},o(z){m(T.$$.fragment,z),k=!1},d(z){z&&(r($),r(C)),p(T,z)}}}function ni(Ge){let $,Q,C,T,k,z,L,co="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.",zt,P,xt,re,qt,B,se,ln,Ve,uo='Configuration class to be used when applying quantization on-the-fly to <a href="/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline.from_pretrained">from_pretrained()</a>.',Ct,de,Tt,w,le,fn,Ze,mo=`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>.`,cn,Ne,po="This replaces <code>load_in_8bit</code> or <code>load_in_4bit</code> therefore both options are mutually exclusive.",un,We,go=`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.`,mn,F,fe,pn,Se,ho="Returns <code>True</code> if the model is quantizable, <code>False</code> otherwise.",gn,E,ce,hn,Xe,_o="Safety checker that arguments are correct - also replaces some NoneType arguments with their default values.",_n,I,ue,bn,Re,bo=`This method returns the quantization method used for the model. If the model is not quantizable, it returns
<code>None</code>.`,vn,H,me,yn,Oe,vo=`Removes all attributes from config which correspond to the default config attributes for better readability and
serializes to a Python dictionary.`,Mt,pe,kt,A,ge,$n,Ye,yo="This is a config class for GGUF Quantization techniques.",Dt,he,Lt,M,_e,wn,Ke,$o=`This is a wrapper class about all possible attributes and features that you can play with a model that has been
loaded using <code>quanto</code>.`,zn,et,wo=`modules_to_not_convert (<code>list</code>, <em>optional</em>, default to <code>None</code>):
The list of modules to not quantize, useful for quantizing models that explicitly require to have some
modules left in their original precision (e.g. Whisper encoder, Llava encoder, Mixtral gate layers).`,xn,j,be,qn,tt,zo="Safety checker that arguments are correct",Qt,ve,Bt,q,ye,Cn,nt,xo="This is a config class for torchao quantization/sparsity techniques.",Tn,U,Mn,J,$e,kn,ot,qo="Create configuration from a dictionary.",Dn,G,we,Ln,it,Co="Create the appropriate quantization method based on configuration.",Qn,V,ze,Bn,at,To="Convert configuration to a dictionary.",At,xe,Pt,d,qe,An,rt,Mo=`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.`,Pn,st,ko=`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.`,Fn,Z,Ce,En,dt,Do="adjust max_memory argument for infer_auto_device_map() if extra memory is needed for quantization",In,N,Te,Hn,lt,Lo=`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>.`,jn,W,Me,Un,ft,Qo=`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.`,Jn,S,ke,Gn,ct,Bo="checks if the quantized param has expected shape.",Vn,X,De,Zn,ut,Ao="takes needed components from state_dict and creates quantized param.",Nn,R,Le,Wn,mt,Po=`Potentially dequantize the model to retrieve the original model, with some loss in accuracy / performance. Note
not all quantization schemes support this.`,Sn,O,Qe,Xn,pt,Fo=`The factor to be used in <code>caching_allocator_warmup</code> to get the number of bytes to pre-allocate to warm up cuda.
A factor of 2 means we allocate all bytes in the empty model (since we allocate in fp16), a factor of 4 means
we allocate half the memory of the weights residing in the empty model, etc…`,Rn,Y,Be,On,gt,Eo=`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.`,Yn,K,Ae,Kn,ht,Io=`Post-process the model post weights loading. Make sure to override the abstract method
<code>_process_model_after_weight_loading</code>.`,eo,ee,Pe,to,_t,Ho=`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>.`,no,te,Fe,oo,bt,jo=`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”“`,io,ne,Ee,ao,vt,Uo="Override this method if you want to adjust the <code>missing_keys</code>.",ro,oe,Ie,so,yt,Jo=`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`,lo,ie,He,fo,$t,Go=`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.`,Ft,je,Et,wt,It;return k=new Je({props:{title:"Quantization",local:"quantization",headingTag:"h1"}}),P=new Ro({props:{$$slots:{default:[ei]},$$scope:{ctx:Ge}}}),re=new Je({props:{title:"PipelineQuantizationConfig",local:"diffusers.PipelineQuantizationConfig",headingTag:"h2"}}),se=new y({props:{name:"class diffusers.PipelineQuantizationConfig",anchor:"diffusers.PipelineQuantizationConfig",parameters:[{name:"quant_backend",val:": str = None"},{name:"quant_kwargs",val:": typing.Dict[str, typing.Union[str, float, int, dict]] = None"},{name:"components_to_quantize",val:": typing.Union[typing.List[str], str, NoneType] = None"},{name:"quant_mapping",val:": typing.Dict[str, typing.Union[diffusers.quantizers.quantization_config.QuantizationConfigMixin, ForwardRef('TransformersQuantConfigMixin')]] = None"}],parametersDescription:[{anchor:"diffusers.PipelineQuantizationConfig.quant_backend",description:`<strong>quant_backend</strong> (<code>str</code>) &#x2014; Quantization backend to be used. When using this option, we assume that the backend
is available to both <code>diffusers</code> and <code>transformers</code>.`,name:"quant_backend"},{anchor:"diffusers.PipelineQuantizationConfig.quant_kwargs",description:"<strong>quant_kwargs</strong> (<code>dict</code>) &#x2014; Params to initialize the quantization backend class.",name:"quant_kwargs"},{anchor:"diffusers.PipelineQuantizationConfig.components_to_quantize",description:"<strong>components_to_quantize</strong> (<code>list</code>) &#x2014; Components of a pipeline to be quantized.",name:"components_to_quantize"},{anchor:"diffusers.PipelineQuantizationConfig.quant_mapping",description:`<strong>quant_mapping</strong> (<code>dict</code>) &#x2014; Mapping defining the quantization specs to be used for the pipeline
components. When using this argument, users are not expected to provide <code>quant_backend</code>, <code>quant_kawargs</code>,
and <code>components_to_quantize</code>.`,name:"quant_mapping"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/pipe_quant_config.py#L33"}}),de=new Je({props:{title:"BitsAndBytesConfig",local:"diffusers.BitsAndBytesConfig",headingTag:"h2"}}),le=new y({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://huggingface.co/papers/2208.07339" rel="nofollow">https://huggingface.co/papers/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/main/src/diffusers/quantizers/quantization_config.py#L180"}}),fe=new y({props:{name:"is_quantizable",anchor:"diffusers.BitsAndBytesConfig.is_quantizable",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/quantization_config.py#L359"}}),ce=new y({props:{name:"post_init",anchor:"diffusers.BitsAndBytesConfig.post_init",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/quantization_config.py#L322"}}),ue=new y({props:{name:"quantization_method",anchor:"diffusers.BitsAndBytesConfig.quantization_method",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/quantization_config.py#L365"}}),me=new y({props:{name:"to_diff_dict",anchor:"diffusers.BitsAndBytesConfig.to_diff_dict",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/quantization_config.py#L396",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>
`}}),pe=new Je({props:{title:"GGUFQuantizationConfig",local:"diffusers.GGUFQuantizationConfig",headingTag:"h2"}}),ge=new y({props:{name:"class diffusers.GGUFQuantizationConfig",anchor:"diffusers.GGUFQuantizationConfig",parameters:[{name:"compute_dtype",val:": typing.Optional[ForwardRef('torch.dtype')] = None"}],parametersDescription:[{anchor:"diffusers.GGUFQuantizationConfig.compute_dtype",description:`<strong>compute_dtype</strong> &#x2014; (<code>torch.dtype</code>, defaults to <code>torch.float32</code>):
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:"compute_dtype"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/quantization_config.py#L420"}}),he=new Je({props:{title:"QuantoConfig",local:"diffusers.QuantoConfig",headingTag:"h2"}}),_e=new y({props:{name:"class diffusers.QuantoConfig",anchor:"diffusers.QuantoConfig",parameters:[{name:"weights_dtype",val:": str = 'int8'"},{name:"modules_to_not_convert",val:": typing.Optional[typing.List[str]] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.QuantoConfig.weights_dtype",description:`<strong>weights_dtype</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;int8&quot;</code>) &#x2014;
The target dtype for the weights after quantization. Supported values are (&#x201C;float8&#x201D;,&#x201C;int8&#x201D;,&#x201C;int4&#x201D;,&#x201C;int2&#x201D;)`,name:"weights_dtype"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/quantization_config.py#L816"}}),be=new y({props:{name:"post_init",anchor:"diffusers.QuantoConfig.post_init",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/quantization_config.py#L841"}}),ve=new Je({props:{title:"TorchAoConfig",local:"diffusers.TorchAoConfig",headingTag:"h2"}}),ye=new y({props:{name:"class diffusers.TorchAoConfig",anchor:"diffusers.TorchAoConfig",parameters:[{name:"quant_type",val:": typing.Union[str, ForwardRef('AOBaseConfig')]"},{name:"modules_to_not_convert",val:": typing.Optional[typing.List[str]] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.TorchAoConfig.quant_type",description:`<strong>quant_type</strong> (Union[<code>str</code>, AOBaseConfig]) &#x2014;
The type of quantization we want to use, currently supporting:</p>
<ul>
<li>
<p><strong>Integer quantization:</strong></p>
<ul>
<li>Full function names: <code>int4_weight_only</code>, <code>int8_dynamic_activation_int4_weight</code>,
<code>int8_weight_only</code>, <code>int8_dynamic_activation_int8_weight</code></li>
<li>Shorthands: <code>int4wo</code>, <code>int4dq</code>, <code>int8wo</code>, <code>int8dq</code></li>
</ul>
</li>
<li>
<p><strong>Floating point 8-bit quantization:</strong></p>
<ul>
<li>Full function names: <code>float8_weight_only</code>, <code>float8_dynamic_activation_float8_weight</code>,
<code>float8_static_activation_float8_weight</code></li>
<li>Shorthands: <code>float8wo</code>, <code>float8wo_e5m2</code>, <code>float8wo_e4m3</code>, <code>float8dq</code>, <code>float8dq_e4m3</code>,
<code>float8_e4m3_tensor</code>, <code>float8_e4m3_row</code>,</li>
</ul>
</li>
<li>
<p><strong>Floating point X-bit quantization:</strong></p>
<ul>
<li>Full function names: <code>fpx_weight_only</code></li>
<li>Shorthands: <code>fpX_eAwB</code>, where <code>X</code> is the number of bits (between <code>1</code> to <code>7</code>), <code>A</code> is the number
of exponent bits and <code>B</code> is the number of mantissa bits. The constraint of <code>X == A + B + 1</code> must
be satisfied for a given shorthand notation.</li>
</ul>
</li>
<li>
<p><strong>Unsigned Integer quantization:</strong></p>
<ul>
<li>Full function names: <code>uintx_weight_only</code></li>
<li>Shorthands: <code>uint1wo</code>, <code>uint2wo</code>, <code>uint3wo</code>, <code>uint4wo</code>, <code>uint5wo</code>, <code>uint6wo</code>, <code>uint7wo</code></li>
</ul>
</li>
<li>
<p>An AOBaseConfig instance: for more advanced configuration options.</p>
</li>
</ul>`,name:"quant_type"},{anchor:"diffusers.TorchAoConfig.modules_to_not_convert",description:`<strong>modules_to_not_convert</strong> (<code>List[str]</code>, <em>optional</em>, default to <code>None</code>) &#x2014;
The list of modules to not quantize, useful for quantizing models that explicitly require to have some
modules left in their original precision.`,name:"modules_to_not_convert"},{anchor:"diffusers.TorchAoConfig.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
The keyword arguments for the chosen type of quantization, for example, int4_weight_only quantization
supports two keyword arguments <code>group_size</code> and <code>inner_k_tiles</code> currently. More API examples and
documentation of arguments can be found in
<a href="https://github.com/pytorch/ao/tree/main/torchao/quantization#other-available-quantization-techniques" rel="nofollow">https://github.com/pytorch/ao/tree/main/torchao/quantization#other-available-quantization-techniques</a>`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/quantization_config.py#L443"}}),U=new Yo({props:{anchor:"diffusers.TorchAoConfig.example",$$slots:{default:[ti]},$$scope:{ctx:Ge}}}),$e=new y({props:{name:"from_dict",anchor:"diffusers.TorchAoConfig.from_dict",parameters:[{name:"config_dict",val:""},{name:"return_unused_kwargs",val:" = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/quantization_config.py#L589"}}),we=new y({props:{name:"get_apply_tensor_subclass",anchor:"diffusers.TorchAoConfig.get_apply_tensor_subclass",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/quantization_config.py#L760"}}),ze=new y({props:{name:"to_dict",anchor:"diffusers.TorchAoConfig.to_dict",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/quantization_config.py#L561"}}),xe=new Je({props:{title:"DiffusersQuantizer",local:"diffusers.DiffusersQuantizer",headingTag:"h2"}}),qe=new y({props:{name:"class diffusers.DiffusersQuantizer",anchor:"diffusers.DiffusersQuantizer",parameters:[{name:"quantization_config",val:": QuantizationConfigMixin"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/base.py#L34"}}),Ce=new y({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/main/src/diffusers/quantizers/base.py#L133"}}),Te=new y({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/main/src/diffusers/quantizers/base.py#L91"}}),Me=new y({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/main/src/diffusers/quantizers/base.py#L137"}}),ke=new y({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/main/src/diffusers/quantizers/base.py#L157"}}),De=new y({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/main/src/diffusers/quantizers/base.py#L151"}}),Le=new y({props:{name:"dequantize",anchor:"diffusers.DiffusersQuantizer.dequantize",parameters:[{name:"model",val:""}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/base.py#L200"}}),Qe=new y({props:{name:"get_cuda_warm_up_factor",anchor:"diffusers.DiffusersQuantizer.get_cuda_warm_up_factor",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/base.py#L212"}}),Be=new y({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/main/src/diffusers/quantizers/base.py#L113"}}),Ae=new y({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/main/src/diffusers/quantizers/base.py#L187"}}),Pe=new y({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/main/src/diffusers/quantizers/base.py#L171"}}),Fe=new y({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/main/src/diffusers/quantizers/base.py#L79"}}),Ee=new y({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/main/src/diffusers/quantizers/base.py#L103"}}),Ie=new y({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/main/src/diffusers/quantizers/base.py#L68"}}),He=new y({props:{name:"validate_environment",anchor:"diffusers.DiffusersQuantizer.validate_environment",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/base.py#L163"}}),je=new Ko({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/quantization.md"}}),{c(){$=i("meta"),Q=n(),C=i("p"),T=n(),l(k.$$.fragment),z=n(),L=i("p"),L.textContent=co,zt=n(),l(P.$$.fragment),xt=n(),l(re.$$.fragment),qt=n(),B=i("div"),l(se.$$.fragment),ln=n(),Ve=i("p"),Ve.innerHTML=uo,Ct=n(),l(de.$$.fragment),Tt=n(),w=i("div"),l(le.$$.fragment),fn=n(),Ze=i("p"),Ze.innerHTML=mo,cn=n(),Ne=i("p"),Ne.innerHTML=po,un=n(),We=i("p"),We.innerHTML=go,mn=n(),F=i("div"),l(fe.$$.fragment),pn=n(),Se=i("p"),Se.innerHTML=ho,gn=n(),E=i("div"),l(ce.$$.fragment),hn=n(),Xe=i("p"),Xe.textContent=_o,_n=n(),I=i("div"),l(ue.$$.fragment),bn=n(),Re=i("p"),Re.innerHTML=bo,vn=n(),H=i("div"),l(me.$$.fragment),yn=n(),Oe=i("p"),Oe.textContent=vo,Mt=n(),l(pe.$$.fragment),kt=n(),A=i("div"),l(ge.$$.fragment),$n=n(),Ye=i("p"),Ye.textContent=yo,Dt=n(),l(he.$$.fragment),Lt=n(),M=i("div"),l(_e.$$.fragment),wn=n(),Ke=i("p"),Ke.innerHTML=$o,zn=n(),et=i("p"),et.innerHTML=wo,xn=n(),j=i("div"),l(be.$$.fragment),qn=n(),tt=i("p"),tt.textContent=zo,Qt=n(),l(ve.$$.fragment),Bt=n(),q=i("div"),l(ye.$$.fragment),Cn=n(),nt=i("p"),nt.textContent=xo,Tn=n(),l(U.$$.fragment),Mn=n(),J=i("div"),l($e.$$.fragment),kn=n(),ot=i("p"),ot.textContent=qo,Dn=n(),G=i("div"),l(we.$$.fragment),Ln=n(),it=i("p"),it.textContent=Co,Qn=n(),V=i("div"),l(ze.$$.fragment),Bn=n(),at=i("p"),at.textContent=To,At=n(),l(xe.$$.fragment),Pt=n(),d=i("div"),l(qe.$$.fragment),An=n(),rt=i("p"),rt.textContent=Mo,Pn=n(),st=i("p"),st.innerHTML=ko,Fn=n(),Z=i("div"),l(Ce.$$.fragment),En=n(),dt=i("p"),dt.textContent=Do,In=n(),N=i("div"),l(Te.$$.fragment),Hn=n(),lt=i("p"),lt.innerHTML=Lo,jn=n(),W=i("div"),l(Me.$$.fragment),Un=n(),ft=i("p"),ft.textContent=Qo,Jn=n(),S=i("div"),l(ke.$$.fragment),Gn=n(),ct=i("p"),ct.textContent=Bo,Vn=n(),X=i("div"),l(De.$$.fragment),Zn=n(),ut=i("p"),ut.textContent=Ao,Nn=n(),R=i("div"),l(Le.$$.fragment),Wn=n(),mt=i("p"),mt.textContent=Po,Sn=n(),O=i("div"),l(Qe.$$.fragment),Xn=n(),pt=i("p"),pt.innerHTML=Fo,Rn=n(),Y=i("div"),l(Be.$$.fragment),On=n(),gt=i("p"),gt.innerHTML=Eo,Yn=n(),K=i("div"),l(Ae.$$.fragment),Kn=n(),ht=i("p"),ht.innerHTML=Io,eo=n(),ee=i("div"),l(Pe.$$.fragment),to=n(),_t=i("p"),_t.innerHTML=Ho,no=n(),te=i("div"),l(Fe.$$.fragment),oo=n(),bt=i("p"),bt.innerHTML=jo,io=n(),ne=i("div"),l(Ee.$$.fragment),ao=n(),vt=i("p"),vt.innerHTML=Uo,ro=n(),oe=i("div"),l(Ie.$$.fragment),so=n(),yt=i("p"),yt.textContent=Jo,lo=n(),ie=i("div"),l(He.$$.fragment),fo=n(),$t=i("p"),$t.innerHTML=Go,Ft=n(),l(je.$$.fragment),Et=n(),wt=i("p"),this.h()},l(e){const s=Xo("svelte-u9bgzb",document.head);$=a(s,"META",{name:!0,content:!0}),s.forEach(r),Q=o(e),C=a(e,"P",{}),_(C).forEach(r),T=o(e),f(k.$$.fragment,e),z=o(e),L=a(e,"P",{"data-svelte-h":!0}),g(L)!=="svelte-1balldr"&&(L.textContent=co),zt=o(e),f(P.$$.fragment,e),xt=o(e),f(re.$$.fragment,e),qt=o(e),B=a(e,"DIV",{class:!0});var Ue=_(B);f(se.$$.fragment,Ue),ln=o(Ue),Ve=a(Ue,"P",{"data-svelte-h":!0}),g(Ve)!=="svelte-l98qrs"&&(Ve.innerHTML=uo),Ue.forEach(r),Ct=o(e),f(de.$$.fragment,e),Tt=o(e),w=a(e,"DIV",{class:!0});var x=_(w);f(le.$$.fragment,x),fn=o(x),Ze=a(x,"P",{"data-svelte-h":!0}),g(Ze)!=="svelte-woamwr"&&(Ze.innerHTML=mo),cn=o(x),Ne=a(x,"P",{"data-svelte-h":!0}),g(Ne)!=="svelte-izpi0w"&&(Ne.innerHTML=po),un=o(x),We=a(x,"P",{"data-svelte-h":!0}),g(We)!=="svelte-8qsk2q"&&(We.innerHTML=go),mn=o(x),F=a(x,"DIV",{class:!0});var Ht=_(F);f(fe.$$.fragment,Ht),pn=o(Ht),Se=a(Ht,"P",{"data-svelte-h":!0}),g(Se)!=="svelte-10tvzyv"&&(Se.innerHTML=ho),Ht.forEach(r),gn=o(x),E=a(x,"DIV",{class:!0});var jt=_(E);f(ce.$$.fragment,jt),hn=o(jt),Xe=a(jt,"P",{"data-svelte-h":!0}),g(Xe)!=="svelte-gy26u4"&&(Xe.textContent=_o),jt.forEach(r),_n=o(x),I=a(x,"DIV",{class:!0});var Ut=_(I);f(ue.$$.fragment,Ut),bn=o(Ut),Re=a(Ut,"P",{"data-svelte-h":!0}),g(Re)!=="svelte-19bn0da"&&(Re.innerHTML=bo),Ut.forEach(r),vn=o(x),H=a(x,"DIV",{class:!0});var Jt=_(H);f(me.$$.fragment,Jt),yn=o(Jt),Oe=a(Jt,"P",{"data-svelte-h":!0}),g(Oe)!=="svelte-1p6bdas"&&(Oe.textContent=vo),Jt.forEach(r),x.forEach(r),Mt=o(e),f(pe.$$.fragment,e),kt=o(e),A=a(e,"DIV",{class:!0});var Gt=_(A);f(ge.$$.fragment,Gt),$n=o(Gt),Ye=a(Gt,"P",{"data-svelte-h":!0}),g(Ye)!=="svelte-1r606z3"&&(Ye.textContent=yo),Gt.forEach(r),Dt=o(e),f(he.$$.fragment,e),Lt=o(e),M=a(e,"DIV",{class:!0});var ae=_(M);f(_e.$$.fragment,ae),wn=o(ae),Ke=a(ae,"P",{"data-svelte-h":!0}),g(Ke)!=="svelte-b8v0f"&&(Ke.innerHTML=$o),zn=o(ae),et=a(ae,"P",{"data-svelte-h":!0}),g(et)!=="svelte-7hlgr"&&(et.innerHTML=wo),xn=o(ae),j=a(ae,"DIV",{class:!0});var Vt=_(j);f(be.$$.fragment,Vt),qn=o(Vt),tt=a(Vt,"P",{"data-svelte-h":!0}),g(tt)!=="svelte-1ozftb6"&&(tt.textContent=zo),Vt.forEach(r),ae.forEach(r),Qt=o(e),f(ve.$$.fragment,e),Bt=o(e),q=a(e,"DIV",{class:!0});var D=_(q);f(ye.$$.fragment,D),Cn=o(D),nt=a(D,"P",{"data-svelte-h":!0}),g(nt)!=="svelte-1pwo8e0"&&(nt.textContent=xo),Tn=o(D),f(U.$$.fragment,D),Mn=o(D),J=a(D,"DIV",{class:!0});var Zt=_(J);f($e.$$.fragment,Zt),kn=o(Zt),ot=a(Zt,"P",{"data-svelte-h":!0}),g(ot)!=="svelte-x30fz7"&&(ot.textContent=qo),Zt.forEach(r),Dn=o(D),G=a(D,"DIV",{class:!0});var Nt=_(G);f(we.$$.fragment,Nt),Ln=o(Nt),it=a(Nt,"P",{"data-svelte-h":!0}),g(it)!=="svelte-1gkr97u"&&(it.textContent=Co),Nt.forEach(r),Qn=o(D),V=a(D,"DIV",{class:!0});var Wt=_(V);f(ze.$$.fragment,Wt),Bn=o(Wt),at=a(Wt,"P",{"data-svelte-h":!0}),g(at)!=="svelte-11q54ot"&&(at.textContent=To),Wt.forEach(r),D.forEach(r),At=o(e),f(xe.$$.fragment,e),Pt=o(e),d=a(e,"DIV",{class:!0});var h=_(d);f(qe.$$.fragment,h),An=o(h),rt=a(h,"P",{"data-svelte-h":!0}),g(rt)!=="svelte-n1gm3c"&&(rt.textContent=Mo),Pn=o(h),st=a(h,"P",{"data-svelte-h":!0}),g(st)!=="svelte-1fnduym"&&(st.innerHTML=ko),Fn=o(h),Z=a(h,"DIV",{class:!0});var St=_(Z);f(Ce.$$.fragment,St),En=o(St),dt=a(St,"P",{"data-svelte-h":!0}),g(dt)!=="svelte-1d4i4z7"&&(dt.textContent=Do),St.forEach(r),In=o(h),N=a(h,"DIV",{class:!0});var Xt=_(N);f(Te.$$.fragment,Xt),Hn=o(Xt),lt=a(Xt,"P",{"data-svelte-h":!0}),g(lt)!=="svelte-eyxa3y"&&(lt.innerHTML=Lo),Xt.forEach(r),jn=o(h),W=a(h,"DIV",{class:!0});var Rt=_(W);f(Me.$$.fragment,Rt),Un=o(Rt),ft=a(Rt,"P",{"data-svelte-h":!0}),g(ft)!=="svelte-y0lxmf"&&(ft.textContent=Qo),Rt.forEach(r),Jn=o(h),S=a(h,"DIV",{class:!0});var Ot=_(S);f(ke.$$.fragment,Ot),Gn=o(Ot),ct=a(Ot,"P",{"data-svelte-h":!0}),g(ct)!=="svelte-1170ss6"&&(ct.textContent=Bo),Ot.forEach(r),Vn=o(h),X=a(h,"DIV",{class:!0});var Yt=_(X);f(De.$$.fragment,Yt),Zn=o(Yt),ut=a(Yt,"P",{"data-svelte-h":!0}),g(ut)!=="svelte-odkanz"&&(ut.textContent=Ao),Yt.forEach(r),Nn=o(h),R=a(h,"DIV",{class:!0});var Kt=_(R);f(Le.$$.fragment,Kt),Wn=o(Kt),mt=a(Kt,"P",{"data-svelte-h":!0}),g(mt)!=="svelte-upajm7"&&(mt.textContent=Po),Kt.forEach(r),Sn=o(h),O=a(h,"DIV",{class:!0});var en=_(O);f(Qe.$$.fragment,en),Xn=o(en),pt=a(en,"P",{"data-svelte-h":!0}),g(pt)!=="svelte-72nwdx"&&(pt.innerHTML=Fo),en.forEach(r),Rn=o(h),Y=a(h,"DIV",{class:!0});var tn=_(Y);f(Be.$$.fragment,tn),On=o(tn),gt=a(tn,"P",{"data-svelte-h":!0}),g(gt)!=="svelte-1cb2fzf"&&(gt.innerHTML=Eo),tn.forEach(r),Yn=o(h),K=a(h,"DIV",{class:!0});var nn=_(K);f(Ae.$$.fragment,nn),Kn=o(nn),ht=a(nn,"P",{"data-svelte-h":!0}),g(ht)!=="svelte-6rgq61"&&(ht.innerHTML=Io),nn.forEach(r),eo=o(h),ee=a(h,"DIV",{class:!0});var on=_(ee);f(Pe.$$.fragment,on),to=o(on),_t=a(on,"P",{"data-svelte-h":!0}),g(_t)!=="svelte-wiwxpv"&&(_t.innerHTML=Ho),on.forEach(r),no=o(h),te=a(h,"DIV",{class:!0});var an=_(te);f(Fe.$$.fragment,an),oo=o(an),bt=a(an,"P",{"data-svelte-h":!0}),g(bt)!=="svelte-5g503h"&&(bt.innerHTML=jo),an.forEach(r),io=o(h),ne=a(h,"DIV",{class:!0});var rn=_(ne);f(Ee.$$.fragment,rn),ao=o(rn),vt=a(rn,"P",{"data-svelte-h":!0}),g(vt)!=="svelte-13hqoy0"&&(vt.innerHTML=Uo),rn.forEach(r),ro=o(h),oe=a(h,"DIV",{class:!0});var sn=_(oe);f(Ie.$$.fragment,sn),so=o(sn),yt=a(sn,"P",{"data-svelte-h":!0}),g(yt)!=="svelte-udr2k7"&&(yt.textContent=Jo),sn.forEach(r),lo=o(h),ie=a(h,"DIV",{class:!0});var dn=_(ie);f(He.$$.fragment,dn),fo=o(dn),$t=a(dn,"P",{"data-svelte-h":!0}),g($t)!=="svelte-1ra2q1u"&&($t.innerHTML=Go),dn.forEach(r),h.forEach(r),Ft=o(e),f(je.$$.fragment,e),Et=o(e),wt=a(e,"P",{}),_(wt).forEach(r),this.h()},h(){b($,"name","hf:doc:metadata"),b($,"content",oi),b(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(d,"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,s){t(document.head,$),v(e,Q,s),v(e,C,s),v(e,T,s),c(k,e,s),v(e,z,s),v(e,L,s),v(e,zt,s),c(P,e,s),v(e,xt,s),c(re,e,s),v(e,qt,s),v(e,B,s),c(se,B,null),t(B,ln),t(B,Ve),v(e,Ct,s),c(de,e,s),v(e,Tt,s),v(e,w,s),c(le,w,null),t(w,fn),t(w,Ze),t(w,cn),t(w,Ne),t(w,un),t(w,We),t(w,mn),t(w,F),c(fe,F,null),t(F,pn),t(F,Se),t(w,gn),t(w,E),c(ce,E,null),t(E,hn),t(E,Xe),t(w,_n),t(w,I),c(ue,I,null),t(I,bn),t(I,Re),t(w,vn),t(w,H),c(me,H,null),t(H,yn),t(H,Oe),v(e,Mt,s),c(pe,e,s),v(e,kt,s),v(e,A,s),c(ge,A,null),t(A,$n),t(A,Ye),v(e,Dt,s),c(he,e,s),v(e,Lt,s),v(e,M,s),c(_e,M,null),t(M,wn),t(M,Ke),t(M,zn),t(M,et),t(M,xn),t(M,j),c(be,j,null),t(j,qn),t(j,tt),v(e,Qt,s),c(ve,e,s),v(e,Bt,s),v(e,q,s),c(ye,q,null),t(q,Cn),t(q,nt),t(q,Tn),c(U,q,null),t(q,Mn),t(q,J),c($e,J,null),t(J,kn),t(J,ot),t(q,Dn),t(q,G),c(we,G,null),t(G,Ln),t(G,it),t(q,Qn),t(q,V),c(ze,V,null),t(V,Bn),t(V,at),v(e,At,s),c(xe,e,s),v(e,Pt,s),v(e,d,s),c(qe,d,null),t(d,An),t(d,rt),t(d,Pn),t(d,st),t(d,Fn),t(d,Z),c(Ce,Z,null),t(Z,En),t(Z,dt),t(d,In),t(d,N),c(Te,N,null),t(N,Hn),t(N,lt),t(d,jn),t(d,W),c(Me,W,null),t(W,Un),t(W,ft),t(d,Jn),t(d,S),c(ke,S,null),t(S,Gn),t(S,ct),t(d,Vn),t(d,X),c(De,X,null),t(X,Zn),t(X,ut),t(d,Nn),t(d,R),c(Le,R,null),t(R,Wn),t(R,mt),t(d,Sn),t(d,O),c(Qe,O,null),t(O,Xn),t(O,pt),t(d,Rn),t(d,Y),c(Be,Y,null),t(Y,On),t(Y,gt),t(d,Yn),t(d,K),c(Ae,K,null),t(K,Kn),t(K,ht),t(d,eo),t(d,ee),c(Pe,ee,null),t(ee,to),t(ee,_t),t(d,no),t(d,te),c(Fe,te,null),t(te,oo),t(te,bt),t(d,io),t(d,ne),c(Ee,ne,null),t(ne,ao),t(ne,vt),t(d,ro),t(d,oe),c(Ie,oe,null),t(oe,so),t(oe,yt),t(d,lo),t(d,ie),c(He,ie,null),t(ie,fo),t(ie,$t),v(e,Ft,s),c(je,e,s),v(e,Et,s),v(e,wt,s),It=!0},p(e,[s]){const Ue={};s&2&&(Ue.$$scope={dirty:s,ctx:e}),P.$set(Ue);const x={};s&2&&(x.$$scope={dirty:s,ctx:e}),U.$set(x)},i(e){It||(u(k.$$.fragment,e),u(P.$$.fragment,e),u(re.$$.fragment,e),u(se.$$.fragment,e),u(de.$$.fragment,e),u(le.$$.fragment,e),u(fe.$$.fragment,e),u(ce.$$.fragment,e),u(ue.$$.fragment,e),u(me.$$.fragment,e),u(pe.$$.fragment,e),u(ge.$$.fragment,e),u(he.$$.fragment,e),u(_e.$$.fragment,e),u(be.$$.fragment,e),u(ve.$$.fragment,e),u(ye.$$.fragment,e),u(U.$$.fragment,e),u($e.$$.fragment,e),u(we.$$.fragment,e),u(ze.$$.fragment,e),u(xe.$$.fragment,e),u(qe.$$.fragment,e),u(Ce.$$.fragment,e),u(Te.$$.fragment,e),u(Me.$$.fragment,e),u(ke.$$.fragment,e),u(De.$$.fragment,e),u(Le.$$.fragment,e),u(Qe.$$.fragment,e),u(Be.$$.fragment,e),u(Ae.$$.fragment,e),u(Pe.$$.fragment,e),u(Fe.$$.fragment,e),u(Ee.$$.fragment,e),u(Ie.$$.fragment,e),u(He.$$.fragment,e),u(je.$$.fragment,e),It=!0)},o(e){m(k.$$.fragment,e),m(P.$$.fragment,e),m(re.$$.fragment,e),m(se.$$.fragment,e),m(de.$$.fragment,e),m(le.$$.fragment,e),m(fe.$$.fragment,e),m(ce.$$.fragment,e),m(ue.$$.fragment,e),m(me.$$.fragment,e),m(pe.$$.fragment,e),m(ge.$$.fragment,e),m(he.$$.fragment,e),m(_e.$$.fragment,e),m(be.$$.fragment,e),m(ve.$$.fragment,e),m(ye.$$.fragment,e),m(U.$$.fragment,e),m($e.$$.fragment,e),m(we.$$.fragment,e),m(ze.$$.fragment,e),m(xe.$$.fragment,e),m(qe.$$.fragment,e),m(Ce.$$.fragment,e),m(Te.$$.fragment,e),m(Me.$$.fragment,e),m(ke.$$.fragment,e),m(De.$$.fragment,e),m(Le.$$.fragment,e),m(Qe.$$.fragment,e),m(Be.$$.fragment,e),m(Ae.$$.fragment,e),m(Pe.$$.fragment,e),m(Fe.$$.fragment,e),m(Ee.$$.fragment,e),m(Ie.$$.fragment,e),m(He.$$.fragment,e),m(je.$$.fragment,e),It=!1},d(e){e&&(r(Q),r(C),r(T),r(z),r(L),r(zt),r(xt),r(qt),r(B),r(Ct),r(Tt),r(w),r(Mt),r(kt),r(A),r(Dt),r(Lt),r(M),r(Qt),r(Bt),r(q),r(At),r(Pt),r(d),r(Ft),r(Et),r(wt)),r($),p(k,e),p(P,e),p(re,e),p(se),p(de,e),p(le),p(fe),p(ce),p(ue),p(me),p(pe,e),p(ge),p(he,e),p(_e),p(be),p(ve,e),p(ye),p(U),p($e),p(we),p(ze),p(xe,e),p(qe),p(Ce),p(Te),p(Me),p(ke),p(De),p(Le),p(Qe),p(Be),p(Ae),p(Pe),p(Fe),p(Ee),p(Ie),p(He),p(je,e)}}}const oi='{"title":"Quantization","local":"quantization","sections":[{"title":"PipelineQuantizationConfig","local":"diffusers.PipelineQuantizationConfig","sections":[],"depth":2},{"title":"BitsAndBytesConfig","local":"diffusers.BitsAndBytesConfig","sections":[],"depth":2},{"title":"GGUFQuantizationConfig","local":"diffusers.GGUFQuantizationConfig","sections":[],"depth":2},{"title":"QuantoConfig","local":"diffusers.QuantoConfig","sections":[],"depth":2},{"title":"TorchAoConfig","local":"diffusers.TorchAoConfig","sections":[],"depth":2},{"title":"DiffusersQuantizer","local":"diffusers.DiffusersQuantizer","sections":[],"depth":2}],"depth":1}';function ii(Ge){return No(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ui extends Wo{constructor($){super(),So(this,$,ii,ni,Zo,{})}}export{ui as component};
