import{s as Wo,o as So,n as Xo}from"../chunks/scheduler.53228c21.js";import{S as Oo,i as Ro,e as i,s as n,c as l,h as Yo,a,d as r,b as o,f as v,g as f,j as g,k as _,l as t,m as b,n as c,t as u,o as m,p}from"../chunks/index.100fac89.js";import{C as Ko}from"../chunks/CopyLLMTxtMenu.2cdbb51f.js";import{D as y}from"../chunks/Docstring.d46840f1.js";import{C as ei}from"../chunks/CodeBlock.d30a6509.js";import{E as ti}from"../chunks/ExampleCodeBlock.220b4f6e.js";import{H as Ge,E as ni}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.3fcbbc76.js";function oi(xt){let x,ae="Example:",L,T,M;return T=new ei({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(){x=i("p"),x.textContent=ae,L=n(),l(T.$$.fragment)},l(w){x=a(w,"P",{"data-svelte-h":!0}),g(x)!=="svelte-11lpom8"&&(x.textContent=ae),L=o(w),f(T.$$.fragment,w)},m(w,D){b(w,x,D),b(w,L,D),c(T,w,D),M=!0},p:Xo,i(w){M||(u(T.$$.fragment,w),M=!0)},o(w){m(T.$$.fragment,w),M=!1},d(w){w&&(r(x),r(L)),p(T,w)}}}function ii(xt){let x,ae,L,T,M,w,D,zt,re,mo="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.",qt,A,po='<p>Learn how to quantize models in the <a href="../quantization/overview">Quantization</a> guide.</p>',Ct,se,Tt,Q,de,cn,Ve,go='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>.',Mt,le,kt,$,fe,un,Ze,ho=`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>.`,mn,Ne,_o="This replaces <code>load_in_8bit</code> or <code>load_in_4bit</code> therefore both options are mutually exclusive.",pn,We,bo=`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.`,gn,P,ce,hn,Se,vo="Returns <code>True</code> if the model is quantizable, <code>False</code> otherwise.",_n,F,ue,bn,Xe,yo="Safety checker that arguments are correct - also replaces some NoneType arguments with their default values.",vn,E,me,yn,Oe,$o=`This method returns the quantization method used for the model. If the model is not quantizable, it returns
<code>None</code>.`,$n,I,pe,wn,Re,wo=`Removes all attributes from config which correspond to the default config attributes for better readability and
serializes to a Python dictionary.`,Dt,ge,Lt,B,he,xn,Ye,xo="This is a config class for GGUF Quantization techniques.",Qt,_e,Bt,C,be,zn,Ke,zo=`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>.`,qn,et,qo=`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).`,Cn,H,ve,Tn,tt,Co="Safety checker that arguments are correct",At,ye,Pt,z,$e,Mn,nt,To="This is a config class for torchao quantization/sparsity techniques.",kn,j,Dn,U,we,Ln,ot,Mo="Create configuration from a dictionary.",Qn,J,xe,Bn,it,ko="Create the appropriate quantization method based on configuration.",An,G,ze,Pn,at,Do="Convert configuration to a dictionary.",Ft,qe,Et,d,Ce,Fn,rt,Lo=`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.`,En,st,Qo=`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.`,In,V,Te,Hn,dt,Bo="adjust max_memory argument for infer_auto_device_map() if extra memory is needed for quantization",jn,Z,Me,Un,lt,Ao=`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,N,ke,Gn,ft,Po=`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.`,Vn,W,De,Zn,ct,Fo="checks if the quantized param has expected shape.",Nn,S,Le,Wn,ut,Eo="takes needed components from state_dict and creates quantized param.",Sn,X,Qe,Xn,mt,Io=`Potentially dequantize the model to retrieve the original model, with some loss in accuracy / performance. Note
not all quantization schemes support this.`,On,O,Be,Rn,pt,Ho=`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…`,Yn,R,Ae,Kn,gt,jo=`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.`,eo,Y,Pe,to,ht,Uo=`Post-process the model post weights loading. Make sure to override the abstract method
<code>_process_model_after_weight_loading</code>.`,no,K,Fe,oo,_t,Jo=`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>.`,io,ee,Ee,ao,bt,Go=`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”“`,ro,te,Ie,so,vt,Vo="Override this method if you want to adjust the <code>missing_keys</code>.",lo,ne,He,fo,yt,Zo=`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`,co,oe,je,uo,$t,No=`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.`,It,Ue,Ht,wt,jt;return M=new Ko({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),D=new Ge({props:{title:"Quantization",local:"quantization",headingTag:"h1"}}),se=new Ge({props:{title:"PipelineQuantizationConfig",local:"diffusers.PipelineQuantizationConfig",headingTag:"h2"}}),de=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"}}),le=new Ge({props:{title:"BitsAndBytesConfig",local:"diffusers.BitsAndBytesConfig",headingTag:"h2"}}),fe=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"}}),ce=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"}}),ue=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"}}),me=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"}}),pe=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>
`}}),ge=new Ge({props:{title:"GGUFQuantizationConfig",local:"diffusers.GGUFQuantizationConfig",headingTag:"h2"}}),he=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"}}),_e=new Ge({props:{title:"QuantoConfig",local:"diffusers.QuantoConfig",headingTag:"h2"}}),be=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"}}),ve=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"}}),ye=new Ge({props:{title:"TorchAoConfig",local:"diffusers.TorchAoConfig",headingTag:"h2"}}),$e=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"}}),j=new ti({props:{anchor:"diffusers.TorchAoConfig.example",$$slots:{default:[oi]},$$scope:{ctx:xt}}}),we=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"}}),xe=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"}}),qe=new Ge({props:{title:"DiffusersQuantizer",local:"diffusers.DiffusersQuantizer",headingTag:"h2"}}),Ce=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"}}),Te=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"}}),Me=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"}}),ke=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"}}),De=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"}}),Le=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"}}),Qe=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"}}),Be=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"}}),Ae=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"}}),Pe=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"}}),Fe=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"}}),Ee=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"}}),Ie=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"}}),He=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"}}),je=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"}}),Ue=new ni({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/quantization.md"}}),{c(){x=i("meta"),ae=n(),L=i("p"),T=n(),l(M.$$.fragment),w=n(),l(D.$$.fragment),zt=n(),re=i("p"),re.textContent=mo,qt=n(),A=i("blockquote"),A.innerHTML=po,Ct=n(),l(se.$$.fragment),Tt=n(),Q=i("div"),l(de.$$.fragment),cn=n(),Ve=i("p"),Ve.innerHTML=go,Mt=n(),l(le.$$.fragment),kt=n(),$=i("div"),l(fe.$$.fragment),un=n(),Ze=i("p"),Ze.innerHTML=ho,mn=n(),Ne=i("p"),Ne.innerHTML=_o,pn=n(),We=i("p"),We.innerHTML=bo,gn=n(),P=i("div"),l(ce.$$.fragment),hn=n(),Se=i("p"),Se.innerHTML=vo,_n=n(),F=i("div"),l(ue.$$.fragment),bn=n(),Xe=i("p"),Xe.textContent=yo,vn=n(),E=i("div"),l(me.$$.fragment),yn=n(),Oe=i("p"),Oe.innerHTML=$o,$n=n(),I=i("div"),l(pe.$$.fragment),wn=n(),Re=i("p"),Re.textContent=wo,Dt=n(),l(ge.$$.fragment),Lt=n(),B=i("div"),l(he.$$.fragment),xn=n(),Ye=i("p"),Ye.textContent=xo,Qt=n(),l(_e.$$.fragment),Bt=n(),C=i("div"),l(be.$$.fragment),zn=n(),Ke=i("p"),Ke.innerHTML=zo,qn=n(),et=i("p"),et.innerHTML=qo,Cn=n(),H=i("div"),l(ve.$$.fragment),Tn=n(),tt=i("p"),tt.textContent=Co,At=n(),l(ye.$$.fragment),Pt=n(),z=i("div"),l($e.$$.fragment),Mn=n(),nt=i("p"),nt.textContent=To,kn=n(),l(j.$$.fragment),Dn=n(),U=i("div"),l(we.$$.fragment),Ln=n(),ot=i("p"),ot.textContent=Mo,Qn=n(),J=i("div"),l(xe.$$.fragment),Bn=n(),it=i("p"),it.textContent=ko,An=n(),G=i("div"),l(ze.$$.fragment),Pn=n(),at=i("p"),at.textContent=Do,Ft=n(),l(qe.$$.fragment),Et=n(),d=i("div"),l(Ce.$$.fragment),Fn=n(),rt=i("p"),rt.textContent=Lo,En=n(),st=i("p"),st.innerHTML=Qo,In=n(),V=i("div"),l(Te.$$.fragment),Hn=n(),dt=i("p"),dt.textContent=Bo,jn=n(),Z=i("div"),l(Me.$$.fragment),Un=n(),lt=i("p"),lt.innerHTML=Ao,Jn=n(),N=i("div"),l(ke.$$.fragment),Gn=n(),ft=i("p"),ft.textContent=Po,Vn=n(),W=i("div"),l(De.$$.fragment),Zn=n(),ct=i("p"),ct.textContent=Fo,Nn=n(),S=i("div"),l(Le.$$.fragment),Wn=n(),ut=i("p"),ut.textContent=Eo,Sn=n(),X=i("div"),l(Qe.$$.fragment),Xn=n(),mt=i("p"),mt.textContent=Io,On=n(),O=i("div"),l(Be.$$.fragment),Rn=n(),pt=i("p"),pt.innerHTML=Ho,Yn=n(),R=i("div"),l(Ae.$$.fragment),Kn=n(),gt=i("p"),gt.innerHTML=jo,eo=n(),Y=i("div"),l(Pe.$$.fragment),to=n(),ht=i("p"),ht.innerHTML=Uo,no=n(),K=i("div"),l(Fe.$$.fragment),oo=n(),_t=i("p"),_t.innerHTML=Jo,io=n(),ee=i("div"),l(Ee.$$.fragment),ao=n(),bt=i("p"),bt.innerHTML=Go,ro=n(),te=i("div"),l(Ie.$$.fragment),so=n(),vt=i("p"),vt.innerHTML=Vo,lo=n(),ne=i("div"),l(He.$$.fragment),fo=n(),yt=i("p"),yt.textContent=Zo,co=n(),oe=i("div"),l(je.$$.fragment),uo=n(),$t=i("p"),$t.innerHTML=No,It=n(),l(Ue.$$.fragment),Ht=n(),wt=i("p"),this.h()},l(e){const s=Yo("svelte-u9bgzb",document.head);x=a(s,"META",{name:!0,content:!0}),s.forEach(r),ae=o(e),L=a(e,"P",{}),v(L).forEach(r),T=o(e),f(M.$$.fragment,e),w=o(e),f(D.$$.fragment,e),zt=o(e),re=a(e,"P",{"data-svelte-h":!0}),g(re)!=="svelte-1balldr"&&(re.textContent=mo),qt=o(e),A=a(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),g(A)!=="svelte-e0adgt"&&(A.innerHTML=po),Ct=o(e),f(se.$$.fragment,e),Tt=o(e),Q=a(e,"DIV",{class:!0});var Je=v(Q);f(de.$$.fragment,Je),cn=o(Je),Ve=a(Je,"P",{"data-svelte-h":!0}),g(Ve)!=="svelte-l98qrs"&&(Ve.innerHTML=go),Je.forEach(r),Mt=o(e),f(le.$$.fragment,e),kt=o(e),$=a(e,"DIV",{class:!0});var q=v($);f(fe.$$.fragment,q),un=o(q),Ze=a(q,"P",{"data-svelte-h":!0}),g(Ze)!=="svelte-woamwr"&&(Ze.innerHTML=ho),mn=o(q),Ne=a(q,"P",{"data-svelte-h":!0}),g(Ne)!=="svelte-izpi0w"&&(Ne.innerHTML=_o),pn=o(q),We=a(q,"P",{"data-svelte-h":!0}),g(We)!=="svelte-8qsk2q"&&(We.innerHTML=bo),gn=o(q),P=a(q,"DIV",{class:!0});var Ut=v(P);f(ce.$$.fragment,Ut),hn=o(Ut),Se=a(Ut,"P",{"data-svelte-h":!0}),g(Se)!=="svelte-10tvzyv"&&(Se.innerHTML=vo),Ut.forEach(r),_n=o(q),F=a(q,"DIV",{class:!0});var Jt=v(F);f(ue.$$.fragment,Jt),bn=o(Jt),Xe=a(Jt,"P",{"data-svelte-h":!0}),g(Xe)!=="svelte-gy26u4"&&(Xe.textContent=yo),Jt.forEach(r),vn=o(q),E=a(q,"DIV",{class:!0});var Gt=v(E);f(me.$$.fragment,Gt),yn=o(Gt),Oe=a(Gt,"P",{"data-svelte-h":!0}),g(Oe)!=="svelte-19bn0da"&&(Oe.innerHTML=$o),Gt.forEach(r),$n=o(q),I=a(q,"DIV",{class:!0});var Vt=v(I);f(pe.$$.fragment,Vt),wn=o(Vt),Re=a(Vt,"P",{"data-svelte-h":!0}),g(Re)!=="svelte-1p6bdas"&&(Re.textContent=wo),Vt.forEach(r),q.forEach(r),Dt=o(e),f(ge.$$.fragment,e),Lt=o(e),B=a(e,"DIV",{class:!0});var Zt=v(B);f(he.$$.fragment,Zt),xn=o(Zt),Ye=a(Zt,"P",{"data-svelte-h":!0}),g(Ye)!=="svelte-1r606z3"&&(Ye.textContent=xo),Zt.forEach(r),Qt=o(e),f(_e.$$.fragment,e),Bt=o(e),C=a(e,"DIV",{class:!0});var ie=v(C);f(be.$$.fragment,ie),zn=o(ie),Ke=a(ie,"P",{"data-svelte-h":!0}),g(Ke)!=="svelte-b8v0f"&&(Ke.innerHTML=zo),qn=o(ie),et=a(ie,"P",{"data-svelte-h":!0}),g(et)!=="svelte-7hlgr"&&(et.innerHTML=qo),Cn=o(ie),H=a(ie,"DIV",{class:!0});var Nt=v(H);f(ve.$$.fragment,Nt),Tn=o(Nt),tt=a(Nt,"P",{"data-svelte-h":!0}),g(tt)!=="svelte-1ozftb6"&&(tt.textContent=Co),Nt.forEach(r),ie.forEach(r),At=o(e),f(ye.$$.fragment,e),Pt=o(e),z=a(e,"DIV",{class:!0});var k=v(z);f($e.$$.fragment,k),Mn=o(k),nt=a(k,"P",{"data-svelte-h":!0}),g(nt)!=="svelte-1pwo8e0"&&(nt.textContent=To),kn=o(k),f(j.$$.fragment,k),Dn=o(k),U=a(k,"DIV",{class:!0});var Wt=v(U);f(we.$$.fragment,Wt),Ln=o(Wt),ot=a(Wt,"P",{"data-svelte-h":!0}),g(ot)!=="svelte-x30fz7"&&(ot.textContent=Mo),Wt.forEach(r),Qn=o(k),J=a(k,"DIV",{class:!0});var St=v(J);f(xe.$$.fragment,St),Bn=o(St),it=a(St,"P",{"data-svelte-h":!0}),g(it)!=="svelte-1gkr97u"&&(it.textContent=ko),St.forEach(r),An=o(k),G=a(k,"DIV",{class:!0});var Xt=v(G);f(ze.$$.fragment,Xt),Pn=o(Xt),at=a(Xt,"P",{"data-svelte-h":!0}),g(at)!=="svelte-11q54ot"&&(at.textContent=Do),Xt.forEach(r),k.forEach(r),Ft=o(e),f(qe.$$.fragment,e),Et=o(e),d=a(e,"DIV",{class:!0});var h=v(d);f(Ce.$$.fragment,h),Fn=o(h),rt=a(h,"P",{"data-svelte-h":!0}),g(rt)!=="svelte-n1gm3c"&&(rt.textContent=Lo),En=o(h),st=a(h,"P",{"data-svelte-h":!0}),g(st)!=="svelte-1fnduym"&&(st.innerHTML=Qo),In=o(h),V=a(h,"DIV",{class:!0});var Ot=v(V);f(Te.$$.fragment,Ot),Hn=o(Ot),dt=a(Ot,"P",{"data-svelte-h":!0}),g(dt)!=="svelte-1d4i4z7"&&(dt.textContent=Bo),Ot.forEach(r),jn=o(h),Z=a(h,"DIV",{class:!0});var Rt=v(Z);f(Me.$$.fragment,Rt),Un=o(Rt),lt=a(Rt,"P",{"data-svelte-h":!0}),g(lt)!=="svelte-eyxa3y"&&(lt.innerHTML=Ao),Rt.forEach(r),Jn=o(h),N=a(h,"DIV",{class:!0});var Yt=v(N);f(ke.$$.fragment,Yt),Gn=o(Yt),ft=a(Yt,"P",{"data-svelte-h":!0}),g(ft)!=="svelte-y0lxmf"&&(ft.textContent=Po),Yt.forEach(r),Vn=o(h),W=a(h,"DIV",{class:!0});var Kt=v(W);f(De.$$.fragment,Kt),Zn=o(Kt),ct=a(Kt,"P",{"data-svelte-h":!0}),g(ct)!=="svelte-1170ss6"&&(ct.textContent=Fo),Kt.forEach(r),Nn=o(h),S=a(h,"DIV",{class:!0});var en=v(S);f(Le.$$.fragment,en),Wn=o(en),ut=a(en,"P",{"data-svelte-h":!0}),g(ut)!=="svelte-odkanz"&&(ut.textContent=Eo),en.forEach(r),Sn=o(h),X=a(h,"DIV",{class:!0});var tn=v(X);f(Qe.$$.fragment,tn),Xn=o(tn),mt=a(tn,"P",{"data-svelte-h":!0}),g(mt)!=="svelte-upajm7"&&(mt.textContent=Io),tn.forEach(r),On=o(h),O=a(h,"DIV",{class:!0});var nn=v(O);f(Be.$$.fragment,nn),Rn=o(nn),pt=a(nn,"P",{"data-svelte-h":!0}),g(pt)!=="svelte-72nwdx"&&(pt.innerHTML=Ho),nn.forEach(r),Yn=o(h),R=a(h,"DIV",{class:!0});var on=v(R);f(Ae.$$.fragment,on),Kn=o(on),gt=a(on,"P",{"data-svelte-h":!0}),g(gt)!=="svelte-1cb2fzf"&&(gt.innerHTML=jo),on.forEach(r),eo=o(h),Y=a(h,"DIV",{class:!0});var an=v(Y);f(Pe.$$.fragment,an),to=o(an),ht=a(an,"P",{"data-svelte-h":!0}),g(ht)!=="svelte-6rgq61"&&(ht.innerHTML=Uo),an.forEach(r),no=o(h),K=a(h,"DIV",{class:!0});var rn=v(K);f(Fe.$$.fragment,rn),oo=o(rn),_t=a(rn,"P",{"data-svelte-h":!0}),g(_t)!=="svelte-wiwxpv"&&(_t.innerHTML=Jo),rn.forEach(r),io=o(h),ee=a(h,"DIV",{class:!0});var sn=v(ee);f(Ee.$$.fragment,sn),ao=o(sn),bt=a(sn,"P",{"data-svelte-h":!0}),g(bt)!=="svelte-5g503h"&&(bt.innerHTML=Go),sn.forEach(r),ro=o(h),te=a(h,"DIV",{class:!0});var dn=v(te);f(Ie.$$.fragment,dn),so=o(dn),vt=a(dn,"P",{"data-svelte-h":!0}),g(vt)!=="svelte-13hqoy0"&&(vt.innerHTML=Vo),dn.forEach(r),lo=o(h),ne=a(h,"DIV",{class:!0});var ln=v(ne);f(He.$$.fragment,ln),fo=o(ln),yt=a(ln,"P",{"data-svelte-h":!0}),g(yt)!=="svelte-udr2k7"&&(yt.textContent=Zo),ln.forEach(r),co=o(h),oe=a(h,"DIV",{class:!0});var fn=v(oe);f(je.$$.fragment,fn),uo=o(fn),$t=a(fn,"P",{"data-svelte-h":!0}),g($t)!=="svelte-1ra2q1u"&&($t.innerHTML=No),fn.forEach(r),h.forEach(r),It=o(e),f(Ue.$$.fragment,e),Ht=o(e),wt=a(e,"P",{}),v(wt).forEach(r),this.h()},h(){_(x,"name","hf:doc:metadata"),_(x,"content",ai),_(A,"class","tip"),_(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(z,"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"),_(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(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,x),b(e,ae,s),b(e,L,s),b(e,T,s),c(M,e,s),b(e,w,s),c(D,e,s),b(e,zt,s),b(e,re,s),b(e,qt,s),b(e,A,s),b(e,Ct,s),c(se,e,s),b(e,Tt,s),b(e,Q,s),c(de,Q,null),t(Q,cn),t(Q,Ve),b(e,Mt,s),c(le,e,s),b(e,kt,s),b(e,$,s),c(fe,$,null),t($,un),t($,Ze),t($,mn),t($,Ne),t($,pn),t($,We),t($,gn),t($,P),c(ce,P,null),t(P,hn),t(P,Se),t($,_n),t($,F),c(ue,F,null),t(F,bn),t(F,Xe),t($,vn),t($,E),c(me,E,null),t(E,yn),t(E,Oe),t($,$n),t($,I),c(pe,I,null),t(I,wn),t(I,Re),b(e,Dt,s),c(ge,e,s),b(e,Lt,s),b(e,B,s),c(he,B,null),t(B,xn),t(B,Ye),b(e,Qt,s),c(_e,e,s),b(e,Bt,s),b(e,C,s),c(be,C,null),t(C,zn),t(C,Ke),t(C,qn),t(C,et),t(C,Cn),t(C,H),c(ve,H,null),t(H,Tn),t(H,tt),b(e,At,s),c(ye,e,s),b(e,Pt,s),b(e,z,s),c($e,z,null),t(z,Mn),t(z,nt),t(z,kn),c(j,z,null),t(z,Dn),t(z,U),c(we,U,null),t(U,Ln),t(U,ot),t(z,Qn),t(z,J),c(xe,J,null),t(J,Bn),t(J,it),t(z,An),t(z,G),c(ze,G,null),t(G,Pn),t(G,at),b(e,Ft,s),c(qe,e,s),b(e,Et,s),b(e,d,s),c(Ce,d,null),t(d,Fn),t(d,rt),t(d,En),t(d,st),t(d,In),t(d,V),c(Te,V,null),t(V,Hn),t(V,dt),t(d,jn),t(d,Z),c(Me,Z,null),t(Z,Un),t(Z,lt),t(d,Jn),t(d,N),c(ke,N,null),t(N,Gn),t(N,ft),t(d,Vn),t(d,W),c(De,W,null),t(W,Zn),t(W,ct),t(d,Nn),t(d,S),c(Le,S,null),t(S,Wn),t(S,ut),t(d,Sn),t(d,X),c(Qe,X,null),t(X,Xn),t(X,mt),t(d,On),t(d,O),c(Be,O,null),t(O,Rn),t(O,pt),t(d,Yn),t(d,R),c(Ae,R,null),t(R,Kn),t(R,gt),t(d,eo),t(d,Y),c(Pe,Y,null),t(Y,to),t(Y,ht),t(d,no),t(d,K),c(Fe,K,null),t(K,oo),t(K,_t),t(d,io),t(d,ee),c(Ee,ee,null),t(ee,ao),t(ee,bt),t(d,ro),t(d,te),c(Ie,te,null),t(te,so),t(te,vt),t(d,lo),t(d,ne),c(He,ne,null),t(ne,fo),t(ne,yt),t(d,co),t(d,oe),c(je,oe,null),t(oe,uo),t(oe,$t),b(e,It,s),c(Ue,e,s),b(e,Ht,s),b(e,wt,s),jt=!0},p(e,[s]){const Je={};s&2&&(Je.$$scope={dirty:s,ctx:e}),j.$set(Je)},i(e){jt||(u(M.$$.fragment,e),u(D.$$.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($e.$$.fragment,e),u(j.$$.fragment,e),u(we.$$.fragment,e),u(xe.$$.fragment,e),u(ze.$$.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),u(Ue.$$.fragment,e),jt=!0)},o(e){m(M.$$.fragment,e),m(D.$$.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($e.$$.fragment,e),m(j.$$.fragment,e),m(we.$$.fragment,e),m(xe.$$.fragment,e),m(ze.$$.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),m(Ue.$$.fragment,e),jt=!1},d(e){e&&(r(ae),r(L),r(T),r(w),r(zt),r(re),r(qt),r(A),r(Ct),r(Tt),r(Q),r(Mt),r(kt),r($),r(Dt),r(Lt),r(B),r(Qt),r(Bt),r(C),r(At),r(Pt),r(z),r(Ft),r(Et),r(d),r(It),r(Ht),r(wt)),r(x),p(M,e),p(D,e),p(se,e),p(de),p(le,e),p(fe),p(ce),p(ue),p(me),p(pe),p(ge,e),p(he),p(_e,e),p(be),p(ve),p(ye,e),p($e),p(j),p(we),p(xe),p(ze),p(qe,e),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),p(Ue,e)}}}const ai='{"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 ri(xt){return So(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class pi extends Oo{constructor(x){super(),Ro(this,x,ri,ii,Wo,{})}}export{pi as component};
