import{s as qo,o as xo,n as zo}from"../chunks/scheduler.8c3d61f6.js";import{S as Co,i as To,g as i,s as n,r as l,A as ko,h as a,f as s,c as o,j as b,u,x as h,k as y,y as t,a as _,v as f,d as c,t as m,w as p}from"../chunks/index.da70eac4.js";import{T as Mo}from"../chunks/Tip.1d9b8c37.js";import{D as $}from"../chunks/Docstring.91dd4639.js";import{C as Do}from"../chunks/CodeBlock.a9c4becf.js";import{E as Lo}from"../chunks/ExampleCodeBlock.d368b7c4.js";import{H as Ae,E as Qo}from"../chunks/getInferenceSnippets.28ca3596.js";function Bo(Ie){let v,L='Learn how to quantize models in the <a href="../quantization/overview">Quantization</a> guide.';return{c(){v=i("p"),v.innerHTML=L},l(x){v=a(x,"P",{"data-svelte-h":!0}),h(v)!=="svelte-1dd515k"&&(v.innerHTML=L)},m(x,C){_(x,v,C)},p:zo,d(x){x&&s(v)}}}function Po(Ie){let v,L="Example:",x,C,k;return C=new Do({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEZsdXhUcmFuc2Zvcm1lcjJETW9kZWwlMkMlMjBUb3JjaEFvQ29uZmlnJTBBJTBBcXVhbnRpemF0aW9uX2NvbmZpZyUyMCUzRCUyMFRvcmNoQW9Db25maWcoJTIyaW50OHdvJTIyKSUwQXRyYW5zZm9ybWVyJTIwJTNEJTIwRmx1eFRyYW5zZm9ybWVyMkRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyYmxhY2stZm9yZXN0LWxhYnMlMkZGbHV4LjEtRGV2JTIyJTJDJTBBJTIwJTIwJTIwJTIwc3ViZm9sZGVyJTNEJTIydHJhbnNmb3JtZXIlMjIlMkMlMEElMjAlMjAlMjAlMjBxdWFudGl6YXRpb25fY29uZmlnJTNEcXVhbnRpemF0aW9uX2NvbmZpZyUyQyUwQSUyMCUyMCUyMCUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYlMkMlMEEp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> FluxTransformer2DModel, TorchAoConfig

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(){v=i("p"),v.textContent=L,x=n(),l(C.$$.fragment)},l(z){v=a(z,"P",{"data-svelte-h":!0}),h(v)!=="svelte-11lpom8"&&(v.textContent=L),x=o(z),u(C.$$.fragment,z)},m(z,M){_(z,v,M),_(z,x,M),f(C,z,M),k=!0},p:zo,i(z){k||(c(C.$$.fragment,z),k=!0)},o(z){m(C.$$.fragment,z),k=!1},d(z){z&&(s(v),s(x)),p(C,z)}}}function Ao(Ie){let v,L,x,C,k,z,M,Zn="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.",pt,P,gt,ne,ht,Q,oe,Xt,Fe,Rn='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>.',_t,ie,bt,w,ae,Yt,Ee,Wn=`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>.`,Ot,He,Sn="This replaces <code>load_in_8bit</code> or <code>load_in_4bit</code> therefore both options are mutually exclusive.",Kt,Ve,Xn=`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.`,en,A,se,tn,Ue,Yn="Returns <code>True</code> if the model is quantizable, <code>False</code> otherwise.",nn,I,re,on,Je,On="Safety checker that arguments are correct - also replaces some NoneType arguments with their default values.",an,F,de,sn,Ne,Kn=`This method returns the quantization method used for the model. If the model is not quantizable, it returns
<code>None</code>.`,rn,E,le,dn,Ge,eo=`Removes all attributes from config which correspond to the default config attributes for better readability and
serializes to a Python dictionary.`,yt,ue,vt,B,fe,ln,je,to="This is a config class for GGUF Quantization techniques.",$t,ce,wt,T,me,un,Ze,no=`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>.`,fn,Re,oo=`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,pe,mn,We,io="Safety checker that arguments are correct",zt,ge,qt,D,he,pn,Se,ao="This is a config class for torchao quantization/sparsity techniques.",gn,V,xt,_e,Ct,d,be,hn,Xe,so=`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.`,_n,Ye,ro=`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.`,bn,U,ye,yn,Oe,lo="adjust max_memory argument for infer_auto_device_map() if extra memory is needed for quantization",vn,J,ve,$n,Ke,uo=`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>.`,wn,N,$e,zn,et,fo=`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.`,qn,G,we,xn,tt,co="checks if the quantized param has expected shape.",Cn,j,ze,Tn,nt,mo="takes needed components from state_dict and creates quantized param.",kn,Z,qe,Mn,ot,po=`Potentially dequantize the model to retrieve the original model, with some loss in accuracy / performance. Note
not all quantization schemes support this.`,Dn,R,xe,Ln,it,go=`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…`,Qn,W,Ce,Bn,at,ho=`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.`,Pn,S,Te,An,st,_o=`Post-process the model post weights loading. Make sure to override the abstract method
<code>_process_model_after_weight_loading</code>.`,In,X,ke,Fn,rt,bo=`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>.`,En,Y,Me,Hn,dt,yo=`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”“`,Vn,O,De,Un,lt,vo="Override this method if you want to adjust the <code>missing_keys</code>.",Jn,K,Le,Nn,ut,$o=`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`,Gn,ee,Qe,jn,ft,wo=`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.`,Tt,Be,kt,mt,Mt;return k=new Ae({props:{title:"Quantization",local:"quantization",headingTag:"h1"}}),P=new Mo({props:{$$slots:{default:[Bo]},$$scope:{ctx:Ie}}}),ne=new Ae({props:{title:"PipelineQuantizationConfig",local:"diffusers.PipelineQuantizationConfig",headingTag:"h2"}}),oe=new $({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.Optional[typing.List[str]] = 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"}}),ie=new Ae({props:{title:"BitsAndBytesConfig",local:"diffusers.BitsAndBytesConfig",headingTag:"h2"}}),ae=new $({props:{name:"class diffusers.BitsAndBytesConfig",anchor:"diffusers.BitsAndBytesConfig",parameters:[{name:"load_in_8bit",val:" = False"},{name:"load_in_4bit",val:" = False"},{name:"llm_int8_threshold",val:" = 6.0"},{name:"llm_int8_skip_modules",val:" = None"},{name:"llm_int8_enable_fp32_cpu_offload",val:" = False"},{name:"llm_int8_has_fp16_weight",val:" = False"},{name:"bnb_4bit_compute_dtype",val:" = None"},{name:"bnb_4bit_quant_type",val:" = 'fp4'"},{name:"bnb_4bit_use_double_quant",val:" = False"},{name:"bnb_4bit_quant_storage",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.BitsAndBytesConfig.load_in_8bit",description:`<strong>load_in_8bit</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
This flag is used to enable 8-bit quantization with LLM.int8().`,name:"load_in_8bit"},{anchor:"diffusers.BitsAndBytesConfig.load_in_4bit",description:`<strong>load_in_4bit</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
This flag is used to enable 4-bit quantization by replacing the Linear layers with FP4/NF4 layers from
<code>bitsandbytes</code>.`,name:"load_in_4bit"},{anchor:"diffusers.BitsAndBytesConfig.llm_int8_threshold",description:`<strong>llm_int8_threshold</strong> (<code>float</code>, <em>optional</em>, defaults to 6.0) &#x2014;
This corresponds to the outlier threshold for outlier detection as described in <code>LLM.int8() : 8-bit Matrix Multiplication for Transformers at Scale</code> paper: <a href="https://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#L179"}}),se=new $({props:{name:"is_quantizable",anchor:"diffusers.BitsAndBytesConfig.is_quantizable",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/quantization_config.py#L358"}}),re=new $({props:{name:"post_init",anchor:"diffusers.BitsAndBytesConfig.post_init",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/quantization_config.py#L321"}}),de=new $({props:{name:"quantization_method",anchor:"diffusers.BitsAndBytesConfig.quantization_method",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/quantization_config.py#L364"}}),le=new $({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#L395",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>
`}}),ue=new Ae({props:{title:"GGUFQuantizationConfig",local:"diffusers.GGUFQuantizationConfig",headingTag:"h2"}}),fe=new $({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#L419"}}),ce=new Ae({props:{title:"QuantoConfig",local:"diffusers.QuantoConfig",headingTag:"h2"}}),me=new $({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#L709"}}),pe=new $({props:{name:"post_init",anchor:"diffusers.QuantoConfig.post_init",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/quantization_config.py#L734"}}),ge=new Ae({props:{title:"TorchAoConfig",local:"diffusers.TorchAoConfig",headingTag:"h2"}}),he=new $({props:{name:"class diffusers.TorchAoConfig",anchor:"diffusers.TorchAoConfig",parameters:[{name:"quant_type",val:": str"},{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> (<code>str</code>) &#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>
</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#L442"}}),V=new Lo({props:{anchor:"diffusers.TorchAoConfig.example",$$slots:{default:[Po]},$$scope:{ctx:Ie}}}),_e=new Ae({props:{title:"DiffusersQuantizer",local:"diffusers.DiffusersQuantizer",headingTag:"h2"}}),be=new $({props:{name:"class diffusers.DiffusersQuantizer",anchor:"diffusers.DiffusersQuantizer",parameters:[{name:"quantization_config",val:": QuantizationConfigMixin"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/base.py#L34"}}),ye=new $({props:{name:"adjust_max_memory",anchor:"diffusers.DiffusersQuantizer.adjust_max_memory",parameters:[{name:"max_memory",val:": typing.Dict[str, typing.Union[int, str]]"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/base.py#L133"}}),ve=new $({props:{name:"adjust_target_dtype",anchor:"diffusers.DiffusersQuantizer.adjust_target_dtype",parameters:[{name:"torch_dtype",val:": torch.dtype"}],parametersDescription:[{anchor:"diffusers.DiffusersQuantizer.adjust_target_dtype.torch_dtype",description:`<strong>torch_dtype</strong> (<code>torch.dtype</code>, <em>optional</em>) &#x2014;
The torch_dtype that is used to compute the device_map.`,name:"torch_dtype"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/base.py#L91"}}),$e=new $({props:{name:"check_if_quantized_param",anchor:"diffusers.DiffusersQuantizer.check_if_quantized_param",parameters:[{name:"model",val:": ModelMixin"},{name:"param_value",val:": torch.Tensor"},{name:"param_name",val:": str"},{name:"state_dict",val:": typing.Dict[str, typing.Any]"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/base.py#L137"}}),we=new $({props:{name:"check_quantized_param_shape",anchor:"diffusers.DiffusersQuantizer.check_quantized_param_shape",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/base.py#L157"}}),ze=new $({props:{name:"create_quantized_param",anchor:"diffusers.DiffusersQuantizer.create_quantized_param",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/base.py#L151"}}),qe=new $({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"}}),xe=new $({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"}}),Ce=new $({props:{name:"get_special_dtypes_update",anchor:"diffusers.DiffusersQuantizer.get_special_dtypes_update",parameters:[{name:"model",val:""},{name:"torch_dtype",val:": torch.dtype"}],parametersDescription:[{anchor:"diffusers.DiffusersQuantizer.get_special_dtypes_update.model",description:`<strong>model</strong> (<code>~diffusers.models.modeling_utils.ModelMixin</code>) &#x2014;
The model to quantize`,name:"model"},{anchor:"diffusers.DiffusersQuantizer.get_special_dtypes_update.torch_dtype",description:`<strong>torch_dtype</strong> (<code>torch.dtype</code>) &#x2014;
The dtype passed in <code>from_pretrained</code> method.`,name:"torch_dtype"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/base.py#L113"}}),Te=new $({props:{name:"postprocess_model",anchor:"diffusers.DiffusersQuantizer.postprocess_model",parameters:[{name:"model",val:": ModelMixin"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.DiffusersQuantizer.postprocess_model.model",description:`<strong>model</strong> (<code>~diffusers.models.modeling_utils.ModelMixin</code>) &#x2014;
The model to quantize`,name:"model"},{anchor:"diffusers.DiffusersQuantizer.postprocess_model.kwargs",description:`<strong>kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
The keyword arguments that are passed along <code>_process_model_after_weight_loading</code>.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/base.py#L187"}}),ke=new $({props:{name:"preprocess_model",anchor:"diffusers.DiffusersQuantizer.preprocess_model",parameters:[{name:"model",val:": ModelMixin"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.DiffusersQuantizer.preprocess_model.model",description:`<strong>model</strong> (<code>~diffusers.models.modeling_utils.ModelMixin</code>) &#x2014;
The model to quantize`,name:"model"},{anchor:"diffusers.DiffusersQuantizer.preprocess_model.kwargs",description:`<strong>kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
The keyword arguments that are passed along <code>_process_model_before_weight_loading</code>.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/base.py#L171"}}),Me=new $({props:{name:"update_device_map",anchor:"diffusers.DiffusersQuantizer.update_device_map",parameters:[{name:"device_map",val:": typing.Optional[typing.Dict[str, typing.Any]]"}],parametersDescription:[{anchor:"diffusers.DiffusersQuantizer.update_device_map.device_map",description:`<strong>device_map</strong> (<code>Union[dict, str]</code>, <em>optional</em>) &#x2014;
The device_map that is passed through the <code>from_pretrained</code> method.`,name:"device_map"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/base.py#L79"}}),De=new $({props:{name:"update_missing_keys",anchor:"diffusers.DiffusersQuantizer.update_missing_keys",parameters:[{name:"model",val:""},{name:"missing_keys",val:": typing.List[str]"},{name:"prefix",val:": str"}],parametersDescription:[{anchor:"diffusers.DiffusersQuantizer.update_missing_keys.missing_keys",description:`<strong>missing_keys</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
The list of missing keys in the checkpoint compared to the state dict of the model`,name:"missing_keys"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/base.py#L103"}}),Le=new $({props:{name:"update_torch_dtype",anchor:"diffusers.DiffusersQuantizer.update_torch_dtype",parameters:[{name:"torch_dtype",val:": torch.dtype"}],parametersDescription:[{anchor:"diffusers.DiffusersQuantizer.update_torch_dtype.torch_dtype",description:`<strong>torch_dtype</strong> (<code>torch.dtype</code>) &#x2014;
The input dtype that is passed in <code>from_pretrained</code>`,name:"torch_dtype"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/quantizers/base.py#L68"}}),Qe=new $({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"}}),Be=new Qo({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/quantization.md"}}),{c(){v=i("meta"),L=n(),x=i("p"),C=n(),l(k.$$.fragment),z=n(),M=i("p"),M.textContent=Zn,pt=n(),l(P.$$.fragment),gt=n(),l(ne.$$.fragment),ht=n(),Q=i("div"),l(oe.$$.fragment),Xt=n(),Fe=i("p"),Fe.innerHTML=Rn,_t=n(),l(ie.$$.fragment),bt=n(),w=i("div"),l(ae.$$.fragment),Yt=n(),Ee=i("p"),Ee.innerHTML=Wn,Ot=n(),He=i("p"),He.innerHTML=Sn,Kt=n(),Ve=i("p"),Ve.innerHTML=Xn,en=n(),A=i("div"),l(se.$$.fragment),tn=n(),Ue=i("p"),Ue.innerHTML=Yn,nn=n(),I=i("div"),l(re.$$.fragment),on=n(),Je=i("p"),Je.textContent=On,an=n(),F=i("div"),l(de.$$.fragment),sn=n(),Ne=i("p"),Ne.innerHTML=Kn,rn=n(),E=i("div"),l(le.$$.fragment),dn=n(),Ge=i("p"),Ge.textContent=eo,yt=n(),l(ue.$$.fragment),vt=n(),B=i("div"),l(fe.$$.fragment),ln=n(),je=i("p"),je.textContent=to,$t=n(),l(ce.$$.fragment),wt=n(),T=i("div"),l(me.$$.fragment),un=n(),Ze=i("p"),Ze.innerHTML=no,fn=n(),Re=i("p"),Re.innerHTML=oo,cn=n(),H=i("div"),l(pe.$$.fragment),mn=n(),We=i("p"),We.textContent=io,zt=n(),l(ge.$$.fragment),qt=n(),D=i("div"),l(he.$$.fragment),pn=n(),Se=i("p"),Se.textContent=ao,gn=n(),l(V.$$.fragment),xt=n(),l(_e.$$.fragment),Ct=n(),d=i("div"),l(be.$$.fragment),hn=n(),Xe=i("p"),Xe.textContent=so,_n=n(),Ye=i("p"),Ye.innerHTML=ro,bn=n(),U=i("div"),l(ye.$$.fragment),yn=n(),Oe=i("p"),Oe.textContent=lo,vn=n(),J=i("div"),l(ve.$$.fragment),$n=n(),Ke=i("p"),Ke.innerHTML=uo,wn=n(),N=i("div"),l($e.$$.fragment),zn=n(),et=i("p"),et.textContent=fo,qn=n(),G=i("div"),l(we.$$.fragment),xn=n(),tt=i("p"),tt.textContent=co,Cn=n(),j=i("div"),l(ze.$$.fragment),Tn=n(),nt=i("p"),nt.textContent=mo,kn=n(),Z=i("div"),l(qe.$$.fragment),Mn=n(),ot=i("p"),ot.textContent=po,Dn=n(),R=i("div"),l(xe.$$.fragment),Ln=n(),it=i("p"),it.innerHTML=go,Qn=n(),W=i("div"),l(Ce.$$.fragment),Bn=n(),at=i("p"),at.innerHTML=ho,Pn=n(),S=i("div"),l(Te.$$.fragment),An=n(),st=i("p"),st.innerHTML=_o,In=n(),X=i("div"),l(ke.$$.fragment),Fn=n(),rt=i("p"),rt.innerHTML=bo,En=n(),Y=i("div"),l(Me.$$.fragment),Hn=n(),dt=i("p"),dt.innerHTML=yo,Vn=n(),O=i("div"),l(De.$$.fragment),Un=n(),lt=i("p"),lt.innerHTML=vo,Jn=n(),K=i("div"),l(Le.$$.fragment),Nn=n(),ut=i("p"),ut.textContent=$o,Gn=n(),ee=i("div"),l(Qe.$$.fragment),jn=n(),ft=i("p"),ft.innerHTML=wo,Tt=n(),l(Be.$$.fragment),kt=n(),mt=i("p"),this.h()},l(e){const r=ko("svelte-u9bgzb",document.head);v=a(r,"META",{name:!0,content:!0}),r.forEach(s),L=o(e),x=a(e,"P",{}),b(x).forEach(s),C=o(e),u(k.$$.fragment,e),z=o(e),M=a(e,"P",{"data-svelte-h":!0}),h(M)!=="svelte-1balldr"&&(M.textContent=Zn),pt=o(e),u(P.$$.fragment,e),gt=o(e),u(ne.$$.fragment,e),ht=o(e),Q=a(e,"DIV",{class:!0});var Pe=b(Q);u(oe.$$.fragment,Pe),Xt=o(Pe),Fe=a(Pe,"P",{"data-svelte-h":!0}),h(Fe)!=="svelte-l98qrs"&&(Fe.innerHTML=Rn),Pe.forEach(s),_t=o(e),u(ie.$$.fragment,e),bt=o(e),w=a(e,"DIV",{class:!0});var q=b(w);u(ae.$$.fragment,q),Yt=o(q),Ee=a(q,"P",{"data-svelte-h":!0}),h(Ee)!=="svelte-woamwr"&&(Ee.innerHTML=Wn),Ot=o(q),He=a(q,"P",{"data-svelte-h":!0}),h(He)!=="svelte-izpi0w"&&(He.innerHTML=Sn),Kt=o(q),Ve=a(q,"P",{"data-svelte-h":!0}),h(Ve)!=="svelte-8qsk2q"&&(Ve.innerHTML=Xn),en=o(q),A=a(q,"DIV",{class:!0});var Dt=b(A);u(se.$$.fragment,Dt),tn=o(Dt),Ue=a(Dt,"P",{"data-svelte-h":!0}),h(Ue)!=="svelte-10tvzyv"&&(Ue.innerHTML=Yn),Dt.forEach(s),nn=o(q),I=a(q,"DIV",{class:!0});var Lt=b(I);u(re.$$.fragment,Lt),on=o(Lt),Je=a(Lt,"P",{"data-svelte-h":!0}),h(Je)!=="svelte-gy26u4"&&(Je.textContent=On),Lt.forEach(s),an=o(q),F=a(q,"DIV",{class:!0});var Qt=b(F);u(de.$$.fragment,Qt),sn=o(Qt),Ne=a(Qt,"P",{"data-svelte-h":!0}),h(Ne)!=="svelte-19bn0da"&&(Ne.innerHTML=Kn),Qt.forEach(s),rn=o(q),E=a(q,"DIV",{class:!0});var Bt=b(E);u(le.$$.fragment,Bt),dn=o(Bt),Ge=a(Bt,"P",{"data-svelte-h":!0}),h(Ge)!=="svelte-1p6bdas"&&(Ge.textContent=eo),Bt.forEach(s),q.forEach(s),yt=o(e),u(ue.$$.fragment,e),vt=o(e),B=a(e,"DIV",{class:!0});var Pt=b(B);u(fe.$$.fragment,Pt),ln=o(Pt),je=a(Pt,"P",{"data-svelte-h":!0}),h(je)!=="svelte-1r606z3"&&(je.textContent=to),Pt.forEach(s),$t=o(e),u(ce.$$.fragment,e),wt=o(e),T=a(e,"DIV",{class:!0});var te=b(T);u(me.$$.fragment,te),un=o(te),Ze=a(te,"P",{"data-svelte-h":!0}),h(Ze)!=="svelte-b8v0f"&&(Ze.innerHTML=no),fn=o(te),Re=a(te,"P",{"data-svelte-h":!0}),h(Re)!=="svelte-7hlgr"&&(Re.innerHTML=oo),cn=o(te),H=a(te,"DIV",{class:!0});var At=b(H);u(pe.$$.fragment,At),mn=o(At),We=a(At,"P",{"data-svelte-h":!0}),h(We)!=="svelte-1ozftb6"&&(We.textContent=io),At.forEach(s),te.forEach(s),zt=o(e),u(ge.$$.fragment,e),qt=o(e),D=a(e,"DIV",{class:!0});var ct=b(D);u(he.$$.fragment,ct),pn=o(ct),Se=a(ct,"P",{"data-svelte-h":!0}),h(Se)!=="svelte-1pwo8e0"&&(Se.textContent=ao),gn=o(ct),u(V.$$.fragment,ct),ct.forEach(s),xt=o(e),u(_e.$$.fragment,e),Ct=o(e),d=a(e,"DIV",{class:!0});var g=b(d);u(be.$$.fragment,g),hn=o(g),Xe=a(g,"P",{"data-svelte-h":!0}),h(Xe)!=="svelte-n1gm3c"&&(Xe.textContent=so),_n=o(g),Ye=a(g,"P",{"data-svelte-h":!0}),h(Ye)!=="svelte-1fnduym"&&(Ye.innerHTML=ro),bn=o(g),U=a(g,"DIV",{class:!0});var It=b(U);u(ye.$$.fragment,It),yn=o(It),Oe=a(It,"P",{"data-svelte-h":!0}),h(Oe)!=="svelte-1d4i4z7"&&(Oe.textContent=lo),It.forEach(s),vn=o(g),J=a(g,"DIV",{class:!0});var Ft=b(J);u(ve.$$.fragment,Ft),$n=o(Ft),Ke=a(Ft,"P",{"data-svelte-h":!0}),h(Ke)!=="svelte-eyxa3y"&&(Ke.innerHTML=uo),Ft.forEach(s),wn=o(g),N=a(g,"DIV",{class:!0});var Et=b(N);u($e.$$.fragment,Et),zn=o(Et),et=a(Et,"P",{"data-svelte-h":!0}),h(et)!=="svelte-y0lxmf"&&(et.textContent=fo),Et.forEach(s),qn=o(g),G=a(g,"DIV",{class:!0});var Ht=b(G);u(we.$$.fragment,Ht),xn=o(Ht),tt=a(Ht,"P",{"data-svelte-h":!0}),h(tt)!=="svelte-1170ss6"&&(tt.textContent=co),Ht.forEach(s),Cn=o(g),j=a(g,"DIV",{class:!0});var Vt=b(j);u(ze.$$.fragment,Vt),Tn=o(Vt),nt=a(Vt,"P",{"data-svelte-h":!0}),h(nt)!=="svelte-odkanz"&&(nt.textContent=mo),Vt.forEach(s),kn=o(g),Z=a(g,"DIV",{class:!0});var Ut=b(Z);u(qe.$$.fragment,Ut),Mn=o(Ut),ot=a(Ut,"P",{"data-svelte-h":!0}),h(ot)!=="svelte-upajm7"&&(ot.textContent=po),Ut.forEach(s),Dn=o(g),R=a(g,"DIV",{class:!0});var Jt=b(R);u(xe.$$.fragment,Jt),Ln=o(Jt),it=a(Jt,"P",{"data-svelte-h":!0}),h(it)!=="svelte-72nwdx"&&(it.innerHTML=go),Jt.forEach(s),Qn=o(g),W=a(g,"DIV",{class:!0});var Nt=b(W);u(Ce.$$.fragment,Nt),Bn=o(Nt),at=a(Nt,"P",{"data-svelte-h":!0}),h(at)!=="svelte-1cb2fzf"&&(at.innerHTML=ho),Nt.forEach(s),Pn=o(g),S=a(g,"DIV",{class:!0});var Gt=b(S);u(Te.$$.fragment,Gt),An=o(Gt),st=a(Gt,"P",{"data-svelte-h":!0}),h(st)!=="svelte-6rgq61"&&(st.innerHTML=_o),Gt.forEach(s),In=o(g),X=a(g,"DIV",{class:!0});var jt=b(X);u(ke.$$.fragment,jt),Fn=o(jt),rt=a(jt,"P",{"data-svelte-h":!0}),h(rt)!=="svelte-wiwxpv"&&(rt.innerHTML=bo),jt.forEach(s),En=o(g),Y=a(g,"DIV",{class:!0});var Zt=b(Y);u(Me.$$.fragment,Zt),Hn=o(Zt),dt=a(Zt,"P",{"data-svelte-h":!0}),h(dt)!=="svelte-5g503h"&&(dt.innerHTML=yo),Zt.forEach(s),Vn=o(g),O=a(g,"DIV",{class:!0});var Rt=b(O);u(De.$$.fragment,Rt),Un=o(Rt),lt=a(Rt,"P",{"data-svelte-h":!0}),h(lt)!=="svelte-13hqoy0"&&(lt.innerHTML=vo),Rt.forEach(s),Jn=o(g),K=a(g,"DIV",{class:!0});var Wt=b(K);u(Le.$$.fragment,Wt),Nn=o(Wt),ut=a(Wt,"P",{"data-svelte-h":!0}),h(ut)!=="svelte-udr2k7"&&(ut.textContent=$o),Wt.forEach(s),Gn=o(g),ee=a(g,"DIV",{class:!0});var St=b(ee);u(Qe.$$.fragment,St),jn=o(St),ft=a(St,"P",{"data-svelte-h":!0}),h(ft)!=="svelte-1ra2q1u"&&(ft.innerHTML=wo),St.forEach(s),g.forEach(s),Tt=o(e),u(Be.$$.fragment,e),kt=o(e),mt=a(e,"P",{}),b(mt).forEach(s),this.h()},h(){y(v,"name","hf:doc:metadata"),y(v,"content",Io),y(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(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(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(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,r){t(document.head,v),_(e,L,r),_(e,x,r),_(e,C,r),f(k,e,r),_(e,z,r),_(e,M,r),_(e,pt,r),f(P,e,r),_(e,gt,r),f(ne,e,r),_(e,ht,r),_(e,Q,r),f(oe,Q,null),t(Q,Xt),t(Q,Fe),_(e,_t,r),f(ie,e,r),_(e,bt,r),_(e,w,r),f(ae,w,null),t(w,Yt),t(w,Ee),t(w,Ot),t(w,He),t(w,Kt),t(w,Ve),t(w,en),t(w,A),f(se,A,null),t(A,tn),t(A,Ue),t(w,nn),t(w,I),f(re,I,null),t(I,on),t(I,Je),t(w,an),t(w,F),f(de,F,null),t(F,sn),t(F,Ne),t(w,rn),t(w,E),f(le,E,null),t(E,dn),t(E,Ge),_(e,yt,r),f(ue,e,r),_(e,vt,r),_(e,B,r),f(fe,B,null),t(B,ln),t(B,je),_(e,$t,r),f(ce,e,r),_(e,wt,r),_(e,T,r),f(me,T,null),t(T,un),t(T,Ze),t(T,fn),t(T,Re),t(T,cn),t(T,H),f(pe,H,null),t(H,mn),t(H,We),_(e,zt,r),f(ge,e,r),_(e,qt,r),_(e,D,r),f(he,D,null),t(D,pn),t(D,Se),t(D,gn),f(V,D,null),_(e,xt,r),f(_e,e,r),_(e,Ct,r),_(e,d,r),f(be,d,null),t(d,hn),t(d,Xe),t(d,_n),t(d,Ye),t(d,bn),t(d,U),f(ye,U,null),t(U,yn),t(U,Oe),t(d,vn),t(d,J),f(ve,J,null),t(J,$n),t(J,Ke),t(d,wn),t(d,N),f($e,N,null),t(N,zn),t(N,et),t(d,qn),t(d,G),f(we,G,null),t(G,xn),t(G,tt),t(d,Cn),t(d,j),f(ze,j,null),t(j,Tn),t(j,nt),t(d,kn),t(d,Z),f(qe,Z,null),t(Z,Mn),t(Z,ot),t(d,Dn),t(d,R),f(xe,R,null),t(R,Ln),t(R,it),t(d,Qn),t(d,W),f(Ce,W,null),t(W,Bn),t(W,at),t(d,Pn),t(d,S),f(Te,S,null),t(S,An),t(S,st),t(d,In),t(d,X),f(ke,X,null),t(X,Fn),t(X,rt),t(d,En),t(d,Y),f(Me,Y,null),t(Y,Hn),t(Y,dt),t(d,Vn),t(d,O),f(De,O,null),t(O,Un),t(O,lt),t(d,Jn),t(d,K),f(Le,K,null),t(K,Nn),t(K,ut),t(d,Gn),t(d,ee),f(Qe,ee,null),t(ee,jn),t(ee,ft),_(e,Tt,r),f(Be,e,r),_(e,kt,r),_(e,mt,r),Mt=!0},p(e,[r]){const Pe={};r&2&&(Pe.$$scope={dirty:r,ctx:e}),P.$set(Pe);const q={};r&2&&(q.$$scope={dirty:r,ctx:e}),V.$set(q)},i(e){Mt||(c(k.$$.fragment,e),c(P.$$.fragment,e),c(ne.$$.fragment,e),c(oe.$$.fragment,e),c(ie.$$.fragment,e),c(ae.$$.fragment,e),c(se.$$.fragment,e),c(re.$$.fragment,e),c(de.$$.fragment,e),c(le.$$.fragment,e),c(ue.$$.fragment,e),c(fe.$$.fragment,e),c(ce.$$.fragment,e),c(me.$$.fragment,e),c(pe.$$.fragment,e),c(ge.$$.fragment,e),c(he.$$.fragment,e),c(V.$$.fragment,e),c(_e.$$.fragment,e),c(be.$$.fragment,e),c(ye.$$.fragment,e),c(ve.$$.fragment,e),c($e.$$.fragment,e),c(we.$$.fragment,e),c(ze.$$.fragment,e),c(qe.$$.fragment,e),c(xe.$$.fragment,e),c(Ce.$$.fragment,e),c(Te.$$.fragment,e),c(ke.$$.fragment,e),c(Me.$$.fragment,e),c(De.$$.fragment,e),c(Le.$$.fragment,e),c(Qe.$$.fragment,e),c(Be.$$.fragment,e),Mt=!0)},o(e){m(k.$$.fragment,e),m(P.$$.fragment,e),m(ne.$$.fragment,e),m(oe.$$.fragment,e),m(ie.$$.fragment,e),m(ae.$$.fragment,e),m(se.$$.fragment,e),m(re.$$.fragment,e),m(de.$$.fragment,e),m(le.$$.fragment,e),m(ue.$$.fragment,e),m(fe.$$.fragment,e),m(ce.$$.fragment,e),m(me.$$.fragment,e),m(pe.$$.fragment,e),m(ge.$$.fragment,e),m(he.$$.fragment,e),m(V.$$.fragment,e),m(_e.$$.fragment,e),m(be.$$.fragment,e),m(ye.$$.fragment,e),m(ve.$$.fragment,e),m($e.$$.fragment,e),m(we.$$.fragment,e),m(ze.$$.fragment,e),m(qe.$$.fragment,e),m(xe.$$.fragment,e),m(Ce.$$.fragment,e),m(Te.$$.fragment,e),m(ke.$$.fragment,e),m(Me.$$.fragment,e),m(De.$$.fragment,e),m(Le.$$.fragment,e),m(Qe.$$.fragment,e),m(Be.$$.fragment,e),Mt=!1},d(e){e&&(s(L),s(x),s(C),s(z),s(M),s(pt),s(gt),s(ht),s(Q),s(_t),s(bt),s(w),s(yt),s(vt),s(B),s($t),s(wt),s(T),s(zt),s(qt),s(D),s(xt),s(Ct),s(d),s(Tt),s(kt),s(mt)),s(v),p(k,e),p(P,e),p(ne,e),p(oe),p(ie,e),p(ae),p(se),p(re),p(de),p(le),p(ue,e),p(fe),p(ce,e),p(me),p(pe),p(ge,e),p(he),p(V),p(_e,e),p(be),p(ye),p(ve),p($e),p(we),p(ze),p(qe),p(xe),p(Ce),p(Te),p(ke),p(Me),p(De),p(Le),p(Qe),p(Be,e)}}}const Io='{"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 Fo(Ie){return xo(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class jo extends Co{constructor(v){super(),To(this,v,Fo,Ao,qo,{})}}export{jo as component};
