@huggingface/transformers 3.0.0-alpha.12 → 3.0.0-alpha.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -154,7 +154,7 @@ var r,i,a,s,o,l,u,d,c,p,h,m,f,g,_,w,y,b,v,x,M,T,k,$,S,C,E,P,A,F,z,I,O,B=Object.d
154
154
  \************************/(e,t,n)=>{n.r(t),n.d(t,{AutoConfig:()=>l,PretrainedConfig:()=>o,getKeyValueShapes:()=>s});var r=n(/*! ./utils/core.js */"./src/utils/core.js"),i=n(/*! ./utils/hub.js */"./src/utils/hub.js");function a(e){const t={};let n={};switch(e.model_type){case"llava":case"paligemma":case"florence2":n=a(e.text_config);break;case"moondream1":n=a(e.phi_config);break;case"musicgen":n=a(e.decoder);break;case"gpt2":case"gptj":case"jais":case"codegen":case"gpt_bigcode":t.num_heads="n_head",t.num_layers="n_layer",t.hidden_size="n_embd";break;case"gpt_neox":case"stablelm":case"opt":case"phi":case"phi3":case"falcon":t.num_heads="num_attention_heads",t.num_layers="num_hidden_layers",t.hidden_size="hidden_size";break;case"llama":case"cohere":case"mistral":case"starcoder2":case"qwen2":t.num_heads="num_key_value_heads",t.num_layers="num_hidden_layers",t.hidden_size="hidden_size",t.num_attention_heads="num_attention_heads";break;case"gemma":case"gemma2":t.num_heads="num_key_value_heads",t.num_layers="num_hidden_layers",t.dim_kv="head_dim";break;case"openelm":t.num_heads="num_kv_heads",t.num_layers="num_transformer_layers",t.dim_kv="head_dim";break;case"gpt_neo":case"donut-swin":t.num_heads="num_heads",t.num_layers="num_layers",t.hidden_size="hidden_size";break;case"bloom":t.num_heads="n_head",t.num_layers="n_layer",t.hidden_size="hidden_size";break;case"mpt":t.num_heads="n_heads",t.num_layers="n_layers",t.hidden_size="d_model";break;case"t5":case"mt5":case"longt5":t.num_decoder_layers="num_decoder_layers",t.num_decoder_heads="num_heads",t.decoder_dim_kv="d_kv",t.num_encoder_layers="num_layers",t.num_encoder_heads="num_heads",t.encoder_dim_kv="d_kv";break;case"bart":case"mbart":case"marian":case"whisper":case"m2m_100":case"blenderbot":case"blenderbot-small":case"florence2_language":t.num_decoder_layers="decoder_layers",t.num_decoder_heads="decoder_attention_heads",t.decoder_hidden_size="d_model",t.num_encoder_layers="encoder_layers",t.num_encoder_heads="encoder_attention_heads",t.encoder_hidden_size="d_model";break;case"speecht5":t.num_decoder_layers="decoder_layers",t.num_decoder_heads="decoder_attention_heads",t.decoder_hidden_size="hidden_size",t.num_encoder_layers="encoder_layers",t.num_encoder_heads="encoder_attention_heads",t.encoder_hidden_size="hidden_size";break;case"trocr":t.num_encoder_layers=t.num_decoder_layers="decoder_layers",t.num_encoder_heads=t.num_decoder_heads="decoder_attention_heads",t.encoder_hidden_size=t.decoder_hidden_size="d_model";break;case"musicgen_decoder":t.num_encoder_layers=t.num_decoder_layers="num_hidden_layers",t.num_encoder_heads=t.num_decoder_heads="num_attention_heads",t.encoder_hidden_size=t.decoder_hidden_size="hidden_size";break;case"vision-encoder-decoder":const i=a(e.decoder),s="num_decoder_layers"in i,o=(0,r.pick)(e,["model_type","is_encoder_decoder"]);return s?(o.num_decoder_layers=i.num_decoder_layers,o.num_decoder_heads=i.num_decoder_heads,o.decoder_hidden_size=i.decoder_hidden_size,o.num_encoder_layers=i.num_encoder_layers,o.num_encoder_heads=i.num_encoder_heads,o.encoder_hidden_size=i.encoder_hidden_size):(o.num_layers=i.num_layers,o.num_heads=i.num_heads,o.hidden_size=i.hidden_size),o}const i={...n,...(0,r.pick)(e,["model_type","multi_query","is_encoder_decoder"])};for(const n in t)i[n]=e[t[n]];return i}function s(e,{prefix:t="past_key_values"}={}){const n={},r=e.normalized_config;if(r.is_encoder_decoder&&"num_encoder_heads"in r&&"num_decoder_heads"in r){const e=r.encoder_dim_kv??r.encoder_hidden_size/r.num_encoder_heads,i=r.decoder_dim_kv??r.decoder_hidden_size/r.num_decoder_heads,a=[1,r.num_encoder_heads,0,e],s=[1,r.num_decoder_heads,0,i];for(let e=0;e<r.num_decoder_layers;++e)n[`${t}.${e}.encoder.key`]=a,n[`${t}.${e}.encoder.value`]=a,n[`${t}.${e}.decoder.key`]=s,n[`${t}.${e}.decoder.value`]=s}else{const e=r.num_heads,i=r.num_layers,a=r.dim_kv??r.hidden_size/(r.num_attention_heads??e);if("falcon"===r.model_type){const r=[1*e,0,a];for(let e=0;e<i;++e)n[`${t}.${e}.key`]=r,n[`${t}.${e}.value`]=r}else if(r.multi_query){const r=[1*e,0,2*a];for(let e=0;e<i;++e)n[`${t}.${e}.key_value`]=r}else if("bloom"===r.model_type){const r=[1*e,a,0],s=[1*e,0,a];for(let e=0;e<i;++e)n[`${t}.${e}.key`]=r,n[`${t}.${e}.value`]=s}else if("openelm"===r.model_type)for(let r=0;r<i;++r){const i=[1,e[r],0,a];n[`${t}.${r}.key`]=i,n[`${t}.${r}.value`]=i}else{const r=[1,e,0,a];for(let e=0;e<i;++e)n[`${t}.${e}.key`]=r,n[`${t}.${e}.value`]=r}}return n}class o{max_position_embeddings;constructor(e){this.model_type=null,this.is_encoder_decoder=!1,Object.assign(this,e),this.normalized_config=a(this)}static async from_pretrained(e,{progress_callback:t=null,config:n=null,cache_dir:r=null,local_files_only:a=!1,revision:s="main"}={}){!n||n instanceof o||(n=new o(n));const l=n??await async function(e,t){return await(0,i.getModelJSON)(e,"config.json",!0,t)}(e,{progress_callback:t,config:n,cache_dir:r,local_files_only:a,revision:s});return new this(l)}}class l{static async from_pretrained(...e){return o.from_pretrained(...e)}}},"./src/env.js":
155
155
  /*!********************!*\
156
156
  !*** ./src/env.js ***!
157
- \********************/(e,t,n)=>{n.r(t),n.d(t,{apis:()=>f,env:()=>b});var r=n(/*! fs */"?569f"),i=n(/*! path */"?3f59"),a=n(/*! url */"?154a");const s="undefined"!=typeof self,o=s&&"DedicatedWorkerGlobalScope"===self.constructor.name,l=s&&"caches"in self,u="undefined"!=typeof navigator&&"gpu"in navigator,d="undefined"!=typeof navigator&&"ml"in navigator,c="undefined"!=typeof process,p=c&&"node"===process?.release?.name,h=!v(r),m=!v(i),f=Object.freeze({IS_BROWSER_ENV:s,IS_WEBWORKER_ENV:o,IS_WEB_CACHE_AVAILABLE:l,IS_WEBGPU_AVAILABLE:u,IS_WEBNN_AVAILABLE:d,IS_PROCESS_AVAILABLE:c,IS_NODE_ENV:p,IS_FS_AVAILABLE:h,IS_PATH_AVAILABLE:m}),g=h&&m,_=g?i.dirname(i.dirname(a.fileURLToPath(import.meta.url))):"./",w=g?i.join(_,"/.cache/"):null,y="/models/",b={version:"3.0.0-alpha.12",backends:{onnx:{}},allowRemoteModels:!0,remoteHost:"https://huggingface.co/",remotePathTemplate:"{model}/resolve/{revision}/",allowLocalModels:!s,localModelPath:g?i.join(_,y):y,useFS:h,useBrowserCache:l,useFSCache:h,cacheDir:w,useCustomCache:!1,customCache:null};function v(e){return 0===Object.keys(e).length}},"./src/generation/configuration_utils.js":
157
+ \********************/(e,t,n)=>{n.r(t),n.d(t,{apis:()=>f,env:()=>b});var r=n(/*! fs */"?569f"),i=n(/*! path */"?3f59"),a=n(/*! url */"?154a");const s="undefined"!=typeof self,o=s&&"DedicatedWorkerGlobalScope"===self.constructor.name,l=s&&"caches"in self,u="undefined"!=typeof navigator&&"gpu"in navigator,d="undefined"!=typeof navigator&&"ml"in navigator,c="undefined"!=typeof process,p=c&&"node"===process?.release?.name,h=!v(r),m=!v(i),f=Object.freeze({IS_BROWSER_ENV:s,IS_WEBWORKER_ENV:o,IS_WEB_CACHE_AVAILABLE:l,IS_WEBGPU_AVAILABLE:u,IS_WEBNN_AVAILABLE:d,IS_PROCESS_AVAILABLE:c,IS_NODE_ENV:p,IS_FS_AVAILABLE:h,IS_PATH_AVAILABLE:m}),g=h&&m,_=g?i.dirname(i.dirname(a.fileURLToPath(import.meta.url))):"./",w=g?i.join(_,"/.cache/"):null,y="/models/",b={version:"3.0.0-alpha.13",backends:{onnx:{}},allowRemoteModels:!0,remoteHost:"https://huggingface.co/",remotePathTemplate:"{model}/resolve/{revision}/",allowLocalModels:!s,localModelPath:g?i.join(_,y):y,useFS:h,useBrowserCache:l,useFSCache:h,cacheDir:w,useCustomCache:!1,customCache:null};function v(e){return 0===Object.keys(e).length}},"./src/generation/configuration_utils.js":
158
158
  /*!***********************************************!*\
159
159
  !*** ./src/generation/configuration_utils.js ***!
160
160
  \***********************************************/(e,t,n)=>{n.r(t),n.d(t,{GenerationConfig:()=>i});var r=n(/*! ../utils/core.js */"./src/utils/core.js");class i{max_length=20;max_new_tokens=null;min_length=0;min_new_tokens=null;early_stopping=!1;max_time=null;do_sample=!1;num_beams=1;num_beam_groups=1;penalty_alpha=null;use_cache=!0;temperature=1;top_k=50;top_p=1;typical_p=1;epsilon_cutoff=0;eta_cutoff=0;diversity_penalty=0;repetition_penalty=1;encoder_repetition_penalty=1;length_penalty=1;no_repeat_ngram_size=0;bad_words_ids=null;force_words_ids=null;renormalize_logits=!1;constraints=null;forced_bos_token_id=null;forced_eos_token_id=null;remove_invalid_values=!1;exponential_decay_length_penalty=null;suppress_tokens=null;begin_suppress_tokens=null;forced_decoder_ids=null;guidance_scale=null;num_return_sequences=1;output_attentions=!1;output_hidden_states=!1;output_scores=!1;return_dict_in_generate=!1;pad_token_id=null;bos_token_id=null;eos_token_id=null;encoder_no_repeat_ngram_size=0;decoder_start_token_id=null;generation_kwargs={};constructor(e){Object.assign(this,(0,r.pick)(e,Object.getOwnPropertyNames(this)))}}},"./src/generation/logits_process.js":
@@ -172,7 +172,7 @@ var r,i,a,s,o,l,u,d,c,p,h,m,f,g,_,w,y,b,v,x,M,T,k,$,S,C,E,P,A,F,z,I,O,B=Object.d
172
172
  \*************************************/(e,t,n)=>{n.r(t),n.d(t,{BaseStreamer:()=>s,TextStreamer:()=>l,WhisperTextStreamer:()=>u});var r=n(/*! ../utils/core.js */"./src/utils/core.js"),i=n(/*! ../tokenizers.js */"./src/tokenizers.js"),a=n(/*! ../env.js */"./src/env.js");class s{put(e){throw Error("Not implemented")}end(){throw Error("Not implemented")}}const o=a.apis.IS_PROCESS_AVAILABLE?e=>process.stdout.write(e):e=>console.log(e);class l extends s{constructor(e,{skip_prompt:t=!1,callback_function:n=null,token_callback_function:r=null,decode_kwargs:i={},...a}={}){super(),this.tokenizer=e,this.skip_prompt=t,this.callback_function=n??o,this.token_callback_function=r,this.decode_kwargs={...i,...a},this.token_cache=[],this.print_len=0,this.next_tokens_are_prompt=!0}put(e){if(e.length>1)throw Error("TextStreamer only supports batch size of 1");if(this.skip_prompt&&this.next_tokens_are_prompt)return void(this.next_tokens_are_prompt=!1);const t=e[0];this.token_callback_function?.(t),this.token_cache=(0,r.mergeArrays)(this.token_cache,t);const n=this.tokenizer.decode(this.token_cache,this.decode_kwargs);let a;n.endsWith("\n")?(a=n.slice(this.print_len),this.token_cache=[],this.print_len=0):n.length>0&&(0,i.is_chinese_char)(n.charCodeAt(n.length-1))?(a=n.slice(this.print_len),this.print_len+=a.length):(a=n.slice(this.print_len,n.lastIndexOf(" ")+1),this.print_len+=a.length),this.on_finalized_text(a,!1)}end(){let e;if(this.token_cache.length>0){e=this.tokenizer.decode(this.token_cache,this.decode_kwargs).slice(this.print_len),this.token_cache=[],this.print_len=0}else e="";this.next_tokens_are_prompt=!0,this.on_finalized_text(e,!0)}on_finalized_text(e,t){e.length>0&&this.callback_function?.(e),t&&this.callback_function===o&&a.apis.IS_PROCESS_AVAILABLE&&this.callback_function?.("\n")}}class u extends l{constructor(e,{skip_prompt:t=!1,callback_function:n=null,token_callback_function:r=null,on_chunk_start:i=null,on_chunk_end:a=null,on_finalize:s=null,time_precision:o=.02,skip_special_tokens:l=!0,decode_kwargs:u={}}={}){super(e,{skip_prompt:t,callback_function:n,token_callback_function:r,decode_kwargs:{skip_special_tokens:l,...u}}),this.timestamp_begin=e.timestamp_begin,this.on_chunk_start=i,this.on_chunk_end=a,this.on_finalize=s,this.time_precision=o,this.waiting_for_timestamp=!1}put(e){if(e.length>1)throw Error("WhisperTextStreamer only supports batch size of 1");const t=e[0];if(1===t.length){const n=Number(t[0])-this.timestamp_begin;if(n>=0){const t=n*this.time_precision;this.waiting_for_timestamp?this.on_chunk_end?.(t):this.on_chunk_start?.(t),this.waiting_for_timestamp=!this.waiting_for_timestamp,e=[[]]}}return super.put(e)}end(){super.end(),this.on_finalize?.()}}},"./src/models.js":
173
173
  /*!***********************!*\
174
174
  !*** ./src/models.js ***!
175
- \***********************/(e,t,n)=>{n.r(t),n.d(t,{ASTForAudioClassification:()=>nn,ASTModel:()=>tn,ASTPreTrainedModel:()=>en,AlbertForMaskedLM:()=>ct,AlbertForQuestionAnswering:()=>dt,AlbertForSequenceClassification:()=>ut,AlbertModel:()=>lt,AlbertPreTrainedModel:()=>ot,AutoModel:()=>lo,AutoModelForAudioClassification:()=>So,AutoModelForAudioFrameClassification:()=>Eo,AutoModelForCTC:()=>$o,AutoModelForCausalLM:()=>go,AutoModelForDepthEstimation:()=>zo,AutoModelForDocumentQuestionAnswering:()=>Po,AutoModelForImageClassification:()=>bo,AutoModelForImageFeatureExtraction:()=>Io,AutoModelForImageMatting:()=>Ao,AutoModelForImageSegmentation:()=>vo,AutoModelForImageToImage:()=>Fo,AutoModelForMaskGeneration:()=>ko,AutoModelForMaskedLM:()=>_o,AutoModelForObjectDetection:()=>Mo,AutoModelForQuestionAnswering:()=>wo,AutoModelForSemanticSegmentation:()=>xo,AutoModelForSeq2SeqLM:()=>po,AutoModelForSequenceClassification:()=>uo,AutoModelForSpeechSeq2Seq:()=>ho,AutoModelForTextToSpectrogram:()=>mo,AutoModelForTextToWaveform:()=>fo,AutoModelForTokenClassification:()=>co,AutoModelForVision2Seq:()=>yo,AutoModelForXVector:()=>Co,AutoModelForZeroShotObjectDetection:()=>To,BartForConditionalGeneration:()=>Mt,BartForSequenceClassification:()=>Tt,BartModel:()=>xt,BartPretrainedModel:()=>vt,BaseModelOutput:()=>G,BeitForImageClassification:()=>Xr,BeitModel:()=>Hr,BeitPreTrainedModel:()=>Wr,BertForMaskedLM:()=>W,BertForQuestionAnswering:()=>K,BertForSequenceClassification:()=>H,BertForTokenClassification:()=>X,BertModel:()=>U,BertPreTrainedModel:()=>q,BlenderbotForConditionalGeneration:()=>Ft,BlenderbotModel:()=>At,BlenderbotPreTrainedModel:()=>Pt,BlenderbotSmallForConditionalGeneration:()=>Ot,BlenderbotSmallModel:()=>It,BlenderbotSmallPreTrainedModel:()=>zt,BloomForCausalLM:()=>yr,BloomModel:()=>wr,BloomPreTrainedModel:()=>_r,CLIPModel:()=>mn,CLIPPreTrainedModel:()=>hn,CLIPSegForImageSegmentation:()=>kn,CLIPSegModel:()=>Tn,CLIPSegPreTrainedModel:()=>Mn,CLIPTextModelWithProjection:()=>fn,CLIPVisionModelWithProjection:()=>gn,CamembertForMaskedLM:()=>we,CamembertForQuestionAnswering:()=>ve,CamembertForSequenceClassification:()=>ye,CamembertForTokenClassification:()=>be,CamembertModel:()=>_e,CamembertPreTrainedModel:()=>ge,CausalLMOutput:()=>Vo,CausalLMOutputWithPast:()=>jo,ChineseCLIPModel:()=>xn,ChineseCLIPPreTrainedModel:()=>vn,ClapAudioModelWithProjection:()=>ts,ClapModel:()=>Za,ClapPreTrainedModel:()=>Ja,ClapTextModelWithProjection:()=>es,CodeGenForCausalLM:()=>Wn,CodeGenModel:()=>Un,CodeGenPreTrainedModel:()=>qn,CohereForCausalLM:()=>Jn,CohereModel:()=>Yn,CoherePreTrainedModel:()=>Qn,ConvBertForMaskedLM:()=>se,ConvBertForQuestionAnswering:()=>ue,ConvBertForSequenceClassification:()=>oe,ConvBertForTokenClassification:()=>le,ConvBertModel:()=>ae,ConvBertPreTrainedModel:()=>ie,ConvNextForImageClassification:()=>Li,ConvNextModel:()=>Bi,ConvNextPreTrainedModel:()=>Oi,ConvNextV2ForImageClassification:()=>Ni,ConvNextV2Model:()=>Ri,ConvNextV2PreTrainedModel:()=>Di,DPTForDepthEstimation:()=>Mi,DPTModel:()=>xi,DPTPreTrainedModel:()=>vi,DebertaForMaskedLM:()=>Te,DebertaForQuestionAnswering:()=>Se,DebertaForSequenceClassification:()=>ke,DebertaForTokenClassification:()=>$e,DebertaModel:()=>Me,DebertaPreTrainedModel:()=>xe,DebertaV2ForMaskedLM:()=>Pe,DebertaV2ForQuestionAnswering:()=>ze,DebertaV2ForSequenceClassification:()=>Ae,DebertaV2ForTokenClassification:()=>Fe,DebertaV2Model:()=>Ee,DebertaV2PreTrainedModel:()=>Ce,DeiTForImageClassification:()=>ci,DeiTModel:()=>di,DeiTPreTrainedModel:()=>ui,DepthAnythingForDepthEstimation:()=>ki,DepthAnythingPreTrainedModel:()=>Ti,DetrForObjectDetection:()=>Yr,DetrForSegmentation:()=>Jr,DetrModel:()=>Qr,DetrObjectDetectionOutput:()=>Zr,DetrPreTrainedModel:()=>Kr,DetrSegmentationOutput:()=>ei,Dinov2ForImageClassification:()=>Gi,Dinov2Model:()=>ji,Dinov2PreTrainedModel:()=>Vi,DistilBertForMaskedLM:()=>Re,DistilBertForQuestionAnswering:()=>De,DistilBertForSequenceClassification:()=>Be,DistilBertForTokenClassification:()=>Le,DistilBertModel:()=>Oe,DistilBertPreTrainedModel:()=>Ie,DonutSwinModel:()=>Ii,DonutSwinPreTrainedModel:()=>zi,EfficientNetForImageClassification:()=>hs,EfficientNetModel:()=>ps,EfficientNetPreTrainedModel:()=>cs,ElectraForMaskedLM:()=>pe,ElectraForQuestionAnswering:()=>fe,ElectraForSequenceClassification:()=>he,ElectraForTokenClassification:()=>me,ElectraModel:()=>ce,ElectraPreTrainedModel:()=>de,EsmForMaskedLM:()=>je,EsmForSequenceClassification:()=>Ge,EsmForTokenClassification:()=>qe,EsmModel:()=>Ve,EsmPreTrainedModel:()=>Ne,FalconForCausalLM:()=>Ya,FalconModel:()=>Qa,FalconPreTrainedModel:()=>Ka,FastViTForImageClassification:()=>Ar,FastViTModel:()=>Pr,FastViTPreTrainedModel:()=>Er,Florence2ForConditionalGeneration:()=>pn,Florence2PreTrainedModel:()=>cn,GLPNForDepthEstimation:()=>Fi,GLPNModel:()=>Ai,GLPNPreTrainedModel:()=>Pi,GPT2LMHeadModel:()=>Cn,GPT2Model:()=>Sn,GPT2PreTrainedModel:()=>$n,GPTBigCodeForCausalLM:()=>Gn,GPTBigCodeModel:()=>jn,GPTBigCodePreTrainedModel:()=>Vn,GPTJForCausalLM:()=>Nn,GPTJModel:()=>Rn,GPTJPreTrainedModel:()=>Dn,GPTNeoForCausalLM:()=>In,GPTNeoModel:()=>zn,GPTNeoPreTrainedModel:()=>Fn,GPTNeoXForCausalLM:()=>Ln,GPTNeoXModel:()=>Bn,GPTNeoXPreTrainedModel:()=>On,Gemma2ForCausalLM:()=>ir,Gemma2Model:()=>rr,Gemma2PreTrainedModel:()=>nr,GemmaForCausalLM:()=>tr,GemmaModel:()=>er,GemmaPreTrainedModel:()=>Zn,HubertForCTC:()=>Ca,HubertForSequenceClassification:()=>Ea,HubertModel:()=>Sa,HubertPreTrainedModel:()=>$a,ImageMattingOutput:()=>Go,JAISLMHeadModel:()=>An,JAISModel:()=>Pn,JAISPreTrainedModel:()=>En,LlamaForCausalLM:()=>Kn,LlamaModel:()=>Xn,LlamaPreTrainedModel:()=>Hn,LlavaForConditionalGeneration:()=>un,LlavaPreTrainedModel:()=>ln,LongT5ForConditionalGeneration:()=>_t,LongT5Model:()=>gt,LongT5PreTrainedModel:()=>ft,M2M100ForConditionalGeneration:()=>na,M2M100Model:()=>ta,M2M100PreTrainedModel:()=>ea,MBartForCausalLM:()=>Et,MBartForConditionalGeneration:()=>St,MBartForSequenceClassification:()=>Ct,MBartModel:()=>$t,MBartPreTrainedModel:()=>kt,MPNetForMaskedLM:()=>Je,MPNetForQuestionAnswering:()=>tt,MPNetForSequenceClassification:()=>Ze,MPNetForTokenClassification:()=>et,MPNetModel:()=>Ye,MPNetPreTrainedModel:()=>Qe,MT5ForConditionalGeneration:()=>bt,MT5Model:()=>yt,MT5PreTrainedModel:()=>wt,MarianMTModel:()=>Zi,MarianModel:()=>Ji,MarianPreTrainedModel:()=>Yi,MaskedLMOutput:()=>Ro,MistralForCausalLM:()=>Ua,MistralModel:()=>qa,MistralPreTrainedModel:()=>Ga,MobileBertForMaskedLM:()=>He,MobileBertForQuestionAnswering:()=>Ke,MobileBertForSequenceClassification:()=>Xe,MobileBertModel:()=>We,MobileBertPreTrainedModel:()=>Ue,MobileNetV1ForImageClassification:()=>bs,MobileNetV1Model:()=>ys,MobileNetV1PreTrainedModel:()=>ws,MobileNetV2ForImageClassification:()=>Ms,MobileNetV2Model:()=>xs,MobileNetV2PreTrainedModel:()=>vs,MobileNetV3ForImageClassification:()=>$s,MobileNetV3Model:()=>ks,MobileNetV3PreTrainedModel:()=>Ts,MobileNetV4ForImageClassification:()=>Es,MobileNetV4Model:()=>Cs,MobileNetV4PreTrainedModel:()=>Ss,MobileViTForImageClassification:()=>Br,MobileViTModel:()=>Or,MobileViTPreTrainedModel:()=>Ir,MobileViTV2ForImageClassification:()=>Rr,MobileViTV2Model:()=>Dr,MobileViTV2PreTrainedModel:()=>Lr,ModelOutput:()=>j,Moondream1ForConditionalGeneration:()=>dn,MptForCausalLM:()=>xr,MptModel:()=>vr,MptPreTrainedModel:()=>br,MusicgenForCausalLM:()=>gs,MusicgenForConditionalGeneration:()=>_s,MusicgenModel:()=>fs,MusicgenPreTrainedModel:()=>ms,NomicBertModel:()=>Y,NomicBertPreTrainedModel:()=>Q,OPTForCausalLM:()=>kr,OPTModel:()=>Tr,OPTPreTrainedModel:()=>Mr,OpenELMForCausalLM:()=>or,OpenELMModel:()=>sr,OpenELMPreTrainedModel:()=>ar,OwlViTForObjectDetection:()=>jr,OwlViTModel:()=>Vr,OwlViTPreTrainedModel:()=>Nr,Owlv2ForObjectDetection:()=>Ur,Owlv2Model:()=>qr,Owlv2PreTrainedModel:()=>Gr,Phi3ForCausalLM:()=>gr,Phi3Model:()=>fr,Phi3PreTrainedModel:()=>mr,PhiForCausalLM:()=>hr,PhiModel:()=>pr,PhiPreTrainedModel:()=>cr,PreTrainedModel:()=>V,PretrainedMixin:()=>Ps,PyAnnoteForAudioFrameClassification:()=>da,PyAnnoteModel:()=>ua,PyAnnotePreTrainedModel:()=>la,QuestionAnsweringModelOutput:()=>No,Qwen2ForCausalLM:()=>dr,Qwen2Model:()=>ur,Qwen2PreTrainedModel:()=>lr,RTDetrForObjectDetection:()=>ri,RTDetrModel:()=>ni,RTDetrObjectDetectionOutput:()=>ii,RTDetrPreTrainedModel:()=>ti,ResNetForImageClassification:()=>mi,ResNetModel:()=>hi,ResNetPreTrainedModel:()=>pi,RoFormerForMaskedLM:()=>ee,RoFormerForQuestionAnswering:()=>re,RoFormerForSequenceClassification:()=>te,RoFormerForTokenClassification:()=>ne,RoFormerModel:()=>Z,RoFormerPreTrainedModel:()=>J,RobertaForMaskedLM:()=>Dt,RobertaForQuestionAnswering:()=>Vt,RobertaForSequenceClassification:()=>Rt,RobertaForTokenClassification:()=>Nt,RobertaModel:()=>Lt,RobertaPreTrainedModel:()=>Bt,SamImageSegmentationOutput:()=>Qi,SamModel:()=>Ki,SamPreTrainedModel:()=>Xi,SapiensForDepthEstimation:()=>Ci,SapiensForNormalEstimation:()=>Ei,SapiensForSemanticSegmentation:()=>Si,SapiensPreTrainedModel:()=>$i,SegformerForImageClassification:()=>ss,SegformerForSemanticSegmentation:()=>os,SegformerModel:()=>as,SegformerPreTrainedModel:()=>is,Seq2SeqLMOutput:()=>Oo,SequenceClassifierOutput:()=>Bo,SiglipModel:()=>wn,SiglipPreTrainedModel:()=>_n,SiglipTextModel:()=>yn,SiglipVisionModel:()=>bn,SpeechT5ForSpeechToText:()=>Da,SpeechT5ForTextToSpeech:()=>Ra,SpeechT5HifiGan:()=>Na,SpeechT5Model:()=>La,SpeechT5PreTrainedModel:()=>Ba,SqueezeBertForMaskedLM:()=>it,SqueezeBertForQuestionAnswering:()=>st,SqueezeBertForSequenceClassification:()=>at,SqueezeBertModel:()=>rt,SqueezeBertPreTrainedModel:()=>nt,StableLmForCausalLM:()=>ds,StableLmModel:()=>us,StableLmPreTrainedModel:()=>ls,Starcoder2ForCausalLM:()=>Xa,Starcoder2Model:()=>Ha,Starcoder2PreTrainedModel:()=>Wa,Swin2SRForImageSuperResolution:()=>bi,Swin2SRModel:()=>yi,Swin2SRPreTrainedModel:()=>wi,SwinForImageClassification:()=>_i,SwinModel:()=>gi,SwinPreTrainedModel:()=>fi,T5ForConditionalGeneration:()=>mt,T5Model:()=>ht,T5PreTrainedModel:()=>pt,TableTransformerForObjectDetection:()=>oi,TableTransformerModel:()=>si,TableTransformerObjectDetectionOutput:()=>li,TableTransformerPreTrainedModel:()=>ai,TokenClassifierOutput:()=>Do,TrOCRForCausalLM:()=>ja,TrOCRPreTrainedModel:()=>Va,UniSpeechForCTC:()=>fa,UniSpeechForSequenceClassification:()=>ga,UniSpeechModel:()=>ma,UniSpeechPreTrainedModel:()=>ha,UniSpeechSatForAudioFrameClassification:()=>va,UniSpeechSatForCTC:()=>ya,UniSpeechSatForSequenceClassification:()=>ba,UniSpeechSatModel:()=>wa,UniSpeechSatPreTrainedModel:()=>_a,ViTForImageClassification:()=>Cr,ViTModel:()=>Sr,ViTPreTrainedModel:()=>$r,VisionEncoderDecoderModel:()=>on,VitMatteForImageMatting:()=>zr,VitMattePreTrainedModel:()=>Fr,VitsModel:()=>rs,VitsModelOutput:()=>qo,VitsPreTrainedModel:()=>ns,Wav2Vec2BertForCTC:()=>Ta,Wav2Vec2BertForSequenceClassification:()=>ka,Wav2Vec2BertModel:()=>Ma,Wav2Vec2BertPreTrainedModel:()=>xa,Wav2Vec2ForAudioFrameClassification:()=>oa,Wav2Vec2ForCTC:()=>aa,Wav2Vec2ForSequenceClassification:()=>sa,Wav2Vec2Model:()=>ia,Wav2Vec2PreTrainedModel:()=>ra,WavLMForAudioFrameClassification:()=>Oa,WavLMForCTC:()=>Fa,WavLMForSequenceClassification:()=>za,WavLMForXVector:()=>Ia,WavLMModel:()=>Aa,WavLMPreTrainedModel:()=>Pa,WeSpeakerResNetModel:()=>pa,WeSpeakerResNetPreTrainedModel:()=>ca,WhisperForConditionalGeneration:()=>sn,WhisperModel:()=>an,WhisperPreTrainedModel:()=>rn,XLMForQuestionAnswering:()=>Ht,XLMForSequenceClassification:()=>Ut,XLMForTokenClassification:()=>Wt,XLMModel:()=>Gt,XLMPreTrainedModel:()=>jt,XLMRobertaForMaskedLM:()=>Qt,XLMRobertaForQuestionAnswering:()=>Zt,XLMRobertaForSequenceClassification:()=>Yt,XLMRobertaForTokenClassification:()=>Jt,XLMRobertaModel:()=>Kt,XLMRobertaPreTrainedModel:()=>Xt,XLMWithLMHeadModel:()=>qt,XVectorOutput:()=>Lo,YolosForObjectDetection:()=>Wi,YolosModel:()=>Ui,YolosObjectDetectionOutput:()=>Hi,YolosPreTrainedModel:()=>qi});var r=n(/*! ./configs.js */"./src/configs.js"),i=n(/*! ./backends/onnx.js */"./src/backends/onnx.js"),a=n(/*! ./utils/dtypes.js */"./src/utils/dtypes.js"),s=n(/*! ./utils/generic.js */"./src/utils/generic.js"),o=n(/*! ./utils/core.js */"./src/utils/core.js"),l=n(/*! ./utils/hub.js */"./src/utils/hub.js"),u=n(/*! ./generation/logits_process.js */"./src/generation/logits_process.js"),d=n(/*! ./generation/configuration_utils.js */"./src/generation/configuration_utils.js"),c=n(/*! ./utils/tensor.js */"./src/utils/tensor.js"),p=n(/*! ./utils/maths.js */"./src/utils/maths.js"),h=n(/*! ./generation/stopping_criteria.js */"./src/generation/stopping_criteria.js"),m=n(/*! ./generation/logits_sampler.js */"./src/generation/logits_sampler.js"),f=n(/*! ./env.js */"./src/env.js"),g=n(/*! ./models/whisper/generation_whisper.js */"./src/models/whisper/generation_whisper.js"),_=n(/*! ./models/whisper/common_whisper.js */"./src/models/whisper/common_whisper.js");const w=0,y=1,b=2,v=3,x=4,M=5,T=6,k=7,$=new Map,S=new Map,C=new Map;async function E(e,t,n){return Object.fromEntries(await Promise.all(Object.keys(t).map((async s=>{const{buffer:o,session_options:u}=await async function(e,t,n){let s=n.device;s&&"string"!=typeof s&&(s.hasOwnProperty(t)?s=s[t]:(console.warn(`device not specified for "${t}". Using the default device.`),s=null));const o=s??(f.apis.IS_NODE_ENV?"cpu":"wasm"),u=(0,i.deviceToExecutionProviders)(o);let d=n.dtype;"string"!=typeof d&&(d&&d.hasOwnProperty(t)?d=d[t]:(d=a.DEFAULT_DEVICE_DTYPE_MAPPING[o]??a.DATA_TYPES.fp32,console.warn(`dtype not specified for "${t}". Using the default dtype (${d}) for this device (${o}).`)));const c=d;if(!a.DEFAULT_DTYPE_SUFFIX_MAPPING.hasOwnProperty(c))throw new Error(`Invalid dtype: ${c}. Should be one of: ${Object.keys(a.DATA_TYPES).join(", ")}`);if(c===a.DATA_TYPES.fp16&&"webgpu"===o&&!await(0,a.isWebGpuFp16Supported)())throw new Error(`The device (${o}) does not support fp16.`);const p=a.DEFAULT_DTYPE_SUFFIX_MAPPING[c],h=`${n.subfolder??""}/${t}${p}.onnx`,m={...n.session_options}??{};m.executionProviders??=u;const g=(0,l.getModelFile)(e,h,!0,n);let _=[];if(n.use_external_data_format&&(!0===n.use_external_data_format||"object"==typeof n.use_external_data_format&&n.use_external_data_format.hasOwnProperty(t)&&!0===n.use_external_data_format[t])){if(f.apis.IS_NODE_ENV)throw new Error("External data format is not yet supported in Node.js");const r=`${t}${p}.onnx_data`,i=`${n.subfolder??""}/${r}`;_.push(new Promise((async(t,a)=>{const s=await(0,l.getModelFile)(e,i,!0,n);t({path:r,data:s})})))}else void 0!==m.externalData&&(_=m.externalData.map((async t=>{if("string"==typeof t.data){const r=await(0,l.getModelFile)(e,t.data,!0,n);return{...t,data:r}}return t})));if(_.length>0&&(m.externalData=await Promise.all(_)),"webgpu"===o){const e=(0,r.getKeyValueShapes)(n.config,{prefix:"present"});if(Object.keys(e).length>0&&!(0,i.isONNXProxy)()){const t={};for(const n in e)t[n]="gpu-buffer";m.preferredOutputLocation=t}}return{buffer:await g,session_options:m}}(e,t[s],n);return[s,await(0,i.createInferenceSession)(o,u)]}))))}async function P(e,t){const n=function(e,t){const n=Object.create(null),r=[];for(const a of e.inputNames){const e=t[a];e instanceof c.Tensor?n[a]=(0,i.isONNXProxy)()?e.clone():e:r.push(a)}if(r.length>0)throw new Error(`An error occurred during model execution: "Missing the following inputs: ${r.join(", ")}.`);const a=Object.keys(t).length,s=e.inputNames.length;if(a>s){let n=Object.keys(t).filter((t=>!e.inputNames.includes(t)));console.warn(`WARNING: Too many inputs were provided (${a} > ${s}). The following inputs will be ignored: "${n.join(", ")}".`)}return n}(e,t);try{const t=Object.fromEntries(Object.entries(n).map((([e,t])=>[e,t.ort_tensor])));let r=await e.run(t);return r=A(r),r}catch(e){throw console.error(`An error occurred during model execution: "${e}".`),console.error("Inputs given to model:",n),e}}function A(e){for(let t in e)(0,i.isONNXTensor)(e[t])?e[t]=new c.Tensor(e[t]):"object"==typeof e[t]&&A(e[t]);return e}function F(e){if(e instanceof c.Tensor)return e;if(0===e.length)throw Error("items must be non-empty");if(Array.isArray(e[0])){if(e.some((t=>t.length!==e[0].length)))throw Error("Unable to create tensor, you should probably activate truncation and/or padding with 'padding=True' and/or 'truncation=True' to have batched tensors with the same length.");return new c.Tensor("int64",BigInt64Array.from(e.flat().map((e=>BigInt(e)))),[e.length,e[0].length])}return new c.Tensor("int64",BigInt64Array.from(e.map((e=>BigInt(e)))),[1,e.length])}function z(e){return new c.Tensor("bool",[e],[1])}async function I(e,t){let{encoder_outputs:n,input_ids:r,decoder_input_ids:i,...a}=t;if(!n){const r=(0,o.pick)(t,e.sessions.model.inputNames);n=(await O(e,r)).last_hidden_state}a.input_ids=i,a.encoder_hidden_states=n,e.sessions.decoder_model_merged.inputNames.includes("encoder_attention_mask")&&(a.encoder_attention_mask=t.attention_mask);return await B(e,a,!0)}async function O(e,t){const n=e.sessions.model,r=(0,o.pick)(t,n.inputNames);if(n.inputNames.includes("inputs_embeds")&&!r.inputs_embeds){if(!t.input_ids)throw new Error("Both `input_ids` and `inputs_embeds` are missing in the model inputs.");r.inputs_embeds=await e.encode_text({input_ids:t.input_ids})}return n.inputNames.includes("token_type_ids")&&!r.token_type_ids&&(r.token_type_ids=new c.Tensor("int64",new BigInt64Array(r.input_ids.data.length),r.input_ids.dims)),await P(n,r)}async function B(e,t,n=!1){const r=e.sessions[n?"decoder_model_merged":"model"],{past_key_values:i,...a}=t;r.inputNames.includes("use_cache_branch")&&(a.use_cache_branch=z(!!i)),r.inputNames.includes("position_ids")&&a.attention_mask&&!a.position_ids&&(a.position_ids=function(e,t=null){const{input_ids:n,inputs_embeds:r,attention_mask:i}=e,[a,s]=i.dims,o=new BigInt64Array(i.data.length);for(let e=0;e<a;++e){const t=e*s;let n=BigInt(0);for(let e=0;e<s;++e){const r=t+e;0n===i.data[r]?o[r]=BigInt(1):(o[r]=n,n+=i.data[r])}}let l=new c.Tensor("int64",o,i.dims);if(t){const e=-(n??r).dims.at(1);l=l.slice(null,[e,null])}return l}(a,i)),e.addPastKeyValues(a,i);const s=(0,o.pick)(a,r.inputNames);return await P(r,s)}async function L(e,{input_ids:t=null,attention_mask:n=null,pixel_values:r=null,position_ids:i=null,inputs_embeds:a=null,past_key_values:s=null,generation_config:o=null,logits_processor:l=null,...u}){if(!a)if(a=await e.encode_text({input_ids:t}),r&&1!==t.dims[1]){const i=await e.encode_image({pixel_values:r});({inputs_embeds:a,attention_mask:n}=e._merge_input_ids_with_image_features({image_features:i,inputs_embeds:a,input_ids:t,attention_mask:n}))}else if(s&&r&&1===t.dims[1]){const e=t.dims[1],r=Object.values(s)[0].dims.at(-2);n=(0,c.cat)([(0,c.ones)([t.dims[0],r]),n.slice(null,[n.dims[1]-e,n.dims[1]])],1)}return await B(e,{inputs_embeds:a,past_key_values:s,attention_mask:n,position_ids:i,generation_config:o,logits_processor:l},!0)}function D(e,t,n,r){if(n.past_key_values){const t=Object.values(n.past_key_values)[0].dims.at(-2),{input_ids:r,attention_mask:i}=n;if(i&&i.dims[1]>r.dims[1]);else if(t<r.dims[1])n.input_ids=r.slice(null,[t,null]);else if(null!=e.config.image_token_index&&r.data.some((t=>t==e.config.image_token_index))){const i=e.config.num_image_tokens;if(!i)throw new Error("`num_image_tokens` is missing in the model configuration.");const a=r.dims[1]-(t-i);n.input_ids=r.slice(null,[-a,null]),n.attention_mask=(0,c.ones)([1,t+a])}}return n}function R(e,t,n,r){return n.past_key_values&&(t=t.map((e=>[e.at(-1)]))),{...n,decoder_input_ids:F(t)}}function N(e,...t){return e.config.is_encoder_decoder?R(e,...t):D(e,...t)}class V extends s.Callable{main_input_name="input_ids";forward_params=["input_ids","attention_mask"];constructor(e,t){super(),this.config=e,this.sessions=t;const n=C.get(this.constructor),r=$.get(n);switch(this.can_generate=!1,this._forward=null,this._prepare_inputs_for_generation=null,r){case x:this.can_generate=!0,this._forward=B,this._prepare_inputs_for_generation=D;break;case b:case v:case k:this.can_generate=!0,this._forward=I,this._prepare_inputs_for_generation=R;break;case y:this._forward=I;break;case T:this.can_generate=!0,this._forward=L,this._prepare_inputs_for_generation=N;break;default:this._forward=O}this.can_generate&&this.forward_params.push("past_key_values"),this.custom_config=this.config["transformers.js_config"]??{}}async dispose(){const e=[];for(const t of Object.values(this.sessions))t?.handler?.dispose&&e.push(t.handler.dispose());return await Promise.all(e)}static async from_pretrained(e,{progress_callback:t=null,config:n=null,cache_dir:i=null,local_files_only:a=!1,revision:s="main",model_file_name:o=null,subfolder:u="onnx",device:d=null,dtype:c=null,use_external_data_format:p=null,session_options:h={}}={}){let m={progress_callback:t,config:n,cache_dir:i,local_files_only:a,revision:s,model_file_name:o,subfolder:u,device:d,dtype:c,use_external_data_format:p,session_options:h};const f=C.get(this),g=$.get(f);let _;if(n=m.config=await r.AutoConfig.from_pretrained(e,m),g===x)_=await Promise.all([E(e,{model:m.model_file_name??"model"},m),(0,l.getModelJSON)(e,"generation_config.json",!1,m)]);else if(g===b||g===v)_=await Promise.all([E(e,{model:"encoder_model",decoder_model_merged:"decoder_model_merged"},m),(0,l.getModelJSON)(e,"generation_config.json",!1,m)]);else if(g===M)_=await Promise.all([E(e,{model:"vision_encoder",prompt_encoder_mask_decoder:"prompt_encoder_mask_decoder"},m)]);else if(g===y)_=await Promise.all([E(e,{model:"encoder_model",decoder_model_merged:"decoder_model_merged"},m)]);else if(g===T){const t={embed_tokens:"embed_tokens",vision_encoder:"vision_encoder",decoder_model_merged:"decoder_model_merged"};n.is_encoder_decoder&&(t.model="encoder_model"),_=await Promise.all([E(e,t,m),(0,l.getModelJSON)(e,"generation_config.json",!1,m)])}else g===k?_=await Promise.all([E(e,{model:"text_encoder",decoder_model_merged:"decoder_model_merged",encodec_decode:"encodec_decode"},m),(0,l.getModelJSON)(e,"generation_config.json",!1,m)]):(g!==w&&console.warn(`Model type for '${f??n?.model_type}' not found, assuming encoder-only architecture. Please report this at https://github.com/xenova/transformers.js/issues/new/choose.`),_=await Promise.all([E(e,{model:m.model_file_name??"model"},m)]));return new this(n,..._)}async _call(e){return await this.forward(e)}async forward(e){return await this._forward(this,e)}_get_logits_warper(e){const t=new u.LogitsProcessorList;return null!==e.temperature&&1!==e.temperature&&t.push(new u.TemperatureLogitsWarper(e.temperature)),null!==e.top_k&&0!==e.top_k&&t.push(new u.TopKLogitsWarper(e.top_k)),null!==e.top_p&&e.top_p<1&&t.push(new u.TopPLogitsWarper(e.top_p)),t}_get_logits_processor(e,t,n=null){const r=new u.LogitsProcessorList;if(null!==e.repetition_penalty&&1!==e.repetition_penalty&&r.push(new u.RepetitionPenaltyLogitsProcessor(e.repetition_penalty)),null!==e.no_repeat_ngram_size&&e.no_repeat_ngram_size>0&&r.push(new u.NoRepeatNGramLogitsProcessor(e.no_repeat_ngram_size)),null!==e.bad_words_ids&&r.push(new u.NoBadWordsLogitsProcessor(e.bad_words_ids,e.eos_token_id)),null!==e.min_length&&null!==e.eos_token_id&&e.min_length>0&&r.push(new u.MinLengthLogitsProcessor(e.min_length,e.eos_token_id)),null!==e.min_new_tokens&&null!==e.eos_token_id&&e.min_new_tokens>0&&r.push(new u.MinNewTokensLengthLogitsProcessor(t,e.min_new_tokens,e.eos_token_id)),null!==e.forced_bos_token_id&&r.push(new u.ForcedBOSTokenLogitsProcessor(e.forced_bos_token_id)),null!==e.forced_eos_token_id&&r.push(new u.ForcedEOSTokenLogitsProcessor(e.max_length,e.forced_eos_token_id)),null!==e.begin_suppress_tokens){const n=t>1||null===e.forced_bos_token_id?t:t+1;r.push(new u.SuppressTokensAtBeginLogitsProcessor(e.begin_suppress_tokens,n))}return null!==e.guidance_scale&&e.guidance_scale>1&&r.push(new u.ClassifierFreeGuidanceLogitsProcessor(e.guidance_scale)),null!==n&&r.extend(n),r}_prepare_generation_config(e,t,n=d.GenerationConfig){const r={...this.config};for(const e of["decoder","generator","text_config"])e in r&&Object.assign(r,r[e]);const i=new n(r);return"generation_config"in this&&Object.assign(i,this.generation_config),e&&Object.assign(i,e),t&&Object.assign(i,(0,o.pick)(t,Object.getOwnPropertyNames(i))),i}_get_stopping_criteria(e,t=null){const n=new h.StoppingCriteriaList;return null!==e.max_length&&n.push(new h.MaxLengthCriteria(e.max_length,this.config.max_position_embeddings??null)),null!==e.eos_token_id&&n.push(new h.EosTokenCriteria(e.eos_token_id)),t&&n.extend(t),n}_validate_model_class(){if(!this.can_generate){const e=[Ns,Gs,Rs,Is],t=C.get(this.constructor),n=new Set,r=this.config.model_type;for(const t of e){const e=t.get(r);e&&n.add(e[0])}let i=`The current model class (${t}) is not compatible with \`.generate()\`, as it doesn't have a language model head.`;throw n.size>0&&(i+=` Please use the following class instead: ${[...n].join(", ")}`),Error(i)}}prepare_inputs_for_generation(...e){return this._prepare_inputs_for_generation(this,...e)}_update_model_kwargs_for_generation({generated_input_ids:e,outputs:t,model_inputs:n,is_encoder_decoder:r}){return n.past_key_values=this.getPastKeyValues(t,n.past_key_values),n.input_ids=new c.Tensor("int64",e.flat(),[e.length,1]),r||(n.attention_mask=(0,c.cat)([n.attention_mask,(0,c.ones)([n.attention_mask.dims[0],1])],1)),n.position_ids=null,n}_prepare_model_inputs({inputs:e,bos_token_id:t,model_kwargs:n}){const r=(0,o.pick)(n,this.forward_params),i=this.main_input_name;if(i in r){if(e)throw new Error("`inputs`: {inputs}` were passed alongside {input_name} which is not allowed. Make sure to either pass {inputs} or {input_name}=...")}else r[i]=e;return{inputs_tensor:r[i],model_inputs:r,model_input_name:i}}async _prepare_encoder_decoder_kwargs_for_generation({inputs_tensor:e,model_inputs:t,model_input_name:n,generation_config:r}){if(this.sessions.model.inputNames.includes("inputs_embeds")&&!t.inputs_embeds&&"_prepare_inputs_embeds"in this){const{input_ids:e,pixel_values:n,attention_mask:r,...i}=t,a=await this._prepare_inputs_embeds(t);t={...i,...(0,o.pick)(a,["inputs_embeds","attention_mask"])}}let{last_hidden_state:i}=await O(this,t);if(null!==r.guidance_scale&&r.guidance_scale>1)i=(0,c.cat)([i,(0,c.full_like)(i,0)],0),"attention_mask"in t&&(t.attention_mask=(0,c.cat)([t.attention_mask,(0,c.zeros_like)(t.attention_mask)],0));else if(t.decoder_input_ids){const e=F(t.decoder_input_ids).dims[0];if(e!==i.dims[0]){if(1!==i.dims[0])throw new Error(`The encoder outputs have a different batch size (${i.dims[0]}) than the decoder inputs (${e}).`);i=(0,c.cat)(Array.from({length:e},(()=>i)),0)}}return t.encoder_outputs=i,t}_prepare_decoder_input_ids_for_generation({batch_size:e,model_input_name:t,model_kwargs:n,decoder_start_token_id:r,bos_token_id:i,generation_config:a}){let{decoder_input_ids:s,...o}=n;if(s)Array.isArray(s[0])||(s=Array.from({length:e},(()=>s)));else if(r??=i,"musicgen"===this.config.model_type)s=Array.from({length:e*this.config.decoder.num_codebooks},(()=>[r]));else if(Array.isArray(r)){if(r.length!==e)throw new Error(`\`decoder_start_token_id\` expcted to have length ${e} but got ${r.length}`);s=r}else s=Array.from({length:e},(()=>[r]));return s=F(s),n.decoder_attention_mask=(0,c.ones_like)(s),{input_ids:s,model_inputs:o}}async generate({inputs:e=null,generation_config:t=null,logits_processor:n=null,stopping_criteria:r=null,streamer:i=null,...a}){this._validate_model_class(),t=this._prepare_generation_config(t,a);let{inputs_tensor:s,model_inputs:o,model_input_name:l}=this._prepare_model_inputs({inputs:e,model_kwargs:a});const u=this.config.is_encoder_decoder;let d;u&&("encoder_outputs"in o||(o=await this._prepare_encoder_decoder_kwargs_for_generation({inputs_tensor:s,model_inputs:o,model_input_name:l,generation_config:t}))),u?({input_ids:d,model_inputs:o}=this._prepare_decoder_input_ids_for_generation({batch_size:o[l].dims.at(0),model_input_name:l,model_kwargs:o,decoder_start_token_id:t.decoder_start_token_id,bos_token_id:t.bos_token_id,generation_config:t})):d=o[l];let p=d.dims.at(-1);null!==t.max_new_tokens&&(t.max_length=p+t.max_new_tokens);const h=this._get_logits_processor(t,p,n),f=this._get_stopping_criteria(t,r),g=o[l].dims.at(0),_=m.LogitsSampler.getSampler(t),w=new Array(g).fill(0),y=d.tolist();i&&i.put(y);let b=null,v={};for(;;){o=this.prepare_inputs_for_generation(y,o,t);const e=await this.forward(o);if(t.output_attentions&&t.return_dict_in_generate){const t=this.getAttentions(e);for(const e in t)e in v||(v[e]=[]),v[e].push(t[e])}const n=h(y,e.logits.slice(null,-1,null)),r=[];for(let e=0;e<n.dims.at(0);++e){const t=n[e],i=await _(t);for(const[t,n]of i){const i=BigInt(t);w[e]+=n,y[e].push(i),r.push([i]);break}}i&&i.put(r);if(f(y).every((e=>e))){t.return_dict_in_generate&&(b=this.getPastKeyValues(e,o.past_key_values,!1));break}o=this._update_model_kwargs_for_generation({generated_input_ids:r,outputs:e,model_inputs:o,is_encoder_decoder:u})}i&&i.end();const x=new c.Tensor("int64",y.flat(),[y.length,y[0].length]);return t.return_dict_in_generate?{sequences:x,past_key_values:b,...v}:x}getPastKeyValues(e,t,n=!0){const r=Object.create(null);for(const i in e)if(i.startsWith("present")){const a=i.replace("present","past_key_values");if(t&&i.includes("encoder"))r[a]=t[a];else{if(n&&t){const e=t[a];"gpu-buffer"===e.location&&e.dispose()}r[a]=e[i]}}return r}getAttentions(e){const t={};for(const n of["cross_attentions","encoder_attentions","decoder_attentions"])for(const r in e)r.startsWith(n)&&(n in t||(t[n]=[]),t[n].push(e[r]));return t}addPastKeyValues(e,t){if(t)Object.assign(e,t);else{const t=this.custom_config.kv_cache_dtype??"float32",n="float16"===t?new Uint16Array:[],i=(0,r.getKeyValueShapes)(this.config);for(const r in i)e[r]=new c.Tensor(t,n,i[r])}}async encode_image({pixel_values:e}){const t=(await P(this.sessions.vision_encoder,{pixel_values:e})).image_features;return this.config.num_image_tokens||(console.warn(`The number of image tokens was not set in the model configuration. Setting it to the number of features detected by the vision encoder (${t.dims[1]}).`),this.config.num_image_tokens=t.dims[1]),t}async encode_text({input_ids:e}){return(await P(this.sessions.embed_tokens,{input_ids:e})).inputs_embeds}}class j{}class G extends j{constructor({last_hidden_state:e,hidden_states:t=null,attentions:n=null}){super(),this.last_hidden_state=e,this.hidden_states=t,this.attentions=n}}class q extends V{}class U extends q{}class W extends q{async _call(e){return new Ro(await super._call(e))}}class H extends q{async _call(e){return new Bo(await super._call(e))}}class X extends q{async _call(e){return new Do(await super._call(e))}}class K extends q{async _call(e){return new No(await super._call(e))}}class Q extends V{}class Y extends Q{}class J extends V{}class Z extends J{}class ee extends J{async _call(e){return new Ro(await super._call(e))}}class te extends J{async _call(e){return new Bo(await super._call(e))}}class ne extends J{async _call(e){return new Do(await super._call(e))}}class re extends J{async _call(e){return new No(await super._call(e))}}class ie extends V{}class ae extends ie{}class se extends ie{async _call(e){return new Ro(await super._call(e))}}class oe extends ie{async _call(e){return new Bo(await super._call(e))}}class le extends ie{async _call(e){return new Do(await super._call(e))}}class ue extends ie{async _call(e){return new No(await super._call(e))}}class de extends V{}class ce extends de{}class pe extends de{async _call(e){return new Ro(await super._call(e))}}class he extends de{async _call(e){return new Bo(await super._call(e))}}class me extends de{async _call(e){return new Do(await super._call(e))}}class fe extends de{async _call(e){return new No(await super._call(e))}}class ge extends V{}class _e extends ge{}class we extends ge{async _call(e){return new Ro(await super._call(e))}}class ye extends ge{async _call(e){return new Bo(await super._call(e))}}class be extends ge{async _call(e){return new Do(await super._call(e))}}class ve extends ge{async _call(e){return new No(await super._call(e))}}class xe extends V{}class Me extends xe{}class Te extends xe{async _call(e){return new Ro(await super._call(e))}}class ke extends xe{async _call(e){return new Bo(await super._call(e))}}class $e extends xe{async _call(e){return new Do(await super._call(e))}}class Se extends xe{async _call(e){return new No(await super._call(e))}}class Ce extends V{}class Ee extends Ce{}class Pe extends Ce{async _call(e){return new Ro(await super._call(e))}}class Ae extends Ce{async _call(e){return new Bo(await super._call(e))}}class Fe extends Ce{async _call(e){return new Do(await super._call(e))}}class ze extends Ce{async _call(e){return new No(await super._call(e))}}class Ie extends V{}class Oe extends Ie{}class Be extends Ie{async _call(e){return new Bo(await super._call(e))}}class Le extends Ie{async _call(e){return new Do(await super._call(e))}}class De extends Ie{async _call(e){return new No(await super._call(e))}}class Re extends Ie{async _call(e){return new Ro(await super._call(e))}}class Ne extends V{}class Ve extends Ne{}class je extends Ne{async _call(e){return new Ro(await super._call(e))}}class Ge extends Ne{async _call(e){return new Bo(await super._call(e))}}class qe extends Ne{async _call(e){return new Do(await super._call(e))}}class Ue extends V{}class We extends Ue{}class He extends Ue{async _call(e){return new Ro(await super._call(e))}}class Xe extends Ue{async _call(e){return new Bo(await super._call(e))}}class Ke extends Ue{async _call(e){return new No(await super._call(e))}}class Qe extends V{}class Ye extends Qe{}class Je extends Qe{async _call(e){return new Ro(await super._call(e))}}class Ze extends Qe{async _call(e){return new Bo(await super._call(e))}}class et extends Qe{async _call(e){return new Do(await super._call(e))}}class tt extends Qe{async _call(e){return new No(await super._call(e))}}class nt extends V{}class rt extends nt{}class it extends nt{async _call(e){return new Ro(await super._call(e))}}class at extends nt{async _call(e){return new Bo(await super._call(e))}}class st extends nt{async _call(e){return new No(await super._call(e))}}class ot extends V{}class lt extends ot{}class ut extends ot{async _call(e){return new Bo(await super._call(e))}}class dt extends ot{async _call(e){return new No(await super._call(e))}}class ct extends ot{async _call(e){return new Ro(await super._call(e))}}class pt extends V{forward_params=["input_ids","attention_mask","encoder_outputs","decoder_input_ids","decoder_attention_mask","past_key_values"];constructor(e,t,n){super(e,t),this.generation_config=n}}class ht extends pt{}class mt extends pt{}class ft extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class gt extends ft{}class _t extends ft{}class wt extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class yt extends wt{}class bt extends wt{}class vt extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class xt extends vt{}class Mt extends vt{}class Tt extends vt{async _call(e){return new Bo(await super._call(e))}}class kt extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class $t extends kt{}class St extends kt{}class Ct extends kt{async _call(e){return new Bo(await super._call(e))}}class Et extends kt{}class Pt extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class At extends Pt{}class Ft extends Pt{}class zt extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class It extends zt{}class Ot extends zt{}class Bt extends V{}class Lt extends Bt{}class Dt extends Bt{async _call(e){return new Ro(await super._call(e))}}class Rt extends Bt{async _call(e){return new Bo(await super._call(e))}}class Nt extends Bt{async _call(e){return new Do(await super._call(e))}}class Vt extends Bt{async _call(e){return new No(await super._call(e))}}class jt extends V{}class Gt extends jt{}class qt extends jt{async _call(e){return new Ro(await super._call(e))}}class Ut extends jt{async _call(e){return new Bo(await super._call(e))}}class Wt extends jt{async _call(e){return new Do(await super._call(e))}}class Ht extends jt{async _call(e){return new No(await super._call(e))}}class Xt extends V{}class Kt extends Xt{}class Qt extends Xt{async _call(e){return new Ro(await super._call(e))}}class Yt extends Xt{async _call(e){return new Bo(await super._call(e))}}class Jt extends Xt{async _call(e){return new Do(await super._call(e))}}class Zt extends Xt{async _call(e){return new No(await super._call(e))}}class en extends V{}class tn extends en{}class nn extends en{}class rn extends V{requires_attention_mask=!1;main_input_name="input_features";forward_params=["input_features","attention_mask","decoder_input_ids","decoder_attention_mask","past_key_values"];constructor(e,t,n){super(e,t),this.generation_config=n}}class an extends rn{}class sn extends rn{_prepare_generation_config(e,t){return super._prepare_generation_config(e,t,g.WhisperGenerationConfig)}_retrieve_init_tokens(e){const t=[e.decoder_start_token_id];let n=e.language;const r=e.task;if(e.is_multilingual){n||(console.warn("No language specified - defaulting to English (en)."),n="en");const i=`<|${(0,_.whisper_language_to_code)(n)}|>`;t.push(e.lang_to_id[i]),t.push(e.task_to_id[r??"transcribe"])}else if(n||r)throw new Error("Cannot specify `task` or `language` for an English-only model. If the model is intended to be multilingual, pass `is_multilingual=true` to generate, or update the generation config.");return!e.return_timestamps&&e.no_timestamps_token_id&&t.at(-1)!==e.no_timestamps_token_id?t.push(e.no_timestamps_token_id):e.return_timestamps&&t.at(-1)===e.no_timestamps_token_id&&(console.warn("<|notimestamps|> prompt token is removed from generation_config since `return_timestamps` is set to `true`."),t.pop()),t.filter((e=>null!=e))}async generate({inputs:e=null,generation_config:t=null,logits_processor:n=null,stopping_criteria:r=null,...i}){t=this._prepare_generation_config(t,i);const a=i.decoder_input_ids??this._retrieve_init_tokens(t);if(t.return_timestamps&&(n??=new u.LogitsProcessorList,n.push(new u.WhisperTimeStampLogitsProcessor(t,a))),t.begin_suppress_tokens&&(n??=new u.LogitsProcessorList,n.push(new u.SuppressTokensAtBeginLogitsProcessor(t.begin_suppress_tokens,a.length))),t.return_token_timestamps){if(!t.alignment_heads)throw new Error("Model generation config has no `alignment_heads`, token-level timestamps not available. See https://gist.github.com/hollance/42e32852f24243b748ae6bc1f985b13a on how to add this property to the generation config.");"translate"===t.task&&console.warn("Token-level timestamps may not be reliable for task 'translate'."),t.output_attentions=!0,t.return_dict_in_generate=!0}const s=await super.generate({inputs:e,generation_config:t,logits_processor:n,decoder_input_ids:a,...i});return t.return_token_timestamps&&(s.token_timestamps=this._extract_token_timestamps(s,t.alignment_heads,t.num_frames)),s}_extract_token_timestamps(e,t,n=null,r=.02){if(!e.cross_attentions)throw new Error("Model outputs must contain cross attentions to extract timestamps. This is most likely because the model was not exported with `output_attentions=True`.");null==n&&console.warn("`num_frames` has not been set, meaning the entire audio will be analyzed. This may lead to inaccurate token-level timestamps for short audios (< 30 seconds).");let i=this.config.median_filter_width;void 0===i&&(console.warn("Model config has no `median_filter_width`, using default value of 7."),i=7);const a=e.cross_attentions,s=Array.from({length:this.config.decoder_layers},((e,t)=>(0,c.cat)(a.map((e=>e[t])),2))),l=(0,c.stack)(t.map((([e,t])=>{if(e>=s.length)throw new Error(`Layer index ${e} is out of bounds for cross attentions (length ${s.length}).`);return n?s[e].slice(null,t,null,[0,n]):s[e].slice(null,t)}))).transpose(1,0,2,3),[u,d]=(0,c.std_mean)(l,-2,0,!0),h=l.clone();for(let e=0;e<h.dims[0];++e){const t=h[e];for(let n=0;n<t.dims[0];++n){const r=t[n],a=u[e][n][0].data,s=d[e][n][0].data;for(let e=0;e<r.dims[0];++e){let t=r[e].data;for(let e=0;e<t.length;++e)t[e]=(t[e]-s[e])/a[e];t.set((0,p.medianFilter)(t,i))}}}const m=[(0,c.mean)(h,1)],f=e.sequences.dims,g=new c.Tensor("float32",new Float32Array(f[0]*f[1]),f);for(let e=0;e<f[0];++e){const t=m[e].neg().squeeze_(0),[n,i]=(0,p.dynamic_time_warping)(t.tolist()),a=Array.from({length:n.length-1},((e,t)=>n[t+1]-n[t])),s=(0,o.mergeArrays)([1],a).map((e=>!!e)),l=[];for(let e=0;e<s.length;++e)s[e]&&l.push(i[e]*r);g[e].data.set(l,1)}return g}}class on extends V{main_input_name="pixel_values";forward_params=["pixel_values","input_ids","encoder_hidden_states","past_key_values"];constructor(e,t,n){super(e,t),this.generation_config=n}}class ln extends V{forward_params=["input_ids","pixel_values","attention_mask","position_ids","past_key_values"];constructor(e,t,n){super(e,t),this.generation_config=n}}class un extends ln{_merge_input_ids_with_image_features({inputs_embeds:e,image_features:t,input_ids:n,attention_mask:r}){const i=this.config.image_token_index,a=n.tolist().map((e=>e.findIndex((e=>e==i)))),s=a.every((e=>-1===e)),o=a.every((e=>-1!==e));if(!s&&!o)throw new Error("Every input should contain either 0 or 1 image token.");if(s)return{inputs_embeds:e,attention_mask:r};const l=[],u=[];for(let n=0;n<a.length;++n){const i=a[n],s=e[n],o=t[n],d=r[n];l.push((0,c.cat)([s.slice([0,i]),o,s.slice([i+1,s.dims[0]])],0)),u.push((0,c.cat)([d.slice([0,i]),(0,c.ones)([o.dims[0]]),d.slice([i+1,d.dims[0]])],0))}return{inputs_embeds:(0,c.stack)(l,0),attention_mask:(0,c.stack)(u,0)}}}class dn extends un{}class cn extends V{forward_params=["input_ids","inputs_embeds","attention_mask","pixel_values","encoder_outputs","decoder_input_ids","decoder_inputs_embeds","decoder_attention_mask","past_key_values"];main_input_name="inputs_embeds";constructor(e,t,n){super(e,t),this.generation_config=n}}class pn extends cn{_merge_input_ids_with_image_features({inputs_embeds:e,image_features:t,input_ids:n,attention_mask:r}){return{inputs_embeds:(0,c.cat)([t,e],1),attention_mask:(0,c.cat)([(0,c.ones)(t.dims.slice(0,2)),r],1)}}async _prepare_inputs_embeds({input_ids:e,pixel_values:t,inputs_embeds:n,attention_mask:r}){if(!e&&!t)throw new Error("Either `input_ids` or `pixel_values` should be provided.");let i,a;return e&&(i=await this.encode_text({input_ids:e})),t&&(a=await this.encode_image({pixel_values:t})),i&&a?({inputs_embeds:n,attention_mask:r}=this._merge_input_ids_with_image_features({inputs_embeds:i,image_features:a,input_ids:e,attention_mask:r})):n=i||a,{inputs_embeds:n,attention_mask:r}}async forward({input_ids:e,pixel_values:t,attention_mask:n,decoder_input_ids:r,decoder_attention_mask:i,encoder_outputs:a,past_key_values:s,inputs_embeds:o,decoder_inputs_embeds:l}){if(o||({inputs_embeds:o,attention_mask:n}=await this._prepare_inputs_embeds({input_ids:e,pixel_values:t,inputs_embeds:o,attention_mask:n})),!a){let{last_hidden_state:e}=await O(this,{inputs_embeds:o,attention_mask:n});a=e}if(!l){if(!r)throw new Error("Either `decoder_input_ids` or `decoder_inputs_embeds` should be provided.");l=await this.encode_text({input_ids:r})}const u={inputs_embeds:l,attention_mask:i,encoder_attention_mask:n,encoder_hidden_states:a,past_key_values:s};return await B(this,u,!0)}}class hn extends V{}class mn extends hn{}class fn extends hn{static async from_pretrained(e,t={}){return t.model_file_name??="text_model",super.from_pretrained(e,t)}}class gn extends hn{static async from_pretrained(e,t={}){return t.model_file_name??="vision_model",super.from_pretrained(e,t)}}class _n extends V{}class wn extends _n{}class yn extends _n{static async from_pretrained(e,t={}){return t.model_file_name??="text_model",super.from_pretrained(e,t)}}class bn extends hn{static async from_pretrained(e,t={}){return t.model_file_name??="vision_model",super.from_pretrained(e,t)}}class vn extends V{}class xn extends vn{}class Mn extends V{}class Tn extends Mn{}class kn extends Mn{}class $n extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class Sn extends $n{}class Cn extends $n{}class En extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class Pn extends En{}class An extends En{}class Fn extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class zn extends Fn{}class In extends Fn{}class On extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class Bn extends On{}class Ln extends On{}class Dn extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class Rn extends Dn{}class Nn extends Dn{}class Vn extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class jn extends Vn{}class Gn extends Vn{}class qn extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class Un extends qn{}class Wn extends qn{}class Hn extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class Xn extends Hn{}class Kn extends Hn{}class Qn extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class Yn extends Qn{}class Jn extends Qn{}class Zn extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class er extends Zn{}class tr extends Zn{}class nr extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class rr extends nr{}class ir extends nr{}class ar extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class sr extends ar{}class or extends ar{}class lr extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class ur extends lr{}class dr extends lr{}class cr extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class pr extends cr{}class hr extends cr{}class mr extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class fr extends mr{}class gr extends mr{}class _r extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class wr extends _r{}class yr extends _r{}class br extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class vr extends br{}class xr extends br{}class Mr extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class Tr extends Mr{}class kr extends Mr{}class $r extends V{}class Sr extends $r{}class Cr extends $r{async _call(e){return new Bo(await super._call(e))}}class Er extends V{}class Pr extends Er{}class Ar extends Er{async _call(e){return new Bo(await super._call(e))}}class Fr extends V{}class zr extends Fr{async _call(e){return new Go(await super._call(e))}}class Ir extends V{}class Or extends Ir{}class Br extends Ir{async _call(e){return new Bo(await super._call(e))}}class Lr extends V{}class Dr extends Lr{}class Rr extends Lr{async _call(e){return new Bo(await super._call(e))}}class Nr extends V{}class Vr extends Nr{}class jr extends Nr{}class Gr extends V{}class qr extends Gr{}class Ur extends Gr{}class Wr extends V{}class Hr extends Wr{}class Xr extends Wr{async _call(e){return new Bo(await super._call(e))}}class Kr extends V{}class Qr extends Kr{}class Yr extends Kr{async _call(e){return new Zr(await super._call(e))}}class Jr extends Kr{async _call(e){return new ei(await super._call(e))}}class Zr extends j{constructor({logits:e,pred_boxes:t}){super(),this.logits=e,this.pred_boxes=t}}class ei extends j{constructor({logits:e,pred_boxes:t,pred_masks:n}){super(),this.logits=e,this.pred_boxes=t,this.pred_masks=n}}class ti extends V{}class ni extends ti{}class ri extends ti{async _call(e){return new ii(await super._call(e))}}class ii extends j{constructor({logits:e,pred_boxes:t}){super(),this.logits=e,this.pred_boxes=t}}class ai extends V{}class si extends ai{}class oi extends ai{async _call(e){return new li(await super._call(e))}}class li extends Zr{}class ui extends V{}class di extends ui{}class ci extends ui{async _call(e){return new Bo(await super._call(e))}}class pi extends V{}class hi extends pi{}class mi extends pi{async _call(e){return new Bo(await super._call(e))}}class fi extends V{}class gi extends fi{}class _i extends fi{async _call(e){return new Bo(await super._call(e))}}class wi extends V{}class yi extends wi{}class bi extends wi{}class vi extends V{}class xi extends vi{}class Mi extends vi{}class Ti extends V{}class ki extends Ti{}class $i extends V{}class Si extends $i{}class Ci extends $i{}class Ei extends $i{}class Pi extends V{}class Ai extends Pi{}class Fi extends Pi{}class zi extends V{}class Ii extends zi{}class Oi extends V{}class Bi extends Oi{}class Li extends Oi{async _call(e){return new Bo(await super._call(e))}}class Di extends V{}class Ri extends Di{}class Ni extends Di{async _call(e){return new Bo(await super._call(e))}}class Vi extends V{}class ji extends Vi{}class Gi extends Vi{async _call(e){return new Bo(await super._call(e))}}class qi extends V{}class Ui extends qi{}class Wi extends qi{async _call(e){return new Hi(await super._call(e))}}class Hi extends j{constructor({logits:e,pred_boxes:t}){super(),this.logits=e,this.pred_boxes=t}}class Xi extends V{}class Ki extends Xi{async get_image_embeddings({pixel_values:e}){return await O(this,{pixel_values:e})}async forward(e){if(e.image_embeddings&&e.image_positional_embeddings||(e={...e,...await this.get_image_embeddings(e)}),!e.input_labels&&e.input_points){const t=e.input_points.dims.slice(0,-1),n=t.reduce(((e,t)=>e*t),1);e.input_labels=new c.Tensor("int64",new BigInt64Array(n).fill(1n),t)}const t={image_embeddings:e.image_embeddings,image_positional_embeddings:e.image_positional_embeddings};return e.input_points&&(t.input_points=e.input_points),e.input_labels&&(t.input_labels=e.input_labels),e.input_boxes&&(t.input_boxes=e.input_boxes),await P(this.sessions.prompt_encoder_mask_decoder,t)}async _call(e){return new Qi(await super._call(e))}}class Qi extends j{constructor({iou_scores:e,pred_masks:t}){super(),this.iou_scores=e,this.pred_masks=t}}class Yi extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class Ji extends Yi{}class Zi extends Yi{}class ea extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class ta extends ea{}class na extends ea{}class ra extends V{}class ia extends ra{}class aa extends ra{async _call(e){return new Vo(await super._call(e))}}class sa extends ra{async _call(e){return new Bo(await super._call(e))}}class oa extends ra{async _call(e){return new Do(await super._call(e))}}class la extends V{}class ua extends la{}class da extends la{async _call(e){return new Do(await super._call(e))}}class ca extends V{}class pa extends ca{}class ha extends V{}class ma extends ha{}class fa extends ha{async _call(e){return new Vo(await super._call(e))}}class ga extends ha{async _call(e){return new Bo(await super._call(e))}}class _a extends V{}class wa extends _a{}class ya extends _a{async _call(e){return new Vo(await super._call(e))}}class ba extends _a{async _call(e){return new Bo(await super._call(e))}}class va extends _a{async _call(e){return new Do(await super._call(e))}}class xa extends V{}class Ma extends xa{}class Ta extends xa{async _call(e){return new Vo(await super._call(e))}}class ka extends xa{async _call(e){return new Bo(await super._call(e))}}class $a extends V{}class Sa extends ra{}class Ca extends ra{async _call(e){return new Vo(await super._call(e))}}class Ea extends ra{async _call(e){return new Bo(await super._call(e))}}class Pa extends V{}class Aa extends Pa{}class Fa extends Pa{async _call(e){return new Vo(await super._call(e))}}class za extends Pa{async _call(e){return new Bo(await super._call(e))}}class Ia extends Pa{async _call(e){return new Lo(await super._call(e))}}class Oa extends Pa{async _call(e){return new Do(await super._call(e))}}class Ba extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class La extends Ba{}class Da extends Ba{}class Ra extends Ba{async generate_speech(e,t,{threshold:n=.5,minlenratio:r=0,maxlenratio:i=20,vocoder:a=null}={}){const s={input_ids:e},{encoder_outputs:o,encoder_attention_mask:l}=await O(this,s),u=o.dims[1]/this.config.reduction_factor,d=Math.floor(u*i),p=Math.floor(u*r),h=this.config.num_mel_bins;let m=[],f=null,g=null,_=0;for(;;){++_;const e=z(!!g);let r;r=g?g.output_sequence_out:new c.Tensor("float32",new Float32Array(h),[1,1,h]);let i={use_cache_branch:e,output_sequence:r,encoder_attention_mask:l,speaker_embeddings:t,encoder_hidden_states:o};this.addPastKeyValues(i,f),g=await P(this.sessions.decoder_model_merged,i),f=this.getPastKeyValues(g,f);const{prob:a,spectrum:s}=g;if(m.push(s),_>=p&&(Array.from(a.data).filter((e=>e>=n)).length>0||_>=d))break}const w=(0,c.cat)(m),{waveform:y}=await P(a.sessions.model,{spectrogram:w});return{spectrogram:w,waveform:y}}}class Na extends V{main_input_name="spectrogram"}class Va extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class ja extends Va{}class Ga extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class qa extends Ga{}class Ua extends Ga{}class Wa extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class Ha extends Wa{}class Xa extends Wa{}class Ka extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class Qa extends Ka{}class Ya extends Ka{}class Ja extends V{}class Za extends Ja{}class es extends Ja{static async from_pretrained(e,t={}){return t.model_file_name??="text_model",super.from_pretrained(e,t)}}class ts extends Ja{static async from_pretrained(e,t={}){return t.model_file_name??="audio_model",super.from_pretrained(e,t)}}class ns extends V{}class rs extends ns{async _call(e){return new qo(await super._call(e))}}class is extends V{}class as extends is{}class ss extends is{}class os extends is{}class ls extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class us extends ls{}class ds extends ls{}class cs extends V{}class ps extends cs{}class hs extends cs{async _call(e){return new Bo(await super._call(e))}}class ms extends V{}class fs extends ms{}class gs extends ms{}class _s extends V{forward_params=["input_ids","attention_mask","encoder_outputs","decoder_input_ids","decoder_attention_mask","past_key_values"];constructor(e,t,n){super(e,t),this.generation_config=n}_apply_and_filter_by_delay_pattern_mask(e){const[t,n]=e.dims,r=this.config.decoder.num_codebooks,i=n-r;let a=0;for(let t=0;t<e.size;++t){if(e.data[t]===this.config.decoder.pad_token_id)continue;const s=t%n-Math.floor(t/n)%r;s>0&&s<=i&&(e.data[a++]=e.data[t])}const s=Math.floor(t/r),o=a/(s*r);return new c.Tensor(e.type,e.data.slice(0,a),[s,r,o])}prepare_inputs_for_generation(e,t,n){let r=structuredClone(e);for(let e=0;e<r.length;++e)for(let t=0;t<r[e].length;++t)e%this.config.decoder.num_codebooks>=t&&(r[e][t]=BigInt(this.config.decoder.pad_token_id));null!==n.guidance_scale&&n.guidance_scale>1&&(r=r.concat(r));return super.prepare_inputs_for_generation(r,t,n)}async generate(e){const t=await super.generate(e),n=this._apply_and_filter_by_delay_pattern_mask(t).unsqueeze_(0),{audio_values:r}=await P(this.sessions.encodec_decode,{audio_codes:n});return r}}class ws extends V{}class ys extends ws{}class bs extends ws{async _call(e){return new Bo(await super._call(e))}}class vs extends V{}class xs extends vs{}class Ms extends vs{async _call(e){return new Bo(await super._call(e))}}class Ts extends V{}class ks extends Ts{}class $s extends Ts{async _call(e){return new Bo(await super._call(e))}}class Ss extends V{}class Cs extends Ss{}class Es extends Ss{async _call(e){return new Bo(await super._call(e))}}class Ps{static MODEL_CLASS_MAPPINGS=null;static BASE_IF_FAIL=!1;static async from_pretrained(e,{progress_callback:t=null,config:n=null,cache_dir:i=null,local_files_only:a=!1,revision:s="main",model_file_name:o=null,subfolder:l="onnx",device:u=null,dtype:d=null,use_external_data_format:c=null,session_options:p={}}={}){let h={progress_callback:t,config:n,cache_dir:i,local_files_only:a,revision:s,model_file_name:o,subfolder:l,device:u,dtype:d,use_external_data_format:c,session_options:p};if(h.config=await r.AutoConfig.from_pretrained(e,h),!this.MODEL_CLASS_MAPPINGS)throw new Error("`MODEL_CLASS_MAPPINGS` not implemented for this type of `AutoClass`: "+this.name);for(let t of this.MODEL_CLASS_MAPPINGS){const n=t.get(h.config.model_type);if(n)return await n[1].from_pretrained(e,h)}if(this.BASE_IF_FAIL)return console.warn(`Unknown model class "${h.config.model_type}", attempting to construct from base class.`),await V.from_pretrained(e,h);throw Error(`Unsupported model type: ${h.config.model_type}`)}}const As=new Map([["bert",["BertModel",U]],["nomic_bert",["NomicBertModel",Y]],["roformer",["RoFormerModel",Z]],["electra",["ElectraModel",ce]],["esm",["EsmModel",Ve]],["convbert",["ConvBertModel",ae]],["camembert",["CamembertModel",_e]],["deberta",["DebertaModel",Me]],["deberta-v2",["DebertaV2Model",Ee]],["mpnet",["MPNetModel",Ye]],["albert",["AlbertModel",lt]],["distilbert",["DistilBertModel",Oe]],["roberta",["RobertaModel",Lt]],["xlm",["XLMModel",Gt]],["xlm-roberta",["XLMRobertaModel",Kt]],["clap",["ClapModel",Za]],["clip",["CLIPModel",mn]],["clipseg",["CLIPSegModel",Tn]],["chinese_clip",["ChineseCLIPModel",xn]],["siglip",["SiglipModel",wn]],["mobilebert",["MobileBertModel",We]],["squeezebert",["SqueezeBertModel",rt]],["wav2vec2",["Wav2Vec2Model",ia]],["wav2vec2-bert",["Wav2Vec2BertModel",Ma]],["unispeech",["UniSpeechModel",ma]],["unispeech-sat",["UniSpeechSatModel",wa]],["hubert",["HubertModel",Sa]],["wavlm",["WavLMModel",Aa]],["audio-spectrogram-transformer",["ASTModel",tn]],["vits",["VitsModel",rs]],["pyannote",["PyAnnoteModel",ua]],["wespeaker-resnet",["WeSpeakerResNetModel",pa]],["detr",["DetrModel",Qr]],["rt_detr",["RTDetrModel",ni]],["table-transformer",["TableTransformerModel",si]],["vit",["ViTModel",Sr]],["fastvit",["FastViTModel",Pr]],["mobilevit",["MobileViTModel",Or]],["mobilevitv2",["MobileViTV2Model",Dr]],["owlvit",["OwlViTModel",Vr]],["owlv2",["Owlv2Model",qr]],["beit",["BeitModel",Hr]],["deit",["DeiTModel",di]],["convnext",["ConvNextModel",Bi]],["convnextv2",["ConvNextV2Model",Ri]],["dinov2",["Dinov2Model",ji]],["resnet",["ResNetModel",hi]],["swin",["SwinModel",gi]],["swin2sr",["Swin2SRModel",yi]],["donut-swin",["DonutSwinModel",Ii]],["yolos",["YolosModel",Ui]],["dpt",["DPTModel",xi]],["glpn",["GLPNModel",Ai]],["hifigan",["SpeechT5HifiGan",Na]],["efficientnet",["EfficientNetModel",ps]],["mobilenet_v1",["MobileNetV1Model",ys]],["mobilenet_v2",["MobileNetV2Model",xs]],["mobilenet_v3",["MobileNetV3Model",ks]],["mobilenet_v4",["MobileNetV4Model",Cs]]]),Fs=new Map([["t5",["T5Model",ht]],["longt5",["LongT5Model",gt]],["mt5",["MT5Model",yt]],["bart",["BartModel",xt]],["mbart",["MBartModel",$t]],["marian",["MarianModel",Ji]],["whisper",["WhisperModel",an]],["m2m_100",["M2M100Model",ta]],["blenderbot",["BlenderbotModel",At]],["blenderbot-small",["BlenderbotSmallModel",It]]]),zs=new Map([["bloom",["BloomModel",wr]],["jais",["JAISModel",Pn]],["gpt2",["GPT2Model",Sn]],["gptj",["GPTJModel",Rn]],["gpt_bigcode",["GPTBigCodeModel",jn]],["gpt_neo",["GPTNeoModel",zn]],["gpt_neox",["GPTNeoXModel",Bn]],["codegen",["CodeGenModel",Un]],["llama",["LlamaModel",Xn]],["cohere",["CohereModel",Yn]],["gemma",["GemmaModel",er]],["gemma2",["Gemma2Model",rr]],["openelm",["OpenELMModel",sr]],["qwen2",["Qwen2Model",ur]],["phi",["PhiModel",pr]],["phi3",["Phi3Model",fr]],["mpt",["MptModel",vr]],["opt",["OPTModel",Tr]],["mistral",["MistralModel",qa]],["starcoder2",["Starcoder2Model",Ha]],["falcon",["FalconModel",Qa]],["stablelm",["StableLmModel",us]]]),Is=new Map([["speecht5",["SpeechT5ForSpeechToText",Da]],["whisper",["WhisperForConditionalGeneration",sn]]]),Os=new Map([["speecht5",["SpeechT5ForTextToSpeech",Ra]]]),Bs=new Map([["vits",["VitsModel",rs]],["musicgen",["MusicgenForConditionalGeneration",_s]]]),Ls=new Map([["bert",["BertForSequenceClassification",H]],["roformer",["RoFormerForSequenceClassification",te]],["electra",["ElectraForSequenceClassification",he]],["esm",["EsmForSequenceClassification",Ge]],["convbert",["ConvBertForSequenceClassification",oe]],["camembert",["CamembertForSequenceClassification",ye]],["deberta",["DebertaForSequenceClassification",ke]],["deberta-v2",["DebertaV2ForSequenceClassification",Ae]],["mpnet",["MPNetForSequenceClassification",Ze]],["albert",["AlbertForSequenceClassification",ut]],["distilbert",["DistilBertForSequenceClassification",Be]],["roberta",["RobertaForSequenceClassification",Rt]],["xlm",["XLMForSequenceClassification",Ut]],["xlm-roberta",["XLMRobertaForSequenceClassification",Yt]],["bart",["BartForSequenceClassification",Tt]],["mbart",["MBartForSequenceClassification",Ct]],["mobilebert",["MobileBertForSequenceClassification",Xe]],["squeezebert",["SqueezeBertForSequenceClassification",at]]]),Ds=new Map([["bert",["BertForTokenClassification",X]],["roformer",["RoFormerForTokenClassification",ne]],["electra",["ElectraForTokenClassification",me]],["esm",["EsmForTokenClassification",qe]],["convbert",["ConvBertForTokenClassification",le]],["camembert",["CamembertForTokenClassification",be]],["deberta",["DebertaForTokenClassification",$e]],["deberta-v2",["DebertaV2ForTokenClassification",Fe]],["mpnet",["MPNetForTokenClassification",et]],["distilbert",["DistilBertForTokenClassification",Le]],["roberta",["RobertaForTokenClassification",Nt]],["xlm",["XLMForTokenClassification",Wt]],["xlm-roberta",["XLMRobertaForTokenClassification",Jt]]]),Rs=new Map([["t5",["T5ForConditionalGeneration",mt]],["longt5",["LongT5ForConditionalGeneration",_t]],["mt5",["MT5ForConditionalGeneration",bt]],["bart",["BartForConditionalGeneration",Mt]],["mbart",["MBartForConditionalGeneration",St]],["marian",["MarianMTModel",Zi]],["m2m_100",["M2M100ForConditionalGeneration",na]],["blenderbot",["BlenderbotForConditionalGeneration",Ft]],["blenderbot-small",["BlenderbotSmallForConditionalGeneration",Ot]]]),Ns=new Map([["bloom",["BloomForCausalLM",yr]],["gpt2",["GPT2LMHeadModel",Cn]],["jais",["JAISLMHeadModel",An]],["gptj",["GPTJForCausalLM",Nn]],["gpt_bigcode",["GPTBigCodeForCausalLM",Gn]],["gpt_neo",["GPTNeoForCausalLM",In]],["gpt_neox",["GPTNeoXForCausalLM",Ln]],["codegen",["CodeGenForCausalLM",Wn]],["llama",["LlamaForCausalLM",Kn]],["cohere",["CohereForCausalLM",Jn]],["gemma",["GemmaForCausalLM",tr]],["gemma2",["Gemma2ForCausalLM",ir]],["openelm",["OpenELMForCausalLM",or]],["qwen2",["Qwen2ForCausalLM",dr]],["phi",["PhiForCausalLM",hr]],["phi3",["Phi3ForCausalLM",gr]],["mpt",["MptForCausalLM",xr]],["opt",["OPTForCausalLM",kr]],["mbart",["MBartForCausalLM",Et]],["mistral",["MistralForCausalLM",Ua]],["starcoder2",["Starcoder2ForCausalLM",Xa]],["falcon",["FalconForCausalLM",Ya]],["trocr",["TrOCRForCausalLM",ja]],["stablelm",["StableLmForCausalLM",ds]]]),Vs=new Map([["bert",["BertForMaskedLM",W]],["roformer",["RoFormerForMaskedLM",ee]],["electra",["ElectraForMaskedLM",pe]],["esm",["EsmForMaskedLM",je]],["convbert",["ConvBertForMaskedLM",se]],["camembert",["CamembertForMaskedLM",we]],["deberta",["DebertaForMaskedLM",Te]],["deberta-v2",["DebertaV2ForMaskedLM",Pe]],["mpnet",["MPNetForMaskedLM",Je]],["albert",["AlbertForMaskedLM",ct]],["distilbert",["DistilBertForMaskedLM",Re]],["roberta",["RobertaForMaskedLM",Dt]],["xlm",["XLMWithLMHeadModel",qt]],["xlm-roberta",["XLMRobertaForMaskedLM",Qt]],["mobilebert",["MobileBertForMaskedLM",He]],["squeezebert",["SqueezeBertForMaskedLM",it]]]),js=new Map([["bert",["BertForQuestionAnswering",K]],["roformer",["RoFormerForQuestionAnswering",re]],["electra",["ElectraForQuestionAnswering",fe]],["convbert",["ConvBertForQuestionAnswering",ue]],["camembert",["CamembertForQuestionAnswering",ve]],["deberta",["DebertaForQuestionAnswering",Se]],["deberta-v2",["DebertaV2ForQuestionAnswering",ze]],["mpnet",["MPNetForQuestionAnswering",tt]],["albert",["AlbertForQuestionAnswering",dt]],["distilbert",["DistilBertForQuestionAnswering",De]],["roberta",["RobertaForQuestionAnswering",Vt]],["xlm",["XLMForQuestionAnswering",Ht]],["xlm-roberta",["XLMRobertaForQuestionAnswering",Zt]],["mobilebert",["MobileBertForQuestionAnswering",Ke]],["squeezebert",["SqueezeBertForQuestionAnswering",st]]]),Gs=new Map([["vision-encoder-decoder",["VisionEncoderDecoderModel",on]]]),qs=new Map([["llava",["LlavaForConditionalGeneration",un]],["moondream1",["Moondream1ForConditionalGeneration",dn]],["florence2",["Florence2ForConditionalGeneration",pn]]]),Us=new Map([["vision-encoder-decoder",["VisionEncoderDecoderModel",on]]]),Ws=new Map([["vit",["ViTForImageClassification",Cr]],["fastvit",["FastViTForImageClassification",Ar]],["mobilevit",["MobileViTForImageClassification",Br]],["mobilevitv2",["MobileViTV2ForImageClassification",Rr]],["beit",["BeitForImageClassification",Xr]],["deit",["DeiTForImageClassification",ci]],["convnext",["ConvNextForImageClassification",Li]],["convnextv2",["ConvNextV2ForImageClassification",Ni]],["dinov2",["Dinov2ForImageClassification",Gi]],["resnet",["ResNetForImageClassification",mi]],["swin",["SwinForImageClassification",_i]],["segformer",["SegformerForImageClassification",ss]],["efficientnet",["EfficientNetForImageClassification",hs]],["mobilenet_v1",["MobileNetV1ForImageClassification",bs]],["mobilenet_v2",["MobileNetV2ForImageClassification",Ms]],["mobilenet_v3",["MobileNetV3ForImageClassification",$s]],["mobilenet_v4",["MobileNetV4ForImageClassification",Es]]]),Hs=new Map([["detr",["DetrForObjectDetection",Yr]],["rt_detr",["RTDetrForObjectDetection",ri]],["table-transformer",["TableTransformerForObjectDetection",oi]],["yolos",["YolosForObjectDetection",Wi]]]),Xs=new Map([["owlvit",["OwlViTForObjectDetection",jr]],["owlv2",["Owlv2ForObjectDetection",Ur]]]),Ks=new Map([["detr",["DetrForSegmentation",Jr]],["clipseg",["CLIPSegForImageSegmentation",kn]]]),Qs=new Map([["segformer",["SegformerForSemanticSegmentation",os]],["sapiens",["SapiensForSemanticSegmentation",Si]]]),Ys=new Map([["sam",["SamModel",Ki]]]),Js=new Map([["wav2vec2",["Wav2Vec2ForCTC",aa]],["wav2vec2-bert",["Wav2Vec2BertForCTC",Ta]],["unispeech",["UniSpeechForCTC",fa]],["unispeech-sat",["UniSpeechSatForCTC",ya]],["wavlm",["WavLMForCTC",Fa]],["hubert",["HubertForCTC",Ca]]]),Zs=new Map([["wav2vec2",["Wav2Vec2ForSequenceClassification",sa]],["wav2vec2-bert",["Wav2Vec2BertForSequenceClassification",ka]],["unispeech",["UniSpeechForSequenceClassification",ga]],["unispeech-sat",["UniSpeechSatForSequenceClassification",ba]],["wavlm",["WavLMForSequenceClassification",za]],["hubert",["HubertForSequenceClassification",Ea]],["audio-spectrogram-transformer",["ASTForAudioClassification",nn]]]),eo=new Map([["wavlm",["WavLMForXVector",Ia]]]),to=new Map([["unispeech-sat",["UniSpeechSatForAudioFrameClassification",va]],["wavlm",["WavLMForAudioFrameClassification",Oa]],["wav2vec2",["Wav2Vec2ForAudioFrameClassification",oa]],["pyannote",["PyAnnoteForAudioFrameClassification",da]]]),no=new Map([["vitmatte",["VitMatteForImageMatting",zr]]]),ro=new Map([["swin2sr",["Swin2SRForImageSuperResolution",bi]]]),io=new Map([["dpt",["DPTForDepthEstimation",Mi]],["depth_anything",["DepthAnythingForDepthEstimation",ki]],["glpn",["GLPNForDepthEstimation",Fi]],["sapiens",["SapiensForDepthEstimation",Ci]]]),ao=new Map([["clip",["CLIPVisionModelWithProjection",gn]],["siglip",["SiglipVisionModel",bn]]]),so=[[As,w],[Fs,y],[zs,x],[Ls,w],[Ds,w],[Rs,b],[Is,b],[Ns,x],[Vs,w],[js,w],[Gs,v],[qs,T],[Ws,w],[Ks,w],[Qs,w],[no,w],[ro,w],[io,w],[Hs,w],[Xs,w],[Ys,M],[Js,w],[Zs,w],[Os,b],[Bs,w],[eo,w],[to,w],[ao,w]];for(const[e,t]of so)for(const[n,r]of e.values())$.set(n,t),C.set(r,n),S.set(n,r);const oo=[["MusicgenForConditionalGeneration",_s,k],["CLIPTextModelWithProjection",fn,w],["SiglipTextModel",yn,w],["ClapTextModelWithProjection",es,w],["ClapAudioModelWithProjection",ts,w]];for(const[e,t,n]of oo)$.set(e,n),C.set(t,e),S.set(e,t);class lo extends Ps{static MODEL_CLASS_MAPPINGS=so.map((e=>e[0]));static BASE_IF_FAIL=!0}class uo extends Ps{static MODEL_CLASS_MAPPINGS=[Ls]}class co extends Ps{static MODEL_CLASS_MAPPINGS=[Ds]}class po extends Ps{static MODEL_CLASS_MAPPINGS=[Rs]}class ho extends Ps{static MODEL_CLASS_MAPPINGS=[Is]}class mo extends Ps{static MODEL_CLASS_MAPPINGS=[Os]}class fo extends Ps{static MODEL_CLASS_MAPPINGS=[Bs]}class go extends Ps{static MODEL_CLASS_MAPPINGS=[Ns]}class _o extends Ps{static MODEL_CLASS_MAPPINGS=[Vs]}class wo extends Ps{static MODEL_CLASS_MAPPINGS=[js]}class yo extends Ps{static MODEL_CLASS_MAPPINGS=[Gs]}class bo extends Ps{static MODEL_CLASS_MAPPINGS=[Ws]}class vo extends Ps{static MODEL_CLASS_MAPPINGS=[Ks]}class xo extends Ps{static MODEL_CLASS_MAPPINGS=[Qs]}class Mo extends Ps{static MODEL_CLASS_MAPPINGS=[Hs]}class To extends Ps{static MODEL_CLASS_MAPPINGS=[Xs]}class ko extends Ps{static MODEL_CLASS_MAPPINGS=[Ys]}class $o extends Ps{static MODEL_CLASS_MAPPINGS=[Js]}class So extends Ps{static MODEL_CLASS_MAPPINGS=[Zs]}class Co extends Ps{static MODEL_CLASS_MAPPINGS=[eo]}class Eo extends Ps{static MODEL_CLASS_MAPPINGS=[to]}class Po extends Ps{static MODEL_CLASS_MAPPINGS=[Us]}class Ao extends Ps{static MODEL_CLASS_MAPPINGS=[no]}class Fo extends Ps{static MODEL_CLASS_MAPPINGS=[ro]}class zo extends Ps{static MODEL_CLASS_MAPPINGS=[io]}class Io extends Ps{static MODEL_CLASS_MAPPINGS=[ao]}class Oo extends j{constructor({logits:e,past_key_values:t,encoder_outputs:n,decoder_attentions:r=null,cross_attentions:i=null}){super(),this.logits=e,this.past_key_values=t,this.encoder_outputs=n,this.decoder_attentions=r,this.cross_attentions=i}}class Bo extends j{constructor({logits:e}){super(),this.logits=e}}class Lo extends j{constructor({logits:e,embeddings:t}){super(),this.logits=e,this.embeddings=t}}class Do extends j{constructor({logits:e}){super(),this.logits=e}}class Ro extends j{constructor({logits:e}){super(),this.logits=e}}class No extends j{constructor({start_logits:e,end_logits:t}){super(),this.start_logits=e,this.end_logits=t}}class Vo extends j{constructor({logits:e}){super(),this.logits=e}}class jo extends j{constructor({logits:e,past_key_values:t}){super(),this.logits=e,this.past_key_values=t}}class Go extends j{constructor({alphas:e}){super(),this.alphas=e}}class qo extends j{constructor({waveform:e,spectrogram:t}){super(),this.waveform=e,this.spectrogram=t}}},"./src/models/whisper/common_whisper.js":
175
+ \***********************/(e,t,n)=>{n.r(t),n.d(t,{ASTForAudioClassification:()=>nn,ASTModel:()=>tn,ASTPreTrainedModel:()=>en,AlbertForMaskedLM:()=>ct,AlbertForQuestionAnswering:()=>dt,AlbertForSequenceClassification:()=>ut,AlbertModel:()=>lt,AlbertPreTrainedModel:()=>ot,AutoModel:()=>uo,AutoModelForAudioClassification:()=>Co,AutoModelForAudioFrameClassification:()=>Po,AutoModelForCTC:()=>So,AutoModelForCausalLM:()=>_o,AutoModelForDepthEstimation:()=>Io,AutoModelForDocumentQuestionAnswering:()=>Ao,AutoModelForImageClassification:()=>vo,AutoModelForImageFeatureExtraction:()=>Bo,AutoModelForImageMatting:()=>Fo,AutoModelForImageSegmentation:()=>xo,AutoModelForImageToImage:()=>zo,AutoModelForMaskGeneration:()=>$o,AutoModelForMaskedLM:()=>wo,AutoModelForNormalEstimation:()=>Oo,AutoModelForObjectDetection:()=>To,AutoModelForQuestionAnswering:()=>yo,AutoModelForSemanticSegmentation:()=>Mo,AutoModelForSeq2SeqLM:()=>ho,AutoModelForSequenceClassification:()=>co,AutoModelForSpeechSeq2Seq:()=>mo,AutoModelForTextToSpectrogram:()=>fo,AutoModelForTextToWaveform:()=>go,AutoModelForTokenClassification:()=>po,AutoModelForVision2Seq:()=>bo,AutoModelForXVector:()=>Eo,AutoModelForZeroShotObjectDetection:()=>ko,BartForConditionalGeneration:()=>Mt,BartForSequenceClassification:()=>Tt,BartModel:()=>xt,BartPretrainedModel:()=>vt,BaseModelOutput:()=>G,BeitForImageClassification:()=>Xr,BeitModel:()=>Hr,BeitPreTrainedModel:()=>Wr,BertForMaskedLM:()=>W,BertForQuestionAnswering:()=>K,BertForSequenceClassification:()=>H,BertForTokenClassification:()=>X,BertModel:()=>U,BertPreTrainedModel:()=>q,BlenderbotForConditionalGeneration:()=>Ft,BlenderbotModel:()=>At,BlenderbotPreTrainedModel:()=>Pt,BlenderbotSmallForConditionalGeneration:()=>Ot,BlenderbotSmallModel:()=>It,BlenderbotSmallPreTrainedModel:()=>zt,BloomForCausalLM:()=>yr,BloomModel:()=>wr,BloomPreTrainedModel:()=>_r,CLIPModel:()=>mn,CLIPPreTrainedModel:()=>hn,CLIPSegForImageSegmentation:()=>kn,CLIPSegModel:()=>Tn,CLIPSegPreTrainedModel:()=>Mn,CLIPTextModelWithProjection:()=>fn,CLIPVisionModelWithProjection:()=>gn,CamembertForMaskedLM:()=>we,CamembertForQuestionAnswering:()=>ve,CamembertForSequenceClassification:()=>ye,CamembertForTokenClassification:()=>be,CamembertModel:()=>_e,CamembertPreTrainedModel:()=>ge,CausalLMOutput:()=>Go,CausalLMOutputWithPast:()=>qo,ChineseCLIPModel:()=>xn,ChineseCLIPPreTrainedModel:()=>vn,ClapAudioModelWithProjection:()=>ts,ClapModel:()=>Za,ClapPreTrainedModel:()=>Ja,ClapTextModelWithProjection:()=>es,CodeGenForCausalLM:()=>Wn,CodeGenModel:()=>Un,CodeGenPreTrainedModel:()=>qn,CohereForCausalLM:()=>Jn,CohereModel:()=>Yn,CoherePreTrainedModel:()=>Qn,ConvBertForMaskedLM:()=>se,ConvBertForQuestionAnswering:()=>ue,ConvBertForSequenceClassification:()=>oe,ConvBertForTokenClassification:()=>le,ConvBertModel:()=>ae,ConvBertPreTrainedModel:()=>ie,ConvNextForImageClassification:()=>Li,ConvNextModel:()=>Bi,ConvNextPreTrainedModel:()=>Oi,ConvNextV2ForImageClassification:()=>Ni,ConvNextV2Model:()=>Ri,ConvNextV2PreTrainedModel:()=>Di,DPTForDepthEstimation:()=>Mi,DPTModel:()=>xi,DPTPreTrainedModel:()=>vi,DebertaForMaskedLM:()=>Te,DebertaForQuestionAnswering:()=>Se,DebertaForSequenceClassification:()=>ke,DebertaForTokenClassification:()=>$e,DebertaModel:()=>Me,DebertaPreTrainedModel:()=>xe,DebertaV2ForMaskedLM:()=>Pe,DebertaV2ForQuestionAnswering:()=>ze,DebertaV2ForSequenceClassification:()=>Ae,DebertaV2ForTokenClassification:()=>Fe,DebertaV2Model:()=>Ee,DebertaV2PreTrainedModel:()=>Ce,DeiTForImageClassification:()=>ci,DeiTModel:()=>di,DeiTPreTrainedModel:()=>ui,DepthAnythingForDepthEstimation:()=>ki,DepthAnythingPreTrainedModel:()=>Ti,DetrForObjectDetection:()=>Yr,DetrForSegmentation:()=>Jr,DetrModel:()=>Qr,DetrObjectDetectionOutput:()=>Zr,DetrPreTrainedModel:()=>Kr,DetrSegmentationOutput:()=>ei,Dinov2ForImageClassification:()=>Gi,Dinov2Model:()=>ji,Dinov2PreTrainedModel:()=>Vi,DistilBertForMaskedLM:()=>Re,DistilBertForQuestionAnswering:()=>De,DistilBertForSequenceClassification:()=>Be,DistilBertForTokenClassification:()=>Le,DistilBertModel:()=>Oe,DistilBertPreTrainedModel:()=>Ie,DonutSwinModel:()=>Ii,DonutSwinPreTrainedModel:()=>zi,EfficientNetForImageClassification:()=>hs,EfficientNetModel:()=>ps,EfficientNetPreTrainedModel:()=>cs,ElectraForMaskedLM:()=>pe,ElectraForQuestionAnswering:()=>fe,ElectraForSequenceClassification:()=>he,ElectraForTokenClassification:()=>me,ElectraModel:()=>ce,ElectraPreTrainedModel:()=>de,EsmForMaskedLM:()=>je,EsmForSequenceClassification:()=>Ge,EsmForTokenClassification:()=>qe,EsmModel:()=>Ve,EsmPreTrainedModel:()=>Ne,FalconForCausalLM:()=>Ya,FalconModel:()=>Qa,FalconPreTrainedModel:()=>Ka,FastViTForImageClassification:()=>Ar,FastViTModel:()=>Pr,FastViTPreTrainedModel:()=>Er,Florence2ForConditionalGeneration:()=>pn,Florence2PreTrainedModel:()=>cn,GLPNForDepthEstimation:()=>Fi,GLPNModel:()=>Ai,GLPNPreTrainedModel:()=>Pi,GPT2LMHeadModel:()=>Cn,GPT2Model:()=>Sn,GPT2PreTrainedModel:()=>$n,GPTBigCodeForCausalLM:()=>Gn,GPTBigCodeModel:()=>jn,GPTBigCodePreTrainedModel:()=>Vn,GPTJForCausalLM:()=>Nn,GPTJModel:()=>Rn,GPTJPreTrainedModel:()=>Dn,GPTNeoForCausalLM:()=>In,GPTNeoModel:()=>zn,GPTNeoPreTrainedModel:()=>Fn,GPTNeoXForCausalLM:()=>Ln,GPTNeoXModel:()=>Bn,GPTNeoXPreTrainedModel:()=>On,Gemma2ForCausalLM:()=>ir,Gemma2Model:()=>rr,Gemma2PreTrainedModel:()=>nr,GemmaForCausalLM:()=>tr,GemmaModel:()=>er,GemmaPreTrainedModel:()=>Zn,HubertForCTC:()=>Ca,HubertForSequenceClassification:()=>Ea,HubertModel:()=>Sa,HubertPreTrainedModel:()=>$a,ImageMattingOutput:()=>Uo,JAISLMHeadModel:()=>An,JAISModel:()=>Pn,JAISPreTrainedModel:()=>En,LlamaForCausalLM:()=>Kn,LlamaModel:()=>Xn,LlamaPreTrainedModel:()=>Hn,LlavaForConditionalGeneration:()=>un,LlavaPreTrainedModel:()=>ln,LongT5ForConditionalGeneration:()=>_t,LongT5Model:()=>gt,LongT5PreTrainedModel:()=>ft,M2M100ForConditionalGeneration:()=>na,M2M100Model:()=>ta,M2M100PreTrainedModel:()=>ea,MBartForCausalLM:()=>Et,MBartForConditionalGeneration:()=>St,MBartForSequenceClassification:()=>Ct,MBartModel:()=>$t,MBartPreTrainedModel:()=>kt,MPNetForMaskedLM:()=>Je,MPNetForQuestionAnswering:()=>tt,MPNetForSequenceClassification:()=>Ze,MPNetForTokenClassification:()=>et,MPNetModel:()=>Ye,MPNetPreTrainedModel:()=>Qe,MT5ForConditionalGeneration:()=>bt,MT5Model:()=>yt,MT5PreTrainedModel:()=>wt,MarianMTModel:()=>Zi,MarianModel:()=>Ji,MarianPreTrainedModel:()=>Yi,MaskedLMOutput:()=>Vo,MistralForCausalLM:()=>Ua,MistralModel:()=>qa,MistralPreTrainedModel:()=>Ga,MobileBertForMaskedLM:()=>He,MobileBertForQuestionAnswering:()=>Ke,MobileBertForSequenceClassification:()=>Xe,MobileBertModel:()=>We,MobileBertPreTrainedModel:()=>Ue,MobileNetV1ForImageClassification:()=>bs,MobileNetV1Model:()=>ys,MobileNetV1PreTrainedModel:()=>ws,MobileNetV2ForImageClassification:()=>Ms,MobileNetV2Model:()=>xs,MobileNetV2PreTrainedModel:()=>vs,MobileNetV3ForImageClassification:()=>$s,MobileNetV3Model:()=>ks,MobileNetV3PreTrainedModel:()=>Ts,MobileNetV4ForImageClassification:()=>Es,MobileNetV4Model:()=>Cs,MobileNetV4PreTrainedModel:()=>Ss,MobileViTForImageClassification:()=>Br,MobileViTModel:()=>Or,MobileViTPreTrainedModel:()=>Ir,MobileViTV2ForImageClassification:()=>Rr,MobileViTV2Model:()=>Dr,MobileViTV2PreTrainedModel:()=>Lr,ModelOutput:()=>j,Moondream1ForConditionalGeneration:()=>dn,MptForCausalLM:()=>xr,MptModel:()=>vr,MptPreTrainedModel:()=>br,MusicgenForCausalLM:()=>gs,MusicgenForConditionalGeneration:()=>_s,MusicgenModel:()=>fs,MusicgenPreTrainedModel:()=>ms,NomicBertModel:()=>Y,NomicBertPreTrainedModel:()=>Q,OPTForCausalLM:()=>kr,OPTModel:()=>Tr,OPTPreTrainedModel:()=>Mr,OpenELMForCausalLM:()=>or,OpenELMModel:()=>sr,OpenELMPreTrainedModel:()=>ar,OwlViTForObjectDetection:()=>jr,OwlViTModel:()=>Vr,OwlViTPreTrainedModel:()=>Nr,Owlv2ForObjectDetection:()=>Ur,Owlv2Model:()=>qr,Owlv2PreTrainedModel:()=>Gr,Phi3ForCausalLM:()=>gr,Phi3Model:()=>fr,Phi3PreTrainedModel:()=>mr,PhiForCausalLM:()=>hr,PhiModel:()=>pr,PhiPreTrainedModel:()=>cr,PreTrainedModel:()=>V,PretrainedMixin:()=>Ps,PyAnnoteForAudioFrameClassification:()=>da,PyAnnoteModel:()=>ua,PyAnnotePreTrainedModel:()=>la,QuestionAnsweringModelOutput:()=>jo,Qwen2ForCausalLM:()=>dr,Qwen2Model:()=>ur,Qwen2PreTrainedModel:()=>lr,RTDetrForObjectDetection:()=>ri,RTDetrModel:()=>ni,RTDetrObjectDetectionOutput:()=>ii,RTDetrPreTrainedModel:()=>ti,ResNetForImageClassification:()=>mi,ResNetModel:()=>hi,ResNetPreTrainedModel:()=>pi,RoFormerForMaskedLM:()=>ee,RoFormerForQuestionAnswering:()=>re,RoFormerForSequenceClassification:()=>te,RoFormerForTokenClassification:()=>ne,RoFormerModel:()=>Z,RoFormerPreTrainedModel:()=>J,RobertaForMaskedLM:()=>Dt,RobertaForQuestionAnswering:()=>Vt,RobertaForSequenceClassification:()=>Rt,RobertaForTokenClassification:()=>Nt,RobertaModel:()=>Lt,RobertaPreTrainedModel:()=>Bt,SamImageSegmentationOutput:()=>Qi,SamModel:()=>Ki,SamPreTrainedModel:()=>Xi,SapiensForDepthEstimation:()=>Ci,SapiensForNormalEstimation:()=>Ei,SapiensForSemanticSegmentation:()=>Si,SapiensPreTrainedModel:()=>$i,SegformerForImageClassification:()=>ss,SegformerForSemanticSegmentation:()=>os,SegformerModel:()=>as,SegformerPreTrainedModel:()=>is,Seq2SeqLMOutput:()=>Lo,SequenceClassifierOutput:()=>Do,SiglipModel:()=>wn,SiglipPreTrainedModel:()=>_n,SiglipTextModel:()=>yn,SiglipVisionModel:()=>bn,SpeechT5ForSpeechToText:()=>Da,SpeechT5ForTextToSpeech:()=>Ra,SpeechT5HifiGan:()=>Na,SpeechT5Model:()=>La,SpeechT5PreTrainedModel:()=>Ba,SqueezeBertForMaskedLM:()=>it,SqueezeBertForQuestionAnswering:()=>st,SqueezeBertForSequenceClassification:()=>at,SqueezeBertModel:()=>rt,SqueezeBertPreTrainedModel:()=>nt,StableLmForCausalLM:()=>ds,StableLmModel:()=>us,StableLmPreTrainedModel:()=>ls,Starcoder2ForCausalLM:()=>Xa,Starcoder2Model:()=>Ha,Starcoder2PreTrainedModel:()=>Wa,Swin2SRForImageSuperResolution:()=>bi,Swin2SRModel:()=>yi,Swin2SRPreTrainedModel:()=>wi,SwinForImageClassification:()=>_i,SwinModel:()=>gi,SwinPreTrainedModel:()=>fi,T5ForConditionalGeneration:()=>mt,T5Model:()=>ht,T5PreTrainedModel:()=>pt,TableTransformerForObjectDetection:()=>oi,TableTransformerModel:()=>si,TableTransformerObjectDetectionOutput:()=>li,TableTransformerPreTrainedModel:()=>ai,TokenClassifierOutput:()=>No,TrOCRForCausalLM:()=>ja,TrOCRPreTrainedModel:()=>Va,UniSpeechForCTC:()=>fa,UniSpeechForSequenceClassification:()=>ga,UniSpeechModel:()=>ma,UniSpeechPreTrainedModel:()=>ha,UniSpeechSatForAudioFrameClassification:()=>va,UniSpeechSatForCTC:()=>ya,UniSpeechSatForSequenceClassification:()=>ba,UniSpeechSatModel:()=>wa,UniSpeechSatPreTrainedModel:()=>_a,ViTForImageClassification:()=>Cr,ViTModel:()=>Sr,ViTPreTrainedModel:()=>$r,VisionEncoderDecoderModel:()=>on,VitMatteForImageMatting:()=>zr,VitMattePreTrainedModel:()=>Fr,VitsModel:()=>rs,VitsModelOutput:()=>Wo,VitsPreTrainedModel:()=>ns,Wav2Vec2BertForCTC:()=>Ta,Wav2Vec2BertForSequenceClassification:()=>ka,Wav2Vec2BertModel:()=>Ma,Wav2Vec2BertPreTrainedModel:()=>xa,Wav2Vec2ForAudioFrameClassification:()=>oa,Wav2Vec2ForCTC:()=>aa,Wav2Vec2ForSequenceClassification:()=>sa,Wav2Vec2Model:()=>ia,Wav2Vec2PreTrainedModel:()=>ra,WavLMForAudioFrameClassification:()=>Oa,WavLMForCTC:()=>Fa,WavLMForSequenceClassification:()=>za,WavLMForXVector:()=>Ia,WavLMModel:()=>Aa,WavLMPreTrainedModel:()=>Pa,WeSpeakerResNetModel:()=>pa,WeSpeakerResNetPreTrainedModel:()=>ca,WhisperForConditionalGeneration:()=>sn,WhisperModel:()=>an,WhisperPreTrainedModel:()=>rn,XLMForQuestionAnswering:()=>Ht,XLMForSequenceClassification:()=>Ut,XLMForTokenClassification:()=>Wt,XLMModel:()=>Gt,XLMPreTrainedModel:()=>jt,XLMRobertaForMaskedLM:()=>Qt,XLMRobertaForQuestionAnswering:()=>Zt,XLMRobertaForSequenceClassification:()=>Yt,XLMRobertaForTokenClassification:()=>Jt,XLMRobertaModel:()=>Kt,XLMRobertaPreTrainedModel:()=>Xt,XLMWithLMHeadModel:()=>qt,XVectorOutput:()=>Ro,YolosForObjectDetection:()=>Wi,YolosModel:()=>Ui,YolosObjectDetectionOutput:()=>Hi,YolosPreTrainedModel:()=>qi});var r=n(/*! ./configs.js */"./src/configs.js"),i=n(/*! ./backends/onnx.js */"./src/backends/onnx.js"),a=n(/*! ./utils/dtypes.js */"./src/utils/dtypes.js"),s=n(/*! ./utils/generic.js */"./src/utils/generic.js"),o=n(/*! ./utils/core.js */"./src/utils/core.js"),l=n(/*! ./utils/hub.js */"./src/utils/hub.js"),u=n(/*! ./generation/logits_process.js */"./src/generation/logits_process.js"),d=n(/*! ./generation/configuration_utils.js */"./src/generation/configuration_utils.js"),c=n(/*! ./utils/tensor.js */"./src/utils/tensor.js"),p=n(/*! ./utils/maths.js */"./src/utils/maths.js"),h=n(/*! ./generation/stopping_criteria.js */"./src/generation/stopping_criteria.js"),m=n(/*! ./generation/logits_sampler.js */"./src/generation/logits_sampler.js"),f=n(/*! ./env.js */"./src/env.js"),g=n(/*! ./models/whisper/generation_whisper.js */"./src/models/whisper/generation_whisper.js"),_=n(/*! ./models/whisper/common_whisper.js */"./src/models/whisper/common_whisper.js");const w=0,y=1,b=2,v=3,x=4,M=5,T=6,k=7,$=new Map,S=new Map,C=new Map;async function E(e,t,n){return Object.fromEntries(await Promise.all(Object.keys(t).map((async s=>{const{buffer:o,session_options:u}=await async function(e,t,n){let s=n.device;s&&"string"!=typeof s&&(s.hasOwnProperty(t)?s=s[t]:(console.warn(`device not specified for "${t}". Using the default device.`),s=null));const o=s??(f.apis.IS_NODE_ENV?"cpu":"wasm"),u=(0,i.deviceToExecutionProviders)(o);let d=n.dtype;"string"!=typeof d&&(d&&d.hasOwnProperty(t)?d=d[t]:(d=a.DEFAULT_DEVICE_DTYPE_MAPPING[o]??a.DATA_TYPES.fp32,console.warn(`dtype not specified for "${t}". Using the default dtype (${d}) for this device (${o}).`)));const c=d;if(!a.DEFAULT_DTYPE_SUFFIX_MAPPING.hasOwnProperty(c))throw new Error(`Invalid dtype: ${c}. Should be one of: ${Object.keys(a.DATA_TYPES).join(", ")}`);if(c===a.DATA_TYPES.fp16&&"webgpu"===o&&!await(0,a.isWebGpuFp16Supported)())throw new Error(`The device (${o}) does not support fp16.`);const p=a.DEFAULT_DTYPE_SUFFIX_MAPPING[c],h=`${n.subfolder??""}/${t}${p}.onnx`,m={...n.session_options}??{};m.executionProviders??=u;const g=(0,l.getModelFile)(e,h,!0,n);let _=[];if(n.use_external_data_format&&(!0===n.use_external_data_format||"object"==typeof n.use_external_data_format&&n.use_external_data_format.hasOwnProperty(t)&&!0===n.use_external_data_format[t])){if(f.apis.IS_NODE_ENV)throw new Error("External data format is not yet supported in Node.js");const r=`${t}${p}.onnx_data`,i=`${n.subfolder??""}/${r}`;_.push(new Promise((async(t,a)=>{const s=await(0,l.getModelFile)(e,i,!0,n);t({path:r,data:s})})))}else void 0!==m.externalData&&(_=m.externalData.map((async t=>{if("string"==typeof t.data){const r=await(0,l.getModelFile)(e,t.data,!0,n);return{...t,data:r}}return t})));if(_.length>0&&(m.externalData=await Promise.all(_)),"webgpu"===o){const e=(0,r.getKeyValueShapes)(n.config,{prefix:"present"});if(Object.keys(e).length>0&&!(0,i.isONNXProxy)()){const t={};for(const n in e)t[n]="gpu-buffer";m.preferredOutputLocation=t}}return{buffer:await g,session_options:m}}(e,t[s],n);return[s,await(0,i.createInferenceSession)(o,u)]}))))}async function P(e,t){const n=function(e,t){const n=Object.create(null),r=[];for(const a of e.inputNames){const e=t[a];e instanceof c.Tensor?n[a]=(0,i.isONNXProxy)()?e.clone():e:r.push(a)}if(r.length>0)throw new Error(`An error occurred during model execution: "Missing the following inputs: ${r.join(", ")}.`);const a=Object.keys(t).length,s=e.inputNames.length;if(a>s){let n=Object.keys(t).filter((t=>!e.inputNames.includes(t)));console.warn(`WARNING: Too many inputs were provided (${a} > ${s}). The following inputs will be ignored: "${n.join(", ")}".`)}return n}(e,t);try{const t=Object.fromEntries(Object.entries(n).map((([e,t])=>[e,t.ort_tensor])));let r=await e.run(t);return r=A(r),r}catch(e){throw console.error(`An error occurred during model execution: "${e}".`),console.error("Inputs given to model:",n),e}}function A(e){for(let t in e)(0,i.isONNXTensor)(e[t])?e[t]=new c.Tensor(e[t]):"object"==typeof e[t]&&A(e[t]);return e}function F(e){if(e instanceof c.Tensor)return e;if(0===e.length)throw Error("items must be non-empty");if(Array.isArray(e[0])){if(e.some((t=>t.length!==e[0].length)))throw Error("Unable to create tensor, you should probably activate truncation and/or padding with 'padding=True' and/or 'truncation=True' to have batched tensors with the same length.");return new c.Tensor("int64",BigInt64Array.from(e.flat().map((e=>BigInt(e)))),[e.length,e[0].length])}return new c.Tensor("int64",BigInt64Array.from(e.map((e=>BigInt(e)))),[1,e.length])}function z(e){return new c.Tensor("bool",[e],[1])}async function I(e,t){let{encoder_outputs:n,input_ids:r,decoder_input_ids:i,...a}=t;if(!n){const r=(0,o.pick)(t,e.sessions.model.inputNames);n=(await O(e,r)).last_hidden_state}a.input_ids=i,a.encoder_hidden_states=n,e.sessions.decoder_model_merged.inputNames.includes("encoder_attention_mask")&&(a.encoder_attention_mask=t.attention_mask);return await B(e,a,!0)}async function O(e,t){const n=e.sessions.model,r=(0,o.pick)(t,n.inputNames);if(n.inputNames.includes("inputs_embeds")&&!r.inputs_embeds){if(!t.input_ids)throw new Error("Both `input_ids` and `inputs_embeds` are missing in the model inputs.");r.inputs_embeds=await e.encode_text({input_ids:t.input_ids})}return n.inputNames.includes("token_type_ids")&&!r.token_type_ids&&(r.token_type_ids=new c.Tensor("int64",new BigInt64Array(r.input_ids.data.length),r.input_ids.dims)),await P(n,r)}async function B(e,t,n=!1){const r=e.sessions[n?"decoder_model_merged":"model"],{past_key_values:i,...a}=t;r.inputNames.includes("use_cache_branch")&&(a.use_cache_branch=z(!!i)),r.inputNames.includes("position_ids")&&a.attention_mask&&!a.position_ids&&(a.position_ids=function(e,t=null){const{input_ids:n,inputs_embeds:r,attention_mask:i}=e,[a,s]=i.dims,o=new BigInt64Array(i.data.length);for(let e=0;e<a;++e){const t=e*s;let n=BigInt(0);for(let e=0;e<s;++e){const r=t+e;0n===i.data[r]?o[r]=BigInt(1):(o[r]=n,n+=i.data[r])}}let l=new c.Tensor("int64",o,i.dims);if(t){const e=-(n??r).dims.at(1);l=l.slice(null,[e,null])}return l}(a,i)),e.addPastKeyValues(a,i);const s=(0,o.pick)(a,r.inputNames);return await P(r,s)}async function L(e,{input_ids:t=null,attention_mask:n=null,pixel_values:r=null,position_ids:i=null,inputs_embeds:a=null,past_key_values:s=null,generation_config:o=null,logits_processor:l=null,...u}){if(!a)if(a=await e.encode_text({input_ids:t}),r&&1!==t.dims[1]){const i=await e.encode_image({pixel_values:r});({inputs_embeds:a,attention_mask:n}=e._merge_input_ids_with_image_features({image_features:i,inputs_embeds:a,input_ids:t,attention_mask:n}))}else if(s&&r&&1===t.dims[1]){const e=t.dims[1],r=Object.values(s)[0].dims.at(-2);n=(0,c.cat)([(0,c.ones)([t.dims[0],r]),n.slice(null,[n.dims[1]-e,n.dims[1]])],1)}return await B(e,{inputs_embeds:a,past_key_values:s,attention_mask:n,position_ids:i,generation_config:o,logits_processor:l},!0)}function D(e,t,n,r){if(n.past_key_values){const t=Object.values(n.past_key_values)[0].dims.at(-2),{input_ids:r,attention_mask:i}=n;if(i&&i.dims[1]>r.dims[1]);else if(t<r.dims[1])n.input_ids=r.slice(null,[t,null]);else if(null!=e.config.image_token_index&&r.data.some((t=>t==e.config.image_token_index))){const i=e.config.num_image_tokens;if(!i)throw new Error("`num_image_tokens` is missing in the model configuration.");const a=r.dims[1]-(t-i);n.input_ids=r.slice(null,[-a,null]),n.attention_mask=(0,c.ones)([1,t+a])}}return n}function R(e,t,n,r){return n.past_key_values&&(t=t.map((e=>[e.at(-1)]))),{...n,decoder_input_ids:F(t)}}function N(e,...t){return e.config.is_encoder_decoder?R(e,...t):D(e,...t)}class V extends s.Callable{main_input_name="input_ids";forward_params=["input_ids","attention_mask"];constructor(e,t){super(),this.config=e,this.sessions=t;const n=C.get(this.constructor),r=$.get(n);switch(this.can_generate=!1,this._forward=null,this._prepare_inputs_for_generation=null,r){case x:this.can_generate=!0,this._forward=B,this._prepare_inputs_for_generation=D;break;case b:case v:case k:this.can_generate=!0,this._forward=I,this._prepare_inputs_for_generation=R;break;case y:this._forward=I;break;case T:this.can_generate=!0,this._forward=L,this._prepare_inputs_for_generation=N;break;default:this._forward=O}this.can_generate&&this.forward_params.push("past_key_values"),this.custom_config=this.config["transformers.js_config"]??{}}async dispose(){const e=[];for(const t of Object.values(this.sessions))t?.handler?.dispose&&e.push(t.handler.dispose());return await Promise.all(e)}static async from_pretrained(e,{progress_callback:t=null,config:n=null,cache_dir:i=null,local_files_only:a=!1,revision:s="main",model_file_name:o=null,subfolder:u="onnx",device:d=null,dtype:c=null,use_external_data_format:p=null,session_options:h={}}={}){let m={progress_callback:t,config:n,cache_dir:i,local_files_only:a,revision:s,model_file_name:o,subfolder:u,device:d,dtype:c,use_external_data_format:p,session_options:h};const f=C.get(this),g=$.get(f);let _;if(n=m.config=await r.AutoConfig.from_pretrained(e,m),g===x)_=await Promise.all([E(e,{model:m.model_file_name??"model"},m),(0,l.getModelJSON)(e,"generation_config.json",!1,m)]);else if(g===b||g===v)_=await Promise.all([E(e,{model:"encoder_model",decoder_model_merged:"decoder_model_merged"},m),(0,l.getModelJSON)(e,"generation_config.json",!1,m)]);else if(g===M)_=await Promise.all([E(e,{model:"vision_encoder",prompt_encoder_mask_decoder:"prompt_encoder_mask_decoder"},m)]);else if(g===y)_=await Promise.all([E(e,{model:"encoder_model",decoder_model_merged:"decoder_model_merged"},m)]);else if(g===T){const t={embed_tokens:"embed_tokens",vision_encoder:"vision_encoder",decoder_model_merged:"decoder_model_merged"};n.is_encoder_decoder&&(t.model="encoder_model"),_=await Promise.all([E(e,t,m),(0,l.getModelJSON)(e,"generation_config.json",!1,m)])}else g===k?_=await Promise.all([E(e,{model:"text_encoder",decoder_model_merged:"decoder_model_merged",encodec_decode:"encodec_decode"},m),(0,l.getModelJSON)(e,"generation_config.json",!1,m)]):(g!==w&&console.warn(`Model type for '${f??n?.model_type}' not found, assuming encoder-only architecture. Please report this at https://github.com/xenova/transformers.js/issues/new/choose.`),_=await Promise.all([E(e,{model:m.model_file_name??"model"},m)]));return new this(n,..._)}async _call(e){return await this.forward(e)}async forward(e){return await this._forward(this,e)}_get_logits_warper(e){const t=new u.LogitsProcessorList;return null!==e.temperature&&1!==e.temperature&&t.push(new u.TemperatureLogitsWarper(e.temperature)),null!==e.top_k&&0!==e.top_k&&t.push(new u.TopKLogitsWarper(e.top_k)),null!==e.top_p&&e.top_p<1&&t.push(new u.TopPLogitsWarper(e.top_p)),t}_get_logits_processor(e,t,n=null){const r=new u.LogitsProcessorList;if(null!==e.repetition_penalty&&1!==e.repetition_penalty&&r.push(new u.RepetitionPenaltyLogitsProcessor(e.repetition_penalty)),null!==e.no_repeat_ngram_size&&e.no_repeat_ngram_size>0&&r.push(new u.NoRepeatNGramLogitsProcessor(e.no_repeat_ngram_size)),null!==e.bad_words_ids&&r.push(new u.NoBadWordsLogitsProcessor(e.bad_words_ids,e.eos_token_id)),null!==e.min_length&&null!==e.eos_token_id&&e.min_length>0&&r.push(new u.MinLengthLogitsProcessor(e.min_length,e.eos_token_id)),null!==e.min_new_tokens&&null!==e.eos_token_id&&e.min_new_tokens>0&&r.push(new u.MinNewTokensLengthLogitsProcessor(t,e.min_new_tokens,e.eos_token_id)),null!==e.forced_bos_token_id&&r.push(new u.ForcedBOSTokenLogitsProcessor(e.forced_bos_token_id)),null!==e.forced_eos_token_id&&r.push(new u.ForcedEOSTokenLogitsProcessor(e.max_length,e.forced_eos_token_id)),null!==e.begin_suppress_tokens){const n=t>1||null===e.forced_bos_token_id?t:t+1;r.push(new u.SuppressTokensAtBeginLogitsProcessor(e.begin_suppress_tokens,n))}return null!==e.guidance_scale&&e.guidance_scale>1&&r.push(new u.ClassifierFreeGuidanceLogitsProcessor(e.guidance_scale)),null!==n&&r.extend(n),r}_prepare_generation_config(e,t,n=d.GenerationConfig){const r={...this.config};for(const e of["decoder","generator","text_config"])e in r&&Object.assign(r,r[e]);const i=new n(r);return"generation_config"in this&&Object.assign(i,this.generation_config),e&&Object.assign(i,e),t&&Object.assign(i,(0,o.pick)(t,Object.getOwnPropertyNames(i))),i}_get_stopping_criteria(e,t=null){const n=new h.StoppingCriteriaList;return null!==e.max_length&&n.push(new h.MaxLengthCriteria(e.max_length,this.config.max_position_embeddings??null)),null!==e.eos_token_id&&n.push(new h.EosTokenCriteria(e.eos_token_id)),t&&n.extend(t),n}_validate_model_class(){if(!this.can_generate){const e=[Ns,Gs,Rs,Is],t=C.get(this.constructor),n=new Set,r=this.config.model_type;for(const t of e){const e=t.get(r);e&&n.add(e[0])}let i=`The current model class (${t}) is not compatible with \`.generate()\`, as it doesn't have a language model head.`;throw n.size>0&&(i+=` Please use the following class instead: ${[...n].join(", ")}`),Error(i)}}prepare_inputs_for_generation(...e){return this._prepare_inputs_for_generation(this,...e)}_update_model_kwargs_for_generation({generated_input_ids:e,outputs:t,model_inputs:n,is_encoder_decoder:r}){return n.past_key_values=this.getPastKeyValues(t,n.past_key_values),n.input_ids=new c.Tensor("int64",e.flat(),[e.length,1]),r||(n.attention_mask=(0,c.cat)([n.attention_mask,(0,c.ones)([n.attention_mask.dims[0],1])],1)),n.position_ids=null,n}_prepare_model_inputs({inputs:e,bos_token_id:t,model_kwargs:n}){const r=(0,o.pick)(n,this.forward_params),i=this.main_input_name;if(i in r){if(e)throw new Error("`inputs`: {inputs}` were passed alongside {input_name} which is not allowed. Make sure to either pass {inputs} or {input_name}=...")}else r[i]=e;return{inputs_tensor:r[i],model_inputs:r,model_input_name:i}}async _prepare_encoder_decoder_kwargs_for_generation({inputs_tensor:e,model_inputs:t,model_input_name:n,generation_config:r}){if(this.sessions.model.inputNames.includes("inputs_embeds")&&!t.inputs_embeds&&"_prepare_inputs_embeds"in this){const{input_ids:e,pixel_values:n,attention_mask:r,...i}=t,a=await this._prepare_inputs_embeds(t);t={...i,...(0,o.pick)(a,["inputs_embeds","attention_mask"])}}let{last_hidden_state:i}=await O(this,t);if(null!==r.guidance_scale&&r.guidance_scale>1)i=(0,c.cat)([i,(0,c.full_like)(i,0)],0),"attention_mask"in t&&(t.attention_mask=(0,c.cat)([t.attention_mask,(0,c.zeros_like)(t.attention_mask)],0));else if(t.decoder_input_ids){const e=F(t.decoder_input_ids).dims[0];if(e!==i.dims[0]){if(1!==i.dims[0])throw new Error(`The encoder outputs have a different batch size (${i.dims[0]}) than the decoder inputs (${e}).`);i=(0,c.cat)(Array.from({length:e},(()=>i)),0)}}return t.encoder_outputs=i,t}_prepare_decoder_input_ids_for_generation({batch_size:e,model_input_name:t,model_kwargs:n,decoder_start_token_id:r,bos_token_id:i,generation_config:a}){let{decoder_input_ids:s,...o}=n;if(s)Array.isArray(s[0])||(s=Array.from({length:e},(()=>s)));else if(r??=i,"musicgen"===this.config.model_type)s=Array.from({length:e*this.config.decoder.num_codebooks},(()=>[r]));else if(Array.isArray(r)){if(r.length!==e)throw new Error(`\`decoder_start_token_id\` expcted to have length ${e} but got ${r.length}`);s=r}else s=Array.from({length:e},(()=>[r]));return s=F(s),n.decoder_attention_mask=(0,c.ones_like)(s),{input_ids:s,model_inputs:o}}async generate({inputs:e=null,generation_config:t=null,logits_processor:n=null,stopping_criteria:r=null,streamer:i=null,...a}){this._validate_model_class(),t=this._prepare_generation_config(t,a);let{inputs_tensor:s,model_inputs:o,model_input_name:l}=this._prepare_model_inputs({inputs:e,model_kwargs:a});const u=this.config.is_encoder_decoder;let d;u&&("encoder_outputs"in o||(o=await this._prepare_encoder_decoder_kwargs_for_generation({inputs_tensor:s,model_inputs:o,model_input_name:l,generation_config:t}))),u?({input_ids:d,model_inputs:o}=this._prepare_decoder_input_ids_for_generation({batch_size:o[l].dims.at(0),model_input_name:l,model_kwargs:o,decoder_start_token_id:t.decoder_start_token_id,bos_token_id:t.bos_token_id,generation_config:t})):d=o[l];let p=d.dims.at(-1);null!==t.max_new_tokens&&(t.max_length=p+t.max_new_tokens);const h=this._get_logits_processor(t,p,n),f=this._get_stopping_criteria(t,r),g=o[l].dims.at(0),_=m.LogitsSampler.getSampler(t),w=new Array(g).fill(0),y=d.tolist();i&&i.put(y);let b=null,v={};for(;;){o=this.prepare_inputs_for_generation(y,o,t);const e=await this.forward(o);if(t.output_attentions&&t.return_dict_in_generate){const t=this.getAttentions(e);for(const e in t)e in v||(v[e]=[]),v[e].push(t[e])}const n=h(y,e.logits.slice(null,-1,null)),r=[];for(let e=0;e<n.dims.at(0);++e){const t=n[e],i=await _(t);for(const[t,n]of i){const i=BigInt(t);w[e]+=n,y[e].push(i),r.push([i]);break}}i&&i.put(r);if(f(y).every((e=>e))){t.return_dict_in_generate&&(b=this.getPastKeyValues(e,o.past_key_values,!1));break}o=this._update_model_kwargs_for_generation({generated_input_ids:r,outputs:e,model_inputs:o,is_encoder_decoder:u})}i&&i.end();const x=new c.Tensor("int64",y.flat(),[y.length,y[0].length]);return t.return_dict_in_generate?{sequences:x,past_key_values:b,...v}:x}getPastKeyValues(e,t,n=!0){const r=Object.create(null);for(const i in e)if(i.startsWith("present")){const a=i.replace("present","past_key_values");if(t&&i.includes("encoder"))r[a]=t[a];else{if(n&&t){const e=t[a];"gpu-buffer"===e.location&&e.dispose()}r[a]=e[i]}}return r}getAttentions(e){const t={};for(const n of["cross_attentions","encoder_attentions","decoder_attentions"])for(const r in e)r.startsWith(n)&&(n in t||(t[n]=[]),t[n].push(e[r]));return t}addPastKeyValues(e,t){if(t)Object.assign(e,t);else{const t=this.custom_config.kv_cache_dtype??"float32",n="float16"===t?new Uint16Array:[],i=(0,r.getKeyValueShapes)(this.config);for(const r in i)e[r]=new c.Tensor(t,n,i[r])}}async encode_image({pixel_values:e}){const t=(await P(this.sessions.vision_encoder,{pixel_values:e})).image_features;return this.config.num_image_tokens||(console.warn(`The number of image tokens was not set in the model configuration. Setting it to the number of features detected by the vision encoder (${t.dims[1]}).`),this.config.num_image_tokens=t.dims[1]),t}async encode_text({input_ids:e}){return(await P(this.sessions.embed_tokens,{input_ids:e})).inputs_embeds}}class j{}class G extends j{constructor({last_hidden_state:e,hidden_states:t=null,attentions:n=null}){super(),this.last_hidden_state=e,this.hidden_states=t,this.attentions=n}}class q extends V{}class U extends q{}class W extends q{async _call(e){return new Vo(await super._call(e))}}class H extends q{async _call(e){return new Do(await super._call(e))}}class X extends q{async _call(e){return new No(await super._call(e))}}class K extends q{async _call(e){return new jo(await super._call(e))}}class Q extends V{}class Y extends Q{}class J extends V{}class Z extends J{}class ee extends J{async _call(e){return new Vo(await super._call(e))}}class te extends J{async _call(e){return new Do(await super._call(e))}}class ne extends J{async _call(e){return new No(await super._call(e))}}class re extends J{async _call(e){return new jo(await super._call(e))}}class ie extends V{}class ae extends ie{}class se extends ie{async _call(e){return new Vo(await super._call(e))}}class oe extends ie{async _call(e){return new Do(await super._call(e))}}class le extends ie{async _call(e){return new No(await super._call(e))}}class ue extends ie{async _call(e){return new jo(await super._call(e))}}class de extends V{}class ce extends de{}class pe extends de{async _call(e){return new Vo(await super._call(e))}}class he extends de{async _call(e){return new Do(await super._call(e))}}class me extends de{async _call(e){return new No(await super._call(e))}}class fe extends de{async _call(e){return new jo(await super._call(e))}}class ge extends V{}class _e extends ge{}class we extends ge{async _call(e){return new Vo(await super._call(e))}}class ye extends ge{async _call(e){return new Do(await super._call(e))}}class be extends ge{async _call(e){return new No(await super._call(e))}}class ve extends ge{async _call(e){return new jo(await super._call(e))}}class xe extends V{}class Me extends xe{}class Te extends xe{async _call(e){return new Vo(await super._call(e))}}class ke extends xe{async _call(e){return new Do(await super._call(e))}}class $e extends xe{async _call(e){return new No(await super._call(e))}}class Se extends xe{async _call(e){return new jo(await super._call(e))}}class Ce extends V{}class Ee extends Ce{}class Pe extends Ce{async _call(e){return new Vo(await super._call(e))}}class Ae extends Ce{async _call(e){return new Do(await super._call(e))}}class Fe extends Ce{async _call(e){return new No(await super._call(e))}}class ze extends Ce{async _call(e){return new jo(await super._call(e))}}class Ie extends V{}class Oe extends Ie{}class Be extends Ie{async _call(e){return new Do(await super._call(e))}}class Le extends Ie{async _call(e){return new No(await super._call(e))}}class De extends Ie{async _call(e){return new jo(await super._call(e))}}class Re extends Ie{async _call(e){return new Vo(await super._call(e))}}class Ne extends V{}class Ve extends Ne{}class je extends Ne{async _call(e){return new Vo(await super._call(e))}}class Ge extends Ne{async _call(e){return new Do(await super._call(e))}}class qe extends Ne{async _call(e){return new No(await super._call(e))}}class Ue extends V{}class We extends Ue{}class He extends Ue{async _call(e){return new Vo(await super._call(e))}}class Xe extends Ue{async _call(e){return new Do(await super._call(e))}}class Ke extends Ue{async _call(e){return new jo(await super._call(e))}}class Qe extends V{}class Ye extends Qe{}class Je extends Qe{async _call(e){return new Vo(await super._call(e))}}class Ze extends Qe{async _call(e){return new Do(await super._call(e))}}class et extends Qe{async _call(e){return new No(await super._call(e))}}class tt extends Qe{async _call(e){return new jo(await super._call(e))}}class nt extends V{}class rt extends nt{}class it extends nt{async _call(e){return new Vo(await super._call(e))}}class at extends nt{async _call(e){return new Do(await super._call(e))}}class st extends nt{async _call(e){return new jo(await super._call(e))}}class ot extends V{}class lt extends ot{}class ut extends ot{async _call(e){return new Do(await super._call(e))}}class dt extends ot{async _call(e){return new jo(await super._call(e))}}class ct extends ot{async _call(e){return new Vo(await super._call(e))}}class pt extends V{forward_params=["input_ids","attention_mask","encoder_outputs","decoder_input_ids","decoder_attention_mask","past_key_values"];constructor(e,t,n){super(e,t),this.generation_config=n}}class ht extends pt{}class mt extends pt{}class ft extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class gt extends ft{}class _t extends ft{}class wt extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class yt extends wt{}class bt extends wt{}class vt extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class xt extends vt{}class Mt extends vt{}class Tt extends vt{async _call(e){return new Do(await super._call(e))}}class kt extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class $t extends kt{}class St extends kt{}class Ct extends kt{async _call(e){return new Do(await super._call(e))}}class Et extends kt{}class Pt extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class At extends Pt{}class Ft extends Pt{}class zt extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class It extends zt{}class Ot extends zt{}class Bt extends V{}class Lt extends Bt{}class Dt extends Bt{async _call(e){return new Vo(await super._call(e))}}class Rt extends Bt{async _call(e){return new Do(await super._call(e))}}class Nt extends Bt{async _call(e){return new No(await super._call(e))}}class Vt extends Bt{async _call(e){return new jo(await super._call(e))}}class jt extends V{}class Gt extends jt{}class qt extends jt{async _call(e){return new Vo(await super._call(e))}}class Ut extends jt{async _call(e){return new Do(await super._call(e))}}class Wt extends jt{async _call(e){return new No(await super._call(e))}}class Ht extends jt{async _call(e){return new jo(await super._call(e))}}class Xt extends V{}class Kt extends Xt{}class Qt extends Xt{async _call(e){return new Vo(await super._call(e))}}class Yt extends Xt{async _call(e){return new Do(await super._call(e))}}class Jt extends Xt{async _call(e){return new No(await super._call(e))}}class Zt extends Xt{async _call(e){return new jo(await super._call(e))}}class en extends V{}class tn extends en{}class nn extends en{}class rn extends V{requires_attention_mask=!1;main_input_name="input_features";forward_params=["input_features","attention_mask","decoder_input_ids","decoder_attention_mask","past_key_values"];constructor(e,t,n){super(e,t),this.generation_config=n}}class an extends rn{}class sn extends rn{_prepare_generation_config(e,t){return super._prepare_generation_config(e,t,g.WhisperGenerationConfig)}_retrieve_init_tokens(e){const t=[e.decoder_start_token_id];let n=e.language;const r=e.task;if(e.is_multilingual){n||(console.warn("No language specified - defaulting to English (en)."),n="en");const i=`<|${(0,_.whisper_language_to_code)(n)}|>`;t.push(e.lang_to_id[i]),t.push(e.task_to_id[r??"transcribe"])}else if(n||r)throw new Error("Cannot specify `task` or `language` for an English-only model. If the model is intended to be multilingual, pass `is_multilingual=true` to generate, or update the generation config.");return!e.return_timestamps&&e.no_timestamps_token_id&&t.at(-1)!==e.no_timestamps_token_id?t.push(e.no_timestamps_token_id):e.return_timestamps&&t.at(-1)===e.no_timestamps_token_id&&(console.warn("<|notimestamps|> prompt token is removed from generation_config since `return_timestamps` is set to `true`."),t.pop()),t.filter((e=>null!=e))}async generate({inputs:e=null,generation_config:t=null,logits_processor:n=null,stopping_criteria:r=null,...i}){t=this._prepare_generation_config(t,i);const a=i.decoder_input_ids??this._retrieve_init_tokens(t);if(t.return_timestamps&&(n??=new u.LogitsProcessorList,n.push(new u.WhisperTimeStampLogitsProcessor(t,a))),t.begin_suppress_tokens&&(n??=new u.LogitsProcessorList,n.push(new u.SuppressTokensAtBeginLogitsProcessor(t.begin_suppress_tokens,a.length))),t.return_token_timestamps){if(!t.alignment_heads)throw new Error("Model generation config has no `alignment_heads`, token-level timestamps not available. See https://gist.github.com/hollance/42e32852f24243b748ae6bc1f985b13a on how to add this property to the generation config.");"translate"===t.task&&console.warn("Token-level timestamps may not be reliable for task 'translate'."),t.output_attentions=!0,t.return_dict_in_generate=!0}const s=await super.generate({inputs:e,generation_config:t,logits_processor:n,decoder_input_ids:a,...i});return t.return_token_timestamps&&(s.token_timestamps=this._extract_token_timestamps(s,t.alignment_heads,t.num_frames)),s}_extract_token_timestamps(e,t,n=null,r=.02){if(!e.cross_attentions)throw new Error("Model outputs must contain cross attentions to extract timestamps. This is most likely because the model was not exported with `output_attentions=True`.");null==n&&console.warn("`num_frames` has not been set, meaning the entire audio will be analyzed. This may lead to inaccurate token-level timestamps for short audios (< 30 seconds).");let i=this.config.median_filter_width;void 0===i&&(console.warn("Model config has no `median_filter_width`, using default value of 7."),i=7);const a=e.cross_attentions,s=Array.from({length:this.config.decoder_layers},((e,t)=>(0,c.cat)(a.map((e=>e[t])),2))),l=(0,c.stack)(t.map((([e,t])=>{if(e>=s.length)throw new Error(`Layer index ${e} is out of bounds for cross attentions (length ${s.length}).`);return n?s[e].slice(null,t,null,[0,n]):s[e].slice(null,t)}))).transpose(1,0,2,3),[u,d]=(0,c.std_mean)(l,-2,0,!0),h=l.clone();for(let e=0;e<h.dims[0];++e){const t=h[e];for(let n=0;n<t.dims[0];++n){const r=t[n],a=u[e][n][0].data,s=d[e][n][0].data;for(let e=0;e<r.dims[0];++e){let t=r[e].data;for(let e=0;e<t.length;++e)t[e]=(t[e]-s[e])/a[e];t.set((0,p.medianFilter)(t,i))}}}const m=[(0,c.mean)(h,1)],f=e.sequences.dims,g=new c.Tensor("float32",new Float32Array(f[0]*f[1]),f);for(let e=0;e<f[0];++e){const t=m[e].neg().squeeze_(0),[n,i]=(0,p.dynamic_time_warping)(t.tolist()),a=Array.from({length:n.length-1},((e,t)=>n[t+1]-n[t])),s=(0,o.mergeArrays)([1],a).map((e=>!!e)),l=[];for(let e=0;e<s.length;++e)s[e]&&l.push(i[e]*r);g[e].data.set(l,1)}return g}}class on extends V{main_input_name="pixel_values";forward_params=["pixel_values","input_ids","encoder_hidden_states","past_key_values"];constructor(e,t,n){super(e,t),this.generation_config=n}}class ln extends V{forward_params=["input_ids","pixel_values","attention_mask","position_ids","past_key_values"];constructor(e,t,n){super(e,t),this.generation_config=n}}class un extends ln{_merge_input_ids_with_image_features({inputs_embeds:e,image_features:t,input_ids:n,attention_mask:r}){const i=this.config.image_token_index,a=n.tolist().map((e=>e.findIndex((e=>e==i)))),s=a.every((e=>-1===e)),o=a.every((e=>-1!==e));if(!s&&!o)throw new Error("Every input should contain either 0 or 1 image token.");if(s)return{inputs_embeds:e,attention_mask:r};const l=[],u=[];for(let n=0;n<a.length;++n){const i=a[n],s=e[n],o=t[n],d=r[n];l.push((0,c.cat)([s.slice([0,i]),o,s.slice([i+1,s.dims[0]])],0)),u.push((0,c.cat)([d.slice([0,i]),(0,c.ones)([o.dims[0]]),d.slice([i+1,d.dims[0]])],0))}return{inputs_embeds:(0,c.stack)(l,0),attention_mask:(0,c.stack)(u,0)}}}class dn extends un{}class cn extends V{forward_params=["input_ids","inputs_embeds","attention_mask","pixel_values","encoder_outputs","decoder_input_ids","decoder_inputs_embeds","decoder_attention_mask","past_key_values"];main_input_name="inputs_embeds";constructor(e,t,n){super(e,t),this.generation_config=n}}class pn extends cn{_merge_input_ids_with_image_features({inputs_embeds:e,image_features:t,input_ids:n,attention_mask:r}){return{inputs_embeds:(0,c.cat)([t,e],1),attention_mask:(0,c.cat)([(0,c.ones)(t.dims.slice(0,2)),r],1)}}async _prepare_inputs_embeds({input_ids:e,pixel_values:t,inputs_embeds:n,attention_mask:r}){if(!e&&!t)throw new Error("Either `input_ids` or `pixel_values` should be provided.");let i,a;return e&&(i=await this.encode_text({input_ids:e})),t&&(a=await this.encode_image({pixel_values:t})),i&&a?({inputs_embeds:n,attention_mask:r}=this._merge_input_ids_with_image_features({inputs_embeds:i,image_features:a,input_ids:e,attention_mask:r})):n=i||a,{inputs_embeds:n,attention_mask:r}}async forward({input_ids:e,pixel_values:t,attention_mask:n,decoder_input_ids:r,decoder_attention_mask:i,encoder_outputs:a,past_key_values:s,inputs_embeds:o,decoder_inputs_embeds:l}){if(o||({inputs_embeds:o,attention_mask:n}=await this._prepare_inputs_embeds({input_ids:e,pixel_values:t,inputs_embeds:o,attention_mask:n})),!a){let{last_hidden_state:e}=await O(this,{inputs_embeds:o,attention_mask:n});a=e}if(!l){if(!r)throw new Error("Either `decoder_input_ids` or `decoder_inputs_embeds` should be provided.");l=await this.encode_text({input_ids:r})}const u={inputs_embeds:l,attention_mask:i,encoder_attention_mask:n,encoder_hidden_states:a,past_key_values:s};return await B(this,u,!0)}}class hn extends V{}class mn extends hn{}class fn extends hn{static async from_pretrained(e,t={}){return t.model_file_name??="text_model",super.from_pretrained(e,t)}}class gn extends hn{static async from_pretrained(e,t={}){return t.model_file_name??="vision_model",super.from_pretrained(e,t)}}class _n extends V{}class wn extends _n{}class yn extends _n{static async from_pretrained(e,t={}){return t.model_file_name??="text_model",super.from_pretrained(e,t)}}class bn extends hn{static async from_pretrained(e,t={}){return t.model_file_name??="vision_model",super.from_pretrained(e,t)}}class vn extends V{}class xn extends vn{}class Mn extends V{}class Tn extends Mn{}class kn extends Mn{}class $n extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class Sn extends $n{}class Cn extends $n{}class En extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class Pn extends En{}class An extends En{}class Fn extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class zn extends Fn{}class In extends Fn{}class On extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class Bn extends On{}class Ln extends On{}class Dn extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class Rn extends Dn{}class Nn extends Dn{}class Vn extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class jn extends Vn{}class Gn extends Vn{}class qn extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class Un extends qn{}class Wn extends qn{}class Hn extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class Xn extends Hn{}class Kn extends Hn{}class Qn extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class Yn extends Qn{}class Jn extends Qn{}class Zn extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class er extends Zn{}class tr extends Zn{}class nr extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class rr extends nr{}class ir extends nr{}class ar extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class sr extends ar{}class or extends ar{}class lr extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class ur extends lr{}class dr extends lr{}class cr extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class pr extends cr{}class hr extends cr{}class mr extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class fr extends mr{}class gr extends mr{}class _r extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class wr extends _r{}class yr extends _r{}class br extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class vr extends br{}class xr extends br{}class Mr extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class Tr extends Mr{}class kr extends Mr{}class $r extends V{}class Sr extends $r{}class Cr extends $r{async _call(e){return new Do(await super._call(e))}}class Er extends V{}class Pr extends Er{}class Ar extends Er{async _call(e){return new Do(await super._call(e))}}class Fr extends V{}class zr extends Fr{async _call(e){return new Uo(await super._call(e))}}class Ir extends V{}class Or extends Ir{}class Br extends Ir{async _call(e){return new Do(await super._call(e))}}class Lr extends V{}class Dr extends Lr{}class Rr extends Lr{async _call(e){return new Do(await super._call(e))}}class Nr extends V{}class Vr extends Nr{}class jr extends Nr{}class Gr extends V{}class qr extends Gr{}class Ur extends Gr{}class Wr extends V{}class Hr extends Wr{}class Xr extends Wr{async _call(e){return new Do(await super._call(e))}}class Kr extends V{}class Qr extends Kr{}class Yr extends Kr{async _call(e){return new Zr(await super._call(e))}}class Jr extends Kr{async _call(e){return new ei(await super._call(e))}}class Zr extends j{constructor({logits:e,pred_boxes:t}){super(),this.logits=e,this.pred_boxes=t}}class ei extends j{constructor({logits:e,pred_boxes:t,pred_masks:n}){super(),this.logits=e,this.pred_boxes=t,this.pred_masks=n}}class ti extends V{}class ni extends ti{}class ri extends ti{async _call(e){return new ii(await super._call(e))}}class ii extends j{constructor({logits:e,pred_boxes:t}){super(),this.logits=e,this.pred_boxes=t}}class ai extends V{}class si extends ai{}class oi extends ai{async _call(e){return new li(await super._call(e))}}class li extends Zr{}class ui extends V{}class di extends ui{}class ci extends ui{async _call(e){return new Do(await super._call(e))}}class pi extends V{}class hi extends pi{}class mi extends pi{async _call(e){return new Do(await super._call(e))}}class fi extends V{}class gi extends fi{}class _i extends fi{async _call(e){return new Do(await super._call(e))}}class wi extends V{}class yi extends wi{}class bi extends wi{}class vi extends V{}class xi extends vi{}class Mi extends vi{}class Ti extends V{}class ki extends Ti{}class $i extends V{}class Si extends $i{}class Ci extends $i{}class Ei extends $i{}class Pi extends V{}class Ai extends Pi{}class Fi extends Pi{}class zi extends V{}class Ii extends zi{}class Oi extends V{}class Bi extends Oi{}class Li extends Oi{async _call(e){return new Do(await super._call(e))}}class Di extends V{}class Ri extends Di{}class Ni extends Di{async _call(e){return new Do(await super._call(e))}}class Vi extends V{}class ji extends Vi{}class Gi extends Vi{async _call(e){return new Do(await super._call(e))}}class qi extends V{}class Ui extends qi{}class Wi extends qi{async _call(e){return new Hi(await super._call(e))}}class Hi extends j{constructor({logits:e,pred_boxes:t}){super(),this.logits=e,this.pred_boxes=t}}class Xi extends V{}class Ki extends Xi{async get_image_embeddings({pixel_values:e}){return await O(this,{pixel_values:e})}async forward(e){if(e.image_embeddings&&e.image_positional_embeddings||(e={...e,...await this.get_image_embeddings(e)}),!e.input_labels&&e.input_points){const t=e.input_points.dims.slice(0,-1),n=t.reduce(((e,t)=>e*t),1);e.input_labels=new c.Tensor("int64",new BigInt64Array(n).fill(1n),t)}const t={image_embeddings:e.image_embeddings,image_positional_embeddings:e.image_positional_embeddings};return e.input_points&&(t.input_points=e.input_points),e.input_labels&&(t.input_labels=e.input_labels),e.input_boxes&&(t.input_boxes=e.input_boxes),await P(this.sessions.prompt_encoder_mask_decoder,t)}async _call(e){return new Qi(await super._call(e))}}class Qi extends j{constructor({iou_scores:e,pred_masks:t}){super(),this.iou_scores=e,this.pred_masks=t}}class Yi extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class Ji extends Yi{}class Zi extends Yi{}class ea extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class ta extends ea{}class na extends ea{}class ra extends V{}class ia extends ra{}class aa extends ra{async _call(e){return new Go(await super._call(e))}}class sa extends ra{async _call(e){return new Do(await super._call(e))}}class oa extends ra{async _call(e){return new No(await super._call(e))}}class la extends V{}class ua extends la{}class da extends la{async _call(e){return new No(await super._call(e))}}class ca extends V{}class pa extends ca{}class ha extends V{}class ma extends ha{}class fa extends ha{async _call(e){return new Go(await super._call(e))}}class ga extends ha{async _call(e){return new Do(await super._call(e))}}class _a extends V{}class wa extends _a{}class ya extends _a{async _call(e){return new Go(await super._call(e))}}class ba extends _a{async _call(e){return new Do(await super._call(e))}}class va extends _a{async _call(e){return new No(await super._call(e))}}class xa extends V{}class Ma extends xa{}class Ta extends xa{async _call(e){return new Go(await super._call(e))}}class ka extends xa{async _call(e){return new Do(await super._call(e))}}class $a extends V{}class Sa extends ra{}class Ca extends ra{async _call(e){return new Go(await super._call(e))}}class Ea extends ra{async _call(e){return new Do(await super._call(e))}}class Pa extends V{}class Aa extends Pa{}class Fa extends Pa{async _call(e){return new Go(await super._call(e))}}class za extends Pa{async _call(e){return new Do(await super._call(e))}}class Ia extends Pa{async _call(e){return new Ro(await super._call(e))}}class Oa extends Pa{async _call(e){return new No(await super._call(e))}}class Ba extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class La extends Ba{}class Da extends Ba{}class Ra extends Ba{async generate_speech(e,t,{threshold:n=.5,minlenratio:r=0,maxlenratio:i=20,vocoder:a=null}={}){const s={input_ids:e},{encoder_outputs:o,encoder_attention_mask:l}=await O(this,s),u=o.dims[1]/this.config.reduction_factor,d=Math.floor(u*i),p=Math.floor(u*r),h=this.config.num_mel_bins;let m=[],f=null,g=null,_=0;for(;;){++_;const e=z(!!g);let r;r=g?g.output_sequence_out:new c.Tensor("float32",new Float32Array(h),[1,1,h]);let i={use_cache_branch:e,output_sequence:r,encoder_attention_mask:l,speaker_embeddings:t,encoder_hidden_states:o};this.addPastKeyValues(i,f),g=await P(this.sessions.decoder_model_merged,i),f=this.getPastKeyValues(g,f);const{prob:a,spectrum:s}=g;if(m.push(s),_>=p&&(Array.from(a.data).filter((e=>e>=n)).length>0||_>=d))break}const w=(0,c.cat)(m),{waveform:y}=await P(a.sessions.model,{spectrogram:w});return{spectrogram:w,waveform:y}}}class Na extends V{main_input_name="spectrogram"}class Va extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class ja extends Va{}class Ga extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class qa extends Ga{}class Ua extends Ga{}class Wa extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class Ha extends Wa{}class Xa extends Wa{}class Ka extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class Qa extends Ka{}class Ya extends Ka{}class Ja extends V{}class Za extends Ja{}class es extends Ja{static async from_pretrained(e,t={}){return t.model_file_name??="text_model",super.from_pretrained(e,t)}}class ts extends Ja{static async from_pretrained(e,t={}){return t.model_file_name??="audio_model",super.from_pretrained(e,t)}}class ns extends V{}class rs extends ns{async _call(e){return new Wo(await super._call(e))}}class is extends V{}class as extends is{}class ss extends is{}class os extends is{}class ls extends V{constructor(e,t,n){super(e,t),this.generation_config=n}}class us extends ls{}class ds extends ls{}class cs extends V{}class ps extends cs{}class hs extends cs{async _call(e){return new Do(await super._call(e))}}class ms extends V{}class fs extends ms{}class gs extends ms{}class _s extends V{forward_params=["input_ids","attention_mask","encoder_outputs","decoder_input_ids","decoder_attention_mask","past_key_values"];constructor(e,t,n){super(e,t),this.generation_config=n}_apply_and_filter_by_delay_pattern_mask(e){const[t,n]=e.dims,r=this.config.decoder.num_codebooks,i=n-r;let a=0;for(let t=0;t<e.size;++t){if(e.data[t]===this.config.decoder.pad_token_id)continue;const s=t%n-Math.floor(t/n)%r;s>0&&s<=i&&(e.data[a++]=e.data[t])}const s=Math.floor(t/r),o=a/(s*r);return new c.Tensor(e.type,e.data.slice(0,a),[s,r,o])}prepare_inputs_for_generation(e,t,n){let r=structuredClone(e);for(let e=0;e<r.length;++e)for(let t=0;t<r[e].length;++t)e%this.config.decoder.num_codebooks>=t&&(r[e][t]=BigInt(this.config.decoder.pad_token_id));null!==n.guidance_scale&&n.guidance_scale>1&&(r=r.concat(r));return super.prepare_inputs_for_generation(r,t,n)}async generate(e){const t=await super.generate(e),n=this._apply_and_filter_by_delay_pattern_mask(t).unsqueeze_(0),{audio_values:r}=await P(this.sessions.encodec_decode,{audio_codes:n});return r}}class ws extends V{}class ys extends ws{}class bs extends ws{async _call(e){return new Do(await super._call(e))}}class vs extends V{}class xs extends vs{}class Ms extends vs{async _call(e){return new Do(await super._call(e))}}class Ts extends V{}class ks extends Ts{}class $s extends Ts{async _call(e){return new Do(await super._call(e))}}class Ss extends V{}class Cs extends Ss{}class Es extends Ss{async _call(e){return new Do(await super._call(e))}}class Ps{static MODEL_CLASS_MAPPINGS=null;static BASE_IF_FAIL=!1;static async from_pretrained(e,{progress_callback:t=null,config:n=null,cache_dir:i=null,local_files_only:a=!1,revision:s="main",model_file_name:o=null,subfolder:l="onnx",device:u=null,dtype:d=null,use_external_data_format:c=null,session_options:p={}}={}){let h={progress_callback:t,config:n,cache_dir:i,local_files_only:a,revision:s,model_file_name:o,subfolder:l,device:u,dtype:d,use_external_data_format:c,session_options:p};if(h.config=await r.AutoConfig.from_pretrained(e,h),!this.MODEL_CLASS_MAPPINGS)throw new Error("`MODEL_CLASS_MAPPINGS` not implemented for this type of `AutoClass`: "+this.name);for(let t of this.MODEL_CLASS_MAPPINGS){const n=t.get(h.config.model_type);if(n)return await n[1].from_pretrained(e,h)}if(this.BASE_IF_FAIL)return console.warn(`Unknown model class "${h.config.model_type}", attempting to construct from base class.`),await V.from_pretrained(e,h);throw Error(`Unsupported model type: ${h.config.model_type}`)}}const As=new Map([["bert",["BertModel",U]],["nomic_bert",["NomicBertModel",Y]],["roformer",["RoFormerModel",Z]],["electra",["ElectraModel",ce]],["esm",["EsmModel",Ve]],["convbert",["ConvBertModel",ae]],["camembert",["CamembertModel",_e]],["deberta",["DebertaModel",Me]],["deberta-v2",["DebertaV2Model",Ee]],["mpnet",["MPNetModel",Ye]],["albert",["AlbertModel",lt]],["distilbert",["DistilBertModel",Oe]],["roberta",["RobertaModel",Lt]],["xlm",["XLMModel",Gt]],["xlm-roberta",["XLMRobertaModel",Kt]],["clap",["ClapModel",Za]],["clip",["CLIPModel",mn]],["clipseg",["CLIPSegModel",Tn]],["chinese_clip",["ChineseCLIPModel",xn]],["siglip",["SiglipModel",wn]],["mobilebert",["MobileBertModel",We]],["squeezebert",["SqueezeBertModel",rt]],["wav2vec2",["Wav2Vec2Model",ia]],["wav2vec2-bert",["Wav2Vec2BertModel",Ma]],["unispeech",["UniSpeechModel",ma]],["unispeech-sat",["UniSpeechSatModel",wa]],["hubert",["HubertModel",Sa]],["wavlm",["WavLMModel",Aa]],["audio-spectrogram-transformer",["ASTModel",tn]],["vits",["VitsModel",rs]],["pyannote",["PyAnnoteModel",ua]],["wespeaker-resnet",["WeSpeakerResNetModel",pa]],["detr",["DetrModel",Qr]],["rt_detr",["RTDetrModel",ni]],["table-transformer",["TableTransformerModel",si]],["vit",["ViTModel",Sr]],["fastvit",["FastViTModel",Pr]],["mobilevit",["MobileViTModel",Or]],["mobilevitv2",["MobileViTV2Model",Dr]],["owlvit",["OwlViTModel",Vr]],["owlv2",["Owlv2Model",qr]],["beit",["BeitModel",Hr]],["deit",["DeiTModel",di]],["convnext",["ConvNextModel",Bi]],["convnextv2",["ConvNextV2Model",Ri]],["dinov2",["Dinov2Model",ji]],["resnet",["ResNetModel",hi]],["swin",["SwinModel",gi]],["swin2sr",["Swin2SRModel",yi]],["donut-swin",["DonutSwinModel",Ii]],["yolos",["YolosModel",Ui]],["dpt",["DPTModel",xi]],["glpn",["GLPNModel",Ai]],["hifigan",["SpeechT5HifiGan",Na]],["efficientnet",["EfficientNetModel",ps]],["mobilenet_v1",["MobileNetV1Model",ys]],["mobilenet_v2",["MobileNetV2Model",xs]],["mobilenet_v3",["MobileNetV3Model",ks]],["mobilenet_v4",["MobileNetV4Model",Cs]]]),Fs=new Map([["t5",["T5Model",ht]],["longt5",["LongT5Model",gt]],["mt5",["MT5Model",yt]],["bart",["BartModel",xt]],["mbart",["MBartModel",$t]],["marian",["MarianModel",Ji]],["whisper",["WhisperModel",an]],["m2m_100",["M2M100Model",ta]],["blenderbot",["BlenderbotModel",At]],["blenderbot-small",["BlenderbotSmallModel",It]]]),zs=new Map([["bloom",["BloomModel",wr]],["jais",["JAISModel",Pn]],["gpt2",["GPT2Model",Sn]],["gptj",["GPTJModel",Rn]],["gpt_bigcode",["GPTBigCodeModel",jn]],["gpt_neo",["GPTNeoModel",zn]],["gpt_neox",["GPTNeoXModel",Bn]],["codegen",["CodeGenModel",Un]],["llama",["LlamaModel",Xn]],["cohere",["CohereModel",Yn]],["gemma",["GemmaModel",er]],["gemma2",["Gemma2Model",rr]],["openelm",["OpenELMModel",sr]],["qwen2",["Qwen2Model",ur]],["phi",["PhiModel",pr]],["phi3",["Phi3Model",fr]],["mpt",["MptModel",vr]],["opt",["OPTModel",Tr]],["mistral",["MistralModel",qa]],["starcoder2",["Starcoder2Model",Ha]],["falcon",["FalconModel",Qa]],["stablelm",["StableLmModel",us]]]),Is=new Map([["speecht5",["SpeechT5ForSpeechToText",Da]],["whisper",["WhisperForConditionalGeneration",sn]]]),Os=new Map([["speecht5",["SpeechT5ForTextToSpeech",Ra]]]),Bs=new Map([["vits",["VitsModel",rs]],["musicgen",["MusicgenForConditionalGeneration",_s]]]),Ls=new Map([["bert",["BertForSequenceClassification",H]],["roformer",["RoFormerForSequenceClassification",te]],["electra",["ElectraForSequenceClassification",he]],["esm",["EsmForSequenceClassification",Ge]],["convbert",["ConvBertForSequenceClassification",oe]],["camembert",["CamembertForSequenceClassification",ye]],["deberta",["DebertaForSequenceClassification",ke]],["deberta-v2",["DebertaV2ForSequenceClassification",Ae]],["mpnet",["MPNetForSequenceClassification",Ze]],["albert",["AlbertForSequenceClassification",ut]],["distilbert",["DistilBertForSequenceClassification",Be]],["roberta",["RobertaForSequenceClassification",Rt]],["xlm",["XLMForSequenceClassification",Ut]],["xlm-roberta",["XLMRobertaForSequenceClassification",Yt]],["bart",["BartForSequenceClassification",Tt]],["mbart",["MBartForSequenceClassification",Ct]],["mobilebert",["MobileBertForSequenceClassification",Xe]],["squeezebert",["SqueezeBertForSequenceClassification",at]]]),Ds=new Map([["bert",["BertForTokenClassification",X]],["roformer",["RoFormerForTokenClassification",ne]],["electra",["ElectraForTokenClassification",me]],["esm",["EsmForTokenClassification",qe]],["convbert",["ConvBertForTokenClassification",le]],["camembert",["CamembertForTokenClassification",be]],["deberta",["DebertaForTokenClassification",$e]],["deberta-v2",["DebertaV2ForTokenClassification",Fe]],["mpnet",["MPNetForTokenClassification",et]],["distilbert",["DistilBertForTokenClassification",Le]],["roberta",["RobertaForTokenClassification",Nt]],["xlm",["XLMForTokenClassification",Wt]],["xlm-roberta",["XLMRobertaForTokenClassification",Jt]]]),Rs=new Map([["t5",["T5ForConditionalGeneration",mt]],["longt5",["LongT5ForConditionalGeneration",_t]],["mt5",["MT5ForConditionalGeneration",bt]],["bart",["BartForConditionalGeneration",Mt]],["mbart",["MBartForConditionalGeneration",St]],["marian",["MarianMTModel",Zi]],["m2m_100",["M2M100ForConditionalGeneration",na]],["blenderbot",["BlenderbotForConditionalGeneration",Ft]],["blenderbot-small",["BlenderbotSmallForConditionalGeneration",Ot]]]),Ns=new Map([["bloom",["BloomForCausalLM",yr]],["gpt2",["GPT2LMHeadModel",Cn]],["jais",["JAISLMHeadModel",An]],["gptj",["GPTJForCausalLM",Nn]],["gpt_bigcode",["GPTBigCodeForCausalLM",Gn]],["gpt_neo",["GPTNeoForCausalLM",In]],["gpt_neox",["GPTNeoXForCausalLM",Ln]],["codegen",["CodeGenForCausalLM",Wn]],["llama",["LlamaForCausalLM",Kn]],["cohere",["CohereForCausalLM",Jn]],["gemma",["GemmaForCausalLM",tr]],["gemma2",["Gemma2ForCausalLM",ir]],["openelm",["OpenELMForCausalLM",or]],["qwen2",["Qwen2ForCausalLM",dr]],["phi",["PhiForCausalLM",hr]],["phi3",["Phi3ForCausalLM",gr]],["mpt",["MptForCausalLM",xr]],["opt",["OPTForCausalLM",kr]],["mbart",["MBartForCausalLM",Et]],["mistral",["MistralForCausalLM",Ua]],["starcoder2",["Starcoder2ForCausalLM",Xa]],["falcon",["FalconForCausalLM",Ya]],["trocr",["TrOCRForCausalLM",ja]],["stablelm",["StableLmForCausalLM",ds]]]),Vs=new Map([["bert",["BertForMaskedLM",W]],["roformer",["RoFormerForMaskedLM",ee]],["electra",["ElectraForMaskedLM",pe]],["esm",["EsmForMaskedLM",je]],["convbert",["ConvBertForMaskedLM",se]],["camembert",["CamembertForMaskedLM",we]],["deberta",["DebertaForMaskedLM",Te]],["deberta-v2",["DebertaV2ForMaskedLM",Pe]],["mpnet",["MPNetForMaskedLM",Je]],["albert",["AlbertForMaskedLM",ct]],["distilbert",["DistilBertForMaskedLM",Re]],["roberta",["RobertaForMaskedLM",Dt]],["xlm",["XLMWithLMHeadModel",qt]],["xlm-roberta",["XLMRobertaForMaskedLM",Qt]],["mobilebert",["MobileBertForMaskedLM",He]],["squeezebert",["SqueezeBertForMaskedLM",it]]]),js=new Map([["bert",["BertForQuestionAnswering",K]],["roformer",["RoFormerForQuestionAnswering",re]],["electra",["ElectraForQuestionAnswering",fe]],["convbert",["ConvBertForQuestionAnswering",ue]],["camembert",["CamembertForQuestionAnswering",ve]],["deberta",["DebertaForQuestionAnswering",Se]],["deberta-v2",["DebertaV2ForQuestionAnswering",ze]],["mpnet",["MPNetForQuestionAnswering",tt]],["albert",["AlbertForQuestionAnswering",dt]],["distilbert",["DistilBertForQuestionAnswering",De]],["roberta",["RobertaForQuestionAnswering",Vt]],["xlm",["XLMForQuestionAnswering",Ht]],["xlm-roberta",["XLMRobertaForQuestionAnswering",Zt]],["mobilebert",["MobileBertForQuestionAnswering",Ke]],["squeezebert",["SqueezeBertForQuestionAnswering",st]]]),Gs=new Map([["vision-encoder-decoder",["VisionEncoderDecoderModel",on]]]),qs=new Map([["llava",["LlavaForConditionalGeneration",un]],["moondream1",["Moondream1ForConditionalGeneration",dn]],["florence2",["Florence2ForConditionalGeneration",pn]]]),Us=new Map([["vision-encoder-decoder",["VisionEncoderDecoderModel",on]]]),Ws=new Map([["vit",["ViTForImageClassification",Cr]],["fastvit",["FastViTForImageClassification",Ar]],["mobilevit",["MobileViTForImageClassification",Br]],["mobilevitv2",["MobileViTV2ForImageClassification",Rr]],["beit",["BeitForImageClassification",Xr]],["deit",["DeiTForImageClassification",ci]],["convnext",["ConvNextForImageClassification",Li]],["convnextv2",["ConvNextV2ForImageClassification",Ni]],["dinov2",["Dinov2ForImageClassification",Gi]],["resnet",["ResNetForImageClassification",mi]],["swin",["SwinForImageClassification",_i]],["segformer",["SegformerForImageClassification",ss]],["efficientnet",["EfficientNetForImageClassification",hs]],["mobilenet_v1",["MobileNetV1ForImageClassification",bs]],["mobilenet_v2",["MobileNetV2ForImageClassification",Ms]],["mobilenet_v3",["MobileNetV3ForImageClassification",$s]],["mobilenet_v4",["MobileNetV4ForImageClassification",Es]]]),Hs=new Map([["detr",["DetrForObjectDetection",Yr]],["rt_detr",["RTDetrForObjectDetection",ri]],["table-transformer",["TableTransformerForObjectDetection",oi]],["yolos",["YolosForObjectDetection",Wi]]]),Xs=new Map([["owlvit",["OwlViTForObjectDetection",jr]],["owlv2",["Owlv2ForObjectDetection",Ur]]]),Ks=new Map([["detr",["DetrForSegmentation",Jr]],["clipseg",["CLIPSegForImageSegmentation",kn]]]),Qs=new Map([["segformer",["SegformerForSemanticSegmentation",os]],["sapiens",["SapiensForSemanticSegmentation",Si]]]),Ys=new Map([["sam",["SamModel",Ki]]]),Js=new Map([["wav2vec2",["Wav2Vec2ForCTC",aa]],["wav2vec2-bert",["Wav2Vec2BertForCTC",Ta]],["unispeech",["UniSpeechForCTC",fa]],["unispeech-sat",["UniSpeechSatForCTC",ya]],["wavlm",["WavLMForCTC",Fa]],["hubert",["HubertForCTC",Ca]]]),Zs=new Map([["wav2vec2",["Wav2Vec2ForSequenceClassification",sa]],["wav2vec2-bert",["Wav2Vec2BertForSequenceClassification",ka]],["unispeech",["UniSpeechForSequenceClassification",ga]],["unispeech-sat",["UniSpeechSatForSequenceClassification",ba]],["wavlm",["WavLMForSequenceClassification",za]],["hubert",["HubertForSequenceClassification",Ea]],["audio-spectrogram-transformer",["ASTForAudioClassification",nn]]]),eo=new Map([["wavlm",["WavLMForXVector",Ia]]]),to=new Map([["unispeech-sat",["UniSpeechSatForAudioFrameClassification",va]],["wavlm",["WavLMForAudioFrameClassification",Oa]],["wav2vec2",["Wav2Vec2ForAudioFrameClassification",oa]],["pyannote",["PyAnnoteForAudioFrameClassification",da]]]),no=new Map([["vitmatte",["VitMatteForImageMatting",zr]]]),ro=new Map([["swin2sr",["Swin2SRForImageSuperResolution",bi]]]),io=new Map([["dpt",["DPTForDepthEstimation",Mi]],["depth_anything",["DepthAnythingForDepthEstimation",ki]],["glpn",["GLPNForDepthEstimation",Fi]],["sapiens",["SapiensForDepthEstimation",Ci]]]),ao=new Map([["sapiens",["SapiensForNormalEstimation",Ei]]]),so=new Map([["clip",["CLIPVisionModelWithProjection",gn]],["siglip",["SiglipVisionModel",bn]]]),oo=[[As,w],[Fs,y],[zs,x],[Ls,w],[Ds,w],[Rs,b],[Is,b],[Ns,x],[Vs,w],[js,w],[Gs,v],[qs,T],[Ws,w],[Ks,w],[Qs,w],[no,w],[ro,w],[io,w],[ao,w],[Hs,w],[Xs,w],[Ys,M],[Js,w],[Zs,w],[Os,b],[Bs,w],[eo,w],[to,w],[so,w]];for(const[e,t]of oo)for(const[n,r]of e.values())$.set(n,t),C.set(r,n),S.set(n,r);const lo=[["MusicgenForConditionalGeneration",_s,k],["CLIPTextModelWithProjection",fn,w],["SiglipTextModel",yn,w],["ClapTextModelWithProjection",es,w],["ClapAudioModelWithProjection",ts,w]];for(const[e,t,n]of lo)$.set(e,n),C.set(t,e),S.set(e,t);class uo extends Ps{static MODEL_CLASS_MAPPINGS=oo.map((e=>e[0]));static BASE_IF_FAIL=!0}class co extends Ps{static MODEL_CLASS_MAPPINGS=[Ls]}class po extends Ps{static MODEL_CLASS_MAPPINGS=[Ds]}class ho extends Ps{static MODEL_CLASS_MAPPINGS=[Rs]}class mo extends Ps{static MODEL_CLASS_MAPPINGS=[Is]}class fo extends Ps{static MODEL_CLASS_MAPPINGS=[Os]}class go extends Ps{static MODEL_CLASS_MAPPINGS=[Bs]}class _o extends Ps{static MODEL_CLASS_MAPPINGS=[Ns]}class wo extends Ps{static MODEL_CLASS_MAPPINGS=[Vs]}class yo extends Ps{static MODEL_CLASS_MAPPINGS=[js]}class bo extends Ps{static MODEL_CLASS_MAPPINGS=[Gs]}class vo extends Ps{static MODEL_CLASS_MAPPINGS=[Ws]}class xo extends Ps{static MODEL_CLASS_MAPPINGS=[Ks]}class Mo extends Ps{static MODEL_CLASS_MAPPINGS=[Qs]}class To extends Ps{static MODEL_CLASS_MAPPINGS=[Hs]}class ko extends Ps{static MODEL_CLASS_MAPPINGS=[Xs]}class $o extends Ps{static MODEL_CLASS_MAPPINGS=[Ys]}class So extends Ps{static MODEL_CLASS_MAPPINGS=[Js]}class Co extends Ps{static MODEL_CLASS_MAPPINGS=[Zs]}class Eo extends Ps{static MODEL_CLASS_MAPPINGS=[eo]}class Po extends Ps{static MODEL_CLASS_MAPPINGS=[to]}class Ao extends Ps{static MODEL_CLASS_MAPPINGS=[Us]}class Fo extends Ps{static MODEL_CLASS_MAPPINGS=[no]}class zo extends Ps{static MODEL_CLASS_MAPPINGS=[ro]}class Io extends Ps{static MODEL_CLASS_MAPPINGS=[io]}class Oo extends Ps{static MODEL_CLASS_MAPPINGS=[ao]}class Bo extends Ps{static MODEL_CLASS_MAPPINGS=[so]}class Lo extends j{constructor({logits:e,past_key_values:t,encoder_outputs:n,decoder_attentions:r=null,cross_attentions:i=null}){super(),this.logits=e,this.past_key_values=t,this.encoder_outputs=n,this.decoder_attentions=r,this.cross_attentions=i}}class Do extends j{constructor({logits:e}){super(),this.logits=e}}class Ro extends j{constructor({logits:e,embeddings:t}){super(),this.logits=e,this.embeddings=t}}class No extends j{constructor({logits:e}){super(),this.logits=e}}class Vo extends j{constructor({logits:e}){super(),this.logits=e}}class jo extends j{constructor({start_logits:e,end_logits:t}){super(),this.start_logits=e,this.end_logits=t}}class Go extends j{constructor({logits:e}){super(),this.logits=e}}class qo extends j{constructor({logits:e,past_key_values:t}){super(),this.logits=e,this.past_key_values=t}}class Uo extends j{constructor({alphas:e}){super(),this.alphas=e}}class Wo extends j{constructor({waveform:e,spectrogram:t}){super(),this.waveform=e,this.spectrogram=t}}},"./src/models/whisper/common_whisper.js":
176
176
  /*!**********************************************!*\
177
177
  !*** ./src/models/whisper/common_whisper.js ***!
178
178
  \**********************************************/(e,t,n)=>{n.r(t),n.d(t,{WHISPER_LANGUAGE_MAPPING:()=>i,WHISPER_TO_LANGUAGE_CODE_MAPPING:()=>a,whisper_language_to_code:()=>s});const r=[["en","english"],["zh","chinese"],["de","german"],["es","spanish"],["ru","russian"],["ko","korean"],["fr","french"],["ja","japanese"],["pt","portuguese"],["tr","turkish"],["pl","polish"],["ca","catalan"],["nl","dutch"],["ar","arabic"],["sv","swedish"],["it","italian"],["id","indonesian"],["hi","hindi"],["fi","finnish"],["vi","vietnamese"],["he","hebrew"],["uk","ukrainian"],["el","greek"],["ms","malay"],["cs","czech"],["ro","romanian"],["da","danish"],["hu","hungarian"],["ta","tamil"],["no","norwegian"],["th","thai"],["ur","urdu"],["hr","croatian"],["bg","bulgarian"],["lt","lithuanian"],["la","latin"],["mi","maori"],["ml","malayalam"],["cy","welsh"],["sk","slovak"],["te","telugu"],["fa","persian"],["lv","latvian"],["bn","bengali"],["sr","serbian"],["az","azerbaijani"],["sl","slovenian"],["kn","kannada"],["et","estonian"],["mk","macedonian"],["br","breton"],["eu","basque"],["is","icelandic"],["hy","armenian"],["ne","nepali"],["mn","mongolian"],["bs","bosnian"],["kk","kazakh"],["sq","albanian"],["sw","swahili"],["gl","galician"],["mr","marathi"],["pa","punjabi"],["si","sinhala"],["km","khmer"],["sn","shona"],["yo","yoruba"],["so","somali"],["af","afrikaans"],["oc","occitan"],["ka","georgian"],["be","belarusian"],["tg","tajik"],["sd","sindhi"],["gu","gujarati"],["am","amharic"],["yi","yiddish"],["lo","lao"],["uz","uzbek"],["fo","faroese"],["ht","haitian creole"],["ps","pashto"],["tk","turkmen"],["nn","nynorsk"],["mt","maltese"],["sa","sanskrit"],["lb","luxembourgish"],["my","myanmar"],["bo","tibetan"],["tl","tagalog"],["mg","malagasy"],["as","assamese"],["tt","tatar"],["haw","hawaiian"],["ln","lingala"],["ha","hausa"],["ba","bashkir"],["jw","javanese"],["su","sundanese"]],i=new Map(r),a=new Map([...r.map((([e,t])=>[t,e])),["burmese","my"],["valencian","ca"],["flemish","nl"],["haitian","ht"],["letzeburgesch","lb"],["pushto","ps"],["panjabi","pa"],["moldavian","ro"],["moldovan","ro"],["sinhalese","si"],["castilian","es"]]);function s(e){e=e.toLowerCase();let t=a.get(e);if(void 0===t){if(!i.has(e)){const t=2===e.length?i.keys():i.values();throw new Error(`Language "${e}" is not supported. Must be one of: ${JSON.stringify(t)}`)}t=e}return t}},"./src/models/whisper/generation_whisper.js":
@@ -223,8 +223,8 @@ var r,i,a,s,o,l,u,d,c,p,h,m,f,g,_,w,y,b,v,x,M,T,k,$,S,C,E,P,A,F,z,I,O,B=Object.d
223
223
  \****************************/(e,t,n)=>{function r(e,[t,n,r],[i,a],s="bilinear",o=!1){const l=a/r,u=i/n,d=new e.constructor(i*a*t),c=n*r,p=i*a;for(let s=0;s<i;++s)for(let i=0;i<a;++i){const o=s*a+i,h=(i+.5)/l-.5,m=(s+.5)/u-.5;let f=Math.floor(h),g=Math.floor(m);const _=Math.min(f+1,r-1),w=Math.min(g+1,n-1);f=Math.max(f,0),g=Math.max(g,0);const y=h-f,b=m-g,v=(1-y)*(1-b),x=y*(1-b),M=(1-y)*b,T=y*b,k=g*r,$=w*r,S=k+f,C=k+_,E=$+f,P=$+_;for(let n=0;n<t;++n){const t=n*c;d[n*p+o]=v*e[t+S]+x*e[t+C]+M*e[t+E]+T*e[t+P]}}return d}function i(e,t,n){const r=new Array(n.length),i=new Array(n.length);for(let e=n.length-1,a=1;e>=0;--e)i[e]=a,r[e]=t[n[e]],a*=r[e];const a=n.map(((e,t)=>i[n.indexOf(t)])),s=new e.constructor(e.length);for(let n=0;n<e.length;++n){let r=0;for(let e=t.length-1,i=n;e>=0;--e)r+=i%t[e]*a[e],i=Math.floor(i/t[e]);s[r]=e[n]}return[s,r]}function a(e){const t=c(e)[0],n=e.map((e=>Math.exp(e-t))),r=n.reduce(((e,t)=>e+t),0);return n.map((e=>e/r))}function s(e){return a(e).map((e=>Math.log(e)))}function o(e,t){let n=0;for(let r=0;r<e.length;++r)n+=e[r]*t[r];return n}function l(e,t){return o(e,t)/(u(e)*u(t))}function u(e){return Math.sqrt(e.reduce(((e,t)=>e+t*t),0))}function d(e){if(0===e.length)throw Error("Array must not be empty");let t=e[0],n=0;for(let r=1;r<e.length;++r)e[r]<t&&(t=e[r],n=r);return[t,n]}function c(e){if(0===e.length)throw Error("Array must not be empty");let t=e[0],n=0;for(let r=1;r<e.length;++r)e[r]>t&&(t=e[r],n=r);return[Number(t),n]}function p(e){return e>0&&!(e&e-1)}n.r(t),n.d(t,{FFT:()=>f,bankers_round:()=>w,cos_sim:()=>l,dot:()=>o,dynamic_time_warping:()=>y,interpolate_data:()=>r,log_softmax:()=>s,magnitude:()=>u,max:()=>c,medianFilter:()=>g,min:()=>d,permute_data:()=>i,round:()=>_,softmax:()=>a});class h{constructor(e){if(this.size=0|e,this.size<=1||!p(this.size))throw new Error("FFT size must be a power of two larger than 1");this._csize=e<<1,this.table=new Float64Array(2*this.size);for(let e=0;e<this.table.length;e+=2){const t=Math.PI*e/this.size;this.table[e]=Math.cos(t),this.table[e+1]=-Math.sin(t)}let t=0;for(let e=1;this.size>e;e<<=1)++t;this._width=t%2==0?t-1:t,this._bitrev=new Int32Array(1<<this._width);for(let e=0;e<this._bitrev.length;++e){this._bitrev[e]=0;for(let t=0;t<this._width;t+=2){const n=this._width-t-2;this._bitrev[e]|=(e>>>t&3)<<n}}}createComplexArray(){return new Float64Array(this._csize)}fromComplexArray(e,t){const n=t||new Array(e.length>>>1);for(let t=0;t<e.length;t+=2)n[t>>>1]=e[t];return n}toComplexArray(e,t){const n=t||this.createComplexArray();for(let t=0;t<n.length;t+=2)n[t]=e[t>>>1],n[t+1]=0;return n}transform(e,t){if(e===t)throw new Error("Input and output buffers must be different");this._transform4(e,t,1)}realTransform(e,t){if(e===t)throw new Error("Input and output buffers must be different");this._realTransform4(e,t,1)}inverseTransform(e,t){if(e===t)throw new Error("Input and output buffers must be different");this._transform4(e,t,-1);for(let t=0;t<e.length;++t)e[t]/=this.size}_transform4(e,t,n){const r=this._csize;let i,a,s=1<<this._width,o=r/s<<1;const l=this._bitrev;if(4===o)for(i=0,a=0;i<r;i+=o,++a){const n=l[a];this._singleTransform2(t,e,i,n,s)}else for(i=0,a=0;i<r;i+=o,++a){const r=l[a];this._singleTransform4(t,e,i,r,s,n)}const u=this.table;for(s>>=2;s>=2;s>>=2){o=r/s<<1;const t=o>>>2;for(i=0;i<r;i+=o){const r=i+t-1;for(let a=i,o=0;a<r;a+=2,o+=s){const r=a,i=r+t,s=i+t,l=s+t,d=e[r],c=e[r+1],p=e[i],h=e[i+1],m=e[s],f=e[s+1],g=e[l],_=e[l+1],w=u[o],y=n*u[o+1],b=p*w-h*y,v=p*y+h*w,x=u[2*o],M=n*u[2*o+1],T=m*x-f*M,k=m*M+f*x,$=u[3*o],S=n*u[3*o+1],C=g*$-_*S,E=g*S+_*$,P=d+T,A=c+k,F=d-T,z=c-k,I=b+C,O=v+E,B=n*(b-C),L=n*(v-E);e[r]=P+I,e[r+1]=A+O,e[i]=F+L,e[i+1]=z-B,e[s]=P-I,e[s+1]=A-O,e[l]=F-L,e[l+1]=z+B}}}}_singleTransform2(e,t,n,r,i){const a=e[r],s=e[r+1],o=e[r+i],l=e[r+i+1];t[n]=a+o,t[n+1]=s+l,t[n+2]=a-o,t[n+3]=s-l}_singleTransform4(e,t,n,r,i,a){const s=2*i,o=3*i,l=e[r],u=e[r+1],d=e[r+i],c=e[r+i+1],p=e[r+s],h=e[r+s+1],m=e[r+o],f=e[r+o+1],g=l+p,_=u+h,w=l-p,y=u-h,b=d+m,v=c+f,x=a*(d-m),M=a*(c-f);t[n]=g+b,t[n+1]=_+v,t[n+2]=w+M,t[n+3]=y-x,t[n+4]=g-b,t[n+5]=_-v,t[n+6]=w-M,t[n+7]=y+x}_realTransform4(e,t,n){const r=this._csize;let i,a,s=1<<this._width,o=r/s<<1;const l=this._bitrev;if(4===o)for(i=0,a=0;i<r;i+=o,++a){const n=l[a];this._singleRealTransform2(t,e,i,n>>>1,s>>>1)}else for(i=0,a=0;i<r;i+=o,++a){const r=l[a];this._singleRealTransform4(t,e,i,r>>>1,s>>>1,n)}const u=this.table;for(s>>=2;s>=2;s>>=2){o=r/s<<1;const t=o>>>1,a=t>>>1,l=a>>>1;for(i=0;i<r;i+=o)for(let r=0,o=0;r<=l;r+=2,o+=s){const s=i+r,d=s+a,c=d+a,p=c+a,h=e[s],m=e[s+1],f=e[d],g=e[d+1],_=e[c],w=e[c+1],y=e[p],b=e[p+1],v=h,x=m,M=u[o],T=n*u[o+1],k=f*M-g*T,$=f*T+g*M,S=u[2*o],C=n*u[2*o+1],E=_*S-w*C,P=_*C+w*S,A=u[3*o],F=n*u[3*o+1],z=y*A-b*F,I=y*F+b*A,O=v+E,B=x+P,L=v-E,D=x-P,R=k+z,N=$+I,V=n*(k-z),j=n*($-I);if(e[s]=O+R,e[s+1]=B+N,e[d]=L+j,e[d+1]=D-V,0===r){e[c]=O-R,e[c+1]=B-N;continue}if(r===l)continue;const G=i+a-r,q=i+t-r;e[G]=L-n*j,e[G+1]=-D-n*V,e[q]=O-n*R,e[q+1]=n*N-B}}const d=r>>>1;for(let t=2;t<d;t+=2)e[r-t]=e[t],e[r-t+1]=-e[t+1]}_singleRealTransform2(e,t,n,r,i){const a=e[r],s=e[r+i];t[n]=a+s,t[n+1]=0,t[n+2]=a-s,t[n+3]=0}_singleRealTransform4(e,t,n,r,i,a){const s=2*i,o=3*i,l=e[r],u=e[r+i],d=e[r+s],c=e[r+o],p=l+d,h=l-d,m=u+c,f=a*(u-c);t[n]=p+m,t[n+1]=0,t[n+2]=h,t[n+3]=-f,t[n+4]=p-m,t[n+5]=0,t[n+6]=h,t[n+7]=f}}class m{constructor(e){const t=2*(e-1),n=2*(2*e-1),r=2**Math.ceil(Math.log2(n));this.bufferSize=r,this._a=t;const i=new Float64Array(n),a=new Float64Array(r);this._chirpBuffer=new Float64Array(r),this._buffer1=new Float64Array(r),this._buffer2=new Float64Array(r),this._outBuffer1=new Float64Array(r),this._outBuffer2=new Float64Array(r);const s=-2*Math.PI/e,o=Math.cos(s),l=Math.sin(s);for(let t=0;t<n>>1;++t){const n=(t+1-e)**2/2,r=Math.sqrt(o**2+l**2)**n,s=n*Math.atan2(l,o),u=2*t;i[u]=r*Math.cos(s),i[u+1]=r*Math.sin(s),a[u]=i[u],a[u+1]=-i[u+1]}this._slicedChirpBuffer=i.subarray(t,n),this._f=new h(r>>1),this._f.transform(this._chirpBuffer,a)}_transform(e,t,n){const r=this._buffer1,i=this._buffer2,a=this._outBuffer1,s=this._outBuffer2,o=this._chirpBuffer,l=this._slicedChirpBuffer,u=this._a;if(n)for(let e=0;e<l.length;e+=2){const n=e+1,i=t[e>>1];r[e]=i*l[e],r[n]=i*l[n]}else for(let e=0;e<l.length;e+=2){const n=e+1;r[e]=t[e]*l[e]-t[n]*l[n],r[n]=t[e]*l[n]+t[n]*l[e]}this._f.transform(a,r);for(let e=0;e<o.length;e+=2){const t=e+1;i[e]=a[e]*o[e]-a[t]*o[t],i[t]=a[e]*o[t]+a[t]*o[e]}this._f.inverseTransform(s,i);for(let t=0;t<s.length;t+=2){const n=s[t+u],r=s[t+u+1],i=l[t],a=l[t+1];e[t]=n*i-r*a,e[t+1]=n*a+r*i}}transform(e,t){this._transform(e,t,!1)}realTransform(e,t){this._transform(e,t,!0)}}class f{constructor(e){this.fft_length=e,this.isPowerOfTwo=p(e),this.isPowerOfTwo?(this.fft=new h(e),this.outputBufferSize=2*e):(this.fft=new m(e),this.outputBufferSize=this.fft.bufferSize)}realTransform(e,t){this.fft.realTransform(e,t)}transform(e,t){this.fft.transform(e,t)}}function g(e,t){if(t%2==0||t<=0)throw new Error("Window size must be a positive odd number");const n=new e.constructor(e.length),r=new e.constructor(t),i=Math.floor(t/2);for(let t=0;t<e.length;++t){let a=0;for(let n=-i;n<=i;++n){let i=t+n;i<0?i=Math.abs(i):i>=e.length&&(i=2*(e.length-1)-i),r[a++]=e[i]}r.sort(),n[t]=r[i]}return n}function _(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}function w(e){const t=Math.round(e);return Math.abs(e)%1==.5?t%2==0?t:t-1:t}function y(e){const t=e.length,n=e[0].length,r=[t+1,n+1],i=Array.from({length:r[0]},(()=>Array(r[1]).fill(1/0)));i[0][0]=0;const a=Array.from({length:r[0]},(()=>Array(r[1]).fill(-1)));for(let t=1;t<r[1];++t)for(let n=1;n<r[0];++n){const r=i[n-1][t-1],s=i[n-1][t],o=i[n][t-1];let l,u;r<s&&r<o?(l=r,u=0):s<r&&s<o?(l=s,u=1):(l=o,u=2),i[n][t]=e[n-1][t-1]+l,a[n][t]=u}for(let e=0;e<r[1];++e)a[0][e]=2;for(let e=0;e<r[0];++e)a[e][0]=1;let s=t,o=n,l=[],u=[];for(;s>0||o>0;)switch(l.push(s-1),u.push(o-1),a[s][o]){case 0:--s,--o;break;case 1:--s;break;case 2:--o;break;default:throw new Error(`Internal error in dynamic time warping. Unexpected trace[${s}, ${o}]. Please file a bug report.`)}return l.reverse(),u.reverse(),[l,u]}},"./src/utils/tensor.js":
224
224
  /*!*****************************!*\
225
225
  !*** ./src/utils/tensor.js ***!
226
- \*****************************/(e,t,n)=>{n.r(t),n.d(t,{Tensor:()=>o,cat:()=>y,full:()=>T,full_like:()=>k,interpolate:()=>u,interpolate_4d:()=>d,layer_norm:()=>f,matmul:()=>c,mean:()=>x,mean_pooling:()=>m,ones:()=>$,ones_like:()=>S,permute:()=>l,quantize_embeddings:()=>P,rfft:()=>p,stack:()=>b,std_mean:()=>v,topk:()=>h,zeros:()=>C,zeros_like:()=>E});var r=n(/*! ./maths.js */"./src/utils/maths.js"),i=n(/*! ../backends/onnx.js */"./src/backends/onnx.js"),a=n(/*! ../ops/registry.js */"./src/ops/registry.js");const s=Object.freeze({float32:Float32Array,float16:Uint16Array,float64:Float64Array,string:Array,int8:Int8Array,uint8:Uint8Array,int16:Int16Array,uint16:Uint16Array,int32:Int32Array,uint32:Uint32Array,int64:BigInt64Array,uint64:BigUint64Array,bool:Uint8Array});class o{get dims(){return this.ort_tensor.dims}set dims(e){this.ort_tensor.dims=e}get type(){return this.ort_tensor.type}get data(){return this.ort_tensor.data}get size(){return this.ort_tensor.size}get location(){return this.ort_tensor.location}ort_tensor;constructor(...e){return(0,i.isONNXTensor)(e[0])?this.ort_tensor=e[0]:this.ort_tensor=new i.Tensor(e[0],e[1],e[2]),new Proxy(this,{get:(e,t)=>{if("string"==typeof t){let n=Number(t);if(Number.isInteger(n))return e._getitem(n)}return e[t]},set:(e,t,n)=>e[t]=n})}dispose(){this.ort_tensor.dispose()}*[Symbol.iterator](){const[e,...t]=this.dims;if(t.length>0){const n=t.reduce(((e,t)=>e*t));for(let r=0;r<e;++r)yield this._subarray(r,n,t)}else yield*this.data}_getitem(e){const[t,...n]=this.dims;if(e=w(e,t),n.length>0){const t=n.reduce(((e,t)=>e*t));return this._subarray(e,t,n)}return new o(this.type,[this.data[e]],n)}indexOf(e){const t=this.data;for(let n=0;n<t.length;++n)if(t[n]==e)return n;return-1}_subarray(e,t,n){const r=e*t,i=(e+1)*t,a="subarray"in this.data?this.data.subarray(r,i):this.data.slice(r,i);return new o(this.type,a,n)}item(){const e=this.data;if(1!==e.length)throw new Error(`a Tensor with ${e.length} elements cannot be converted to Scalar`);return e[0]}tolist(){return function(e,t){const n=e.length,r=t.reduce(((e,t)=>e*t));if(n!==r)throw Error(`cannot reshape array of size ${n} into shape (${t})`);let i=e;for(let e=t.length-1;e>=0;e--)i=i.reduce(((n,r)=>{let i=n[n.length-1];return i.length<t[e]?i.push(r):n.push([r]),n}),[[]]);return i[0]}(this.data,this.dims)}sigmoid(){return this.clone().sigmoid_()}sigmoid_(){const e=this.data;for(let t=0;t<e.length;++t)e[t]=1/(1+Math.exp(-e[t]));return this}mul(e){return this.clone().mul_(e)}mul_(e){const t=this.data;for(let n=0;n<t.length;++n)t[n]*=e;return this}div(e){return this.clone().div_(e)}div_(e){const t=this.data;for(let n=0;n<t.length;++n)t[n]/=e;return this}add(e){return this.clone().add_(e)}add_(e){const t=this.data;for(let n=0;n<t.length;++n)t[n]+=e;return this}clone(){return new o(this.type,this.data.slice(),this.dims.slice())}slice(...e){const t=[],n=[];for(let r=0;r<this.dims.length;++r){let i=e[r];if(null==i)n.push([0,this.dims[r]]),t.push(this.dims[r]);else if("number"==typeof i)i=w(i,this.dims[r],r),n.push([i,i+1]);else{if(!Array.isArray(i)||2!==i.length)throw new Error(`Invalid slice: ${i}`);{let[e,a]=i;if(e=null===e?0:w(e,this.dims[r],r,!1),a=null===a?this.dims[r]:w(a,this.dims[r],r,!1),e>a)throw new Error(`Invalid slice: ${i}`);const s=[Math.max(e,0),Math.min(a,this.dims[r])];n.push(s),t.push(s[1]-s[0])}}}const r=n.map((([e,t])=>t-e)),i=r.reduce(((e,t)=>e*t)),a=this.data,s=new a.constructor(i),l=this.stride();for(let e=0;e<i;++e){let t=0;for(let i=r.length-1,a=e;i>=0;--i){const e=r[i];t+=(a%e+n[i][0])*l[i],a=Math.floor(a/e)}s[e]=a[t]}return new o(this.type,s,t)}permute(...e){return l(this,e)}transpose(...e){return this.permute(...e)}sum(e=null,t=!1){return this.norm(1,e,t)}norm(e="fro",t=null,n=!1){if("fro"===e)e=2;else if("string"==typeof e)throw Error(`Unsupported norm: ${e}`);const r=this.data;if(null===t){let t=r.reduce(((t,n)=>t+n**e),0)**(1/e);return new o(this.type,[t],[])}t=w(t,this.dims.length);const i=this.dims.slice();i[t]=1;const a=new r.constructor(r.length/this.dims[t]);for(let n=0;n<r.length;++n){let s=0;for(let e=this.dims.length-1,r=n,a=1;e>=0;--e){const n=this.dims[e];if(e!==t){s+=r%n*a,a*=i[e]}r=Math.floor(r/n)}a[s]+=r[n]**e}if(1!==e)for(let t=0;t<a.length;++t)a[t]=a[t]**(1/e);return n||i.splice(t,1),new o(this.type,a,i)}normalize_(e=2,t=1){t=w(t,this.dims.length);const n=this.norm(e,t,!0),r=this.data,i=n.data;for(let e=0;e<r.length;++e){let n=0;for(let r=this.dims.length-1,i=e,a=1;r>=0;--r){const e=this.dims[r];if(r!==t){n+=i%e*a,a*=this.dims[r]}i=Math.floor(i/e)}r[e]/=i[n]}return this}normalize(e=2,t=1){return this.clone().normalize_(e,t)}stride(){return function(e){const t=new Array(e.length);for(let n=e.length-1,r=1;n>=0;--n)t[n]=r,r*=e[n];return t}(this.dims)}squeeze(e=null){return new o(this.type,this.data,g(this.dims,e))}squeeze_(e=null){return this.dims=g(this.dims,e),this}unsqueeze(e=null){return new o(this.type,this.data,_(this.dims,e))}unsqueeze_(e=null){return this.dims=_(this.dims,e),this}flatten_(e=0,t=-1){t=(t+this.dims.length)%this.dims.length;let n=this.dims.slice(0,e),r=this.dims.slice(e,t+1),i=this.dims.slice(t+1);return this.dims=[...n,r.reduce(((e,t)=>e*t),1),...i],this}flatten(e=0,t=-1){return this.clone().flatten_(e,t)}view(...e){let t=-1;for(let n=0;n<e.length;++n)if(-1===e[n]){if(-1!==t)throw new Error("Only one dimension can be inferred");t=n}const n=this.data;if(-1!==t){const r=e.reduce(((e,n,r)=>r!==t?e*n:e),1);e[t]=n.length/r}return new o(this.type,n,e)}neg_(){const e=this.data;for(let t=0;t<e.length;++t)e[t]=-e[t];return this}neg(){return this.clone().neg_()}clamp_(e,t){const n=this.data;for(let r=0;r<n.length;++r)n[r]=Math.min(Math.max(n[r],e),t);return this}clamp(e,t){return this.clone().clamp_(e,t)}round_(){const e=this.data;for(let t=0;t<e.length;++t)e[t]=Math.round(e[t]);return this}round(){return this.clone().round_()}mean(e=null,t=!1){return x(this,e,t)}to(e){if(this.type===e)return this;if(!s.hasOwnProperty(e))throw new Error(`Unsupported type: ${e}`);return new o(e,s[e].from(this.data),this.dims)}}function l(e,t){const[n,i]=(0,r.permute_data)(e.data,e.dims,t);return new o(e.type,n,i)}function u(e,[t,n],i="bilinear",a=!1){const s=e.dims.at(-3)??1,l=e.dims.at(-2),u=e.dims.at(-1);let d=(0,r.interpolate_data)(e.data,[s,l,u],[t,n],i,a);return new o(e.type,d,[s,t,n])}async function d(e,{size:t=null,mode:n="bilinear"}={}){if(4!==e.dims.length)throw new Error("`interpolate_4d` currently only supports 4D input.");if(!t)throw new Error("`interpolate_4d` requires a `size` argument.");let r,i;if(2===t.length)r=[...e.dims.slice(0,2),...t];else if(3===t.length)r=[e.dims[0],...t];else{if(4!==t.length)throw new Error("`size` must be of length 2, 3, or 4.");r=t}if("bilinear"===n)i=await a.TensorOpRegistry.bilinear_interpolate_4d;else{if("bicubic"!==n)throw new Error(`Unsupported mode: ${n}`);i=await a.TensorOpRegistry.bicubic_interpolate_4d}const s=new o("int64",new BigInt64Array(r.map(BigInt)),[r.length]);return await i({x:e,s})}async function c(e,t){const n=await a.TensorOpRegistry.matmul;return await n({a:e,b:t})}async function p(e,t){const n=await a.TensorOpRegistry.rfft;return await n({x:e,a:t})}async function h(e,t){const n=await a.TensorOpRegistry.top_k;return t=null===t?e.dims.at(-1):Math.min(t,e.dims.at(-1)),await n({x:e,k:new o("int64",[BigInt(t)],[1])})}function m(e,t){const n=e.data,r=t.data,i=[e.dims[0],e.dims[2]],a=new n.constructor(i[0]*i[1]),[s,l,u]=e.dims;let d=0;for(let e=0;e<s;++e){const t=e*u*l;for(let i=0;i<u;++i){let s=0,o=0;const c=e*l,p=t+i;for(let e=0;e<l;++e){const t=Number(r[c+e]);o+=t,s+=n[p+e*u]*t}const h=s/o;a[d++]=h}}return new o(e.type,a,i)}function f(e,t,{eps:n=1e-5}={}){if(2!==e.dims.length)throw new Error("`layer_norm` currently only supports 2D input.");const[r,i]=e.dims;if(1!==t.length&&t[0]!==i)throw new Error("`normalized_shape` must be a 1D array with shape `[input.dims[1]]`.");const[a,s]=v(e,1,0,!0),l=a.data,u=s.data,d=e.data,c=new d.constructor(d.length);for(let e=0;e<r;++e){const t=e*i;for(let r=0;r<i;++r){const i=t+r;c[i]=(d[i]-u[e])/(l[e]+n)}}return new o(e.type,c,e.dims)}function g(e,t){return e=e.slice(),null===t?e=e.filter((e=>1!==e)):"number"==typeof t?1===e[t]&&e.splice(t,1):Array.isArray(t)&&(e=e.filter(((e,n)=>1!==e||!t.includes(n)))),e}function _(e,t){return t=w(t,e.length+1),(e=e.slice()).splice(t,0,1),e}function w(e,t,n=null,r=!0){if(r&&(e<-t||e>=t))throw new Error(`IndexError: index ${e} is out of bounds for dimension${null===n?"":" "+n} with size ${t}`);return e<0&&(e=(e%t+t)%t),e}function y(e,t=0){t=w(t,e[0].dims.length);const n=e[0].dims.slice();n[t]=e.reduce(((e,n)=>e+n.dims[t]),0);const r=n.reduce(((e,t)=>e*t),1),i=new e[0].data.constructor(r),a=e[0].type;if(0===t){let t=0;for(const n of e){const e=n.data;i.set(e,t),t+=e.length}}else{let r=0;for(let a=0;a<e.length;++a){const{data:s,dims:o}=e[a];for(let e=0;e<s.length;++e){let a=0;for(let i=o.length-1,s=e,l=1;i>=0;--i){const e=o[i];let u=s%e;i===t&&(u+=r),a+=u*l,l*=n[i],s=Math.floor(s/e)}i[a]=s[e]}r+=o[t]}}return new o(a,i,n)}function b(e,t=0){return y(e.map((e=>e.unsqueeze(t))),t)}function v(e,t=null,n=1,r=!1){const i=e.data,a=e.dims;if(null===t){const t=i.reduce(((e,t)=>e+t),0)/i.length,r=Math.sqrt(i.reduce(((e,n)=>e+(n-t)**2),0)/(i.length-n)),a=new o(e.type,[t],[]);return[new o(e.type,[r],[]),a]}const s=x(e,t=w(t,a.length),r),l=s.data,u=a.slice();u[t]=1;const d=new i.constructor(i.length/a[t]);for(let e=0;e<i.length;++e){let n=0;for(let r=a.length-1,i=e,s=1;r>=0;--r){const e=a[r];if(r!==t){n+=i%e*s,s*=u[r]}i=Math.floor(i/e)}d[n]+=(i[e]-l[n])**2}for(let e=0;e<d.length;++e)d[e]=Math.sqrt(d[e]/(a[t]-n));r||u.splice(t,1);return[new o(e.type,d,u),s]}function x(e,t=null,n=!1){const r=e.data;if(null===t){const t=r.reduce(((e,t)=>e+t),0);return new o(e.type,[t/r.length],[])}const i=e.dims;t=w(t,i.length);const a=i.slice();a[t]=1;const s=new r.constructor(r.length/i[t]);for(let e=0;e<r.length;++e){let n=0;for(let r=i.length-1,s=e,o=1;r>=0;--r){const e=i[r];if(r!==t){n+=s%e*o,o*=a[r]}s=Math.floor(s/e)}s[n]+=r[e]}if(1!==i[t])for(let e=0;e<s.length;++e)s[e]=s[e]/i[t];return n||a.splice(t,1),new o(e.type,s,a)}function M(e,t,n,r){const i=e.reduce(((e,t)=>e*t),1);return new o(n,new r(i).fill(t),e)}function T(e,t){let n,r;if("number"==typeof t)n="float32",r=Float32Array;else{if("bigint"!=typeof t)throw new Error("Unsupported data type: "+typeof t);n="int64",r=BigInt64Array}return M(e,t,n,r)}function k(e,t){return T(e.dims,t)}function $(e){return M(e,1n,"int64",BigInt64Array)}function S(e){return $(e.dims)}function C(e){return M(e,0n,"int64",BigInt64Array)}function E(e){return C(e.dims)}function P(e,t){if(2!==e.dims.length)throw new Error("The tensor must have 2 dimensions");if(e.dims.at(-1)%8!=0)throw new Error("The last dimension of the tensor must be a multiple of 8");if(!["binary","ubinary"].includes(t))throw new Error("The precision must be either 'binary' or 'ubinary'");const n="binary"===t,r=n?"int8":"uint8",i=n?Int8Array:Uint8Array,a=e.data,s=new i(a.length/8);for(let e=0;e<a.length;++e){const t=a[e]>0?1:0,r=Math.floor(e/8),i=e%8;s[r]|=t<<7-i,n&&0===i&&(s[r]-=128)}return new o(r,s,[e.dims[0],e.dims[1]/8])}}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={exports:{}};return n[e](a,a.exports,i),a.exports}i.m=n,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var a=Object.create(null);i.r(a);var s={};e=e||[null,t({}),t([]),t(t)];for(var o=2&r&&n;"object"==typeof o&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach((e=>s[e]=()=>n[e]));return s.default=()=>n,i.d(a,s),a},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;if("string"==typeof import.meta.url&&(e=import.meta.url),!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),i.b=new URL("./",import.meta.url);var a={};
226
+ \*****************************/(e,t,n)=>{n.r(t),n.d(t,{Tensor:()=>o,cat:()=>y,full:()=>T,full_like:()=>k,interpolate:()=>u,interpolate_4d:()=>d,layer_norm:()=>f,matmul:()=>c,mean:()=>x,mean_pooling:()=>m,ones:()=>$,ones_like:()=>S,permute:()=>l,quantize_embeddings:()=>P,rfft:()=>p,stack:()=>b,std_mean:()=>v,topk:()=>h,zeros:()=>C,zeros_like:()=>E});var r=n(/*! ./maths.js */"./src/utils/maths.js"),i=n(/*! ../backends/onnx.js */"./src/backends/onnx.js"),a=n(/*! ../ops/registry.js */"./src/ops/registry.js");const s=Object.freeze({float32:Float32Array,float16:Uint16Array,float64:Float64Array,string:Array,int8:Int8Array,uint8:Uint8Array,int16:Int16Array,uint16:Uint16Array,int32:Int32Array,uint32:Uint32Array,int64:BigInt64Array,uint64:BigUint64Array,bool:Uint8Array});class o{get dims(){return this.ort_tensor.dims}set dims(e){this.ort_tensor.dims=e}get type(){return this.ort_tensor.type}get data(){return this.ort_tensor.data}get size(){return this.ort_tensor.size}get location(){return this.ort_tensor.location}ort_tensor;constructor(...e){return(0,i.isONNXTensor)(e[0])?this.ort_tensor=e[0]:this.ort_tensor=new i.Tensor(e[0],e[1],e[2]),new Proxy(this,{get:(e,t)=>{if("string"==typeof t){let n=Number(t);if(Number.isInteger(n))return e._getitem(n)}return e[t]},set:(e,t,n)=>e[t]=n})}dispose(){this.ort_tensor.dispose()}*[Symbol.iterator](){const[e,...t]=this.dims;if(t.length>0){const n=t.reduce(((e,t)=>e*t));for(let r=0;r<e;++r)yield this._subarray(r,n,t)}else yield*this.data}_getitem(e){const[t,...n]=this.dims;if(e=w(e,t),n.length>0){const t=n.reduce(((e,t)=>e*t));return this._subarray(e,t,n)}return new o(this.type,[this.data[e]],n)}indexOf(e){const t=this.data;for(let n=0;n<t.length;++n)if(t[n]==e)return n;return-1}_subarray(e,t,n){const r=e*t,i=(e+1)*t,a="subarray"in this.data?this.data.subarray(r,i):this.data.slice(r,i);return new o(this.type,a,n)}item(){const e=this.data;if(1!==e.length)throw new Error(`a Tensor with ${e.length} elements cannot be converted to Scalar`);return e[0]}tolist(){return function(e,t){const n=e.length,r=t.reduce(((e,t)=>e*t));if(n!==r)throw Error(`cannot reshape array of size ${n} into shape (${t})`);let i=e;for(let e=t.length-1;e>=0;e--)i=i.reduce(((n,r)=>{let i=n[n.length-1];return i.length<t[e]?i.push(r):n.push([r]),n}),[[]]);return i[0]}(this.data,this.dims)}sigmoid(){return this.clone().sigmoid_()}sigmoid_(){const e=this.data;for(let t=0;t<e.length;++t)e[t]=1/(1+Math.exp(-e[t]));return this}mul(e){return this.clone().mul_(e)}mul_(e){const t=this.data;for(let n=0;n<t.length;++n)t[n]*=e;return this}div(e){return this.clone().div_(e)}div_(e){const t=this.data;for(let n=0;n<t.length;++n)t[n]/=e;return this}add(e){return this.clone().add_(e)}add_(e){const t=this.data;for(let n=0;n<t.length;++n)t[n]+=e;return this}sub(e){return this.clone().sub_(e)}sub_(e){const t=this.data;for(let n=0;n<t.length;++n)t[n]-=e;return this}clone(){return new o(this.type,this.data.slice(),this.dims.slice())}slice(...e){const t=[],n=[];for(let r=0;r<this.dims.length;++r){let i=e[r];if(null==i)n.push([0,this.dims[r]]),t.push(this.dims[r]);else if("number"==typeof i)i=w(i,this.dims[r],r),n.push([i,i+1]);else{if(!Array.isArray(i)||2!==i.length)throw new Error(`Invalid slice: ${i}`);{let[e,a]=i;if(e=null===e?0:w(e,this.dims[r],r,!1),a=null===a?this.dims[r]:w(a,this.dims[r],r,!1),e>a)throw new Error(`Invalid slice: ${i}`);const s=[Math.max(e,0),Math.min(a,this.dims[r])];n.push(s),t.push(s[1]-s[0])}}}const r=n.map((([e,t])=>t-e)),i=r.reduce(((e,t)=>e*t)),a=this.data,s=new a.constructor(i),l=this.stride();for(let e=0;e<i;++e){let t=0;for(let i=r.length-1,a=e;i>=0;--i){const e=r[i];t+=(a%e+n[i][0])*l[i],a=Math.floor(a/e)}s[e]=a[t]}return new o(this.type,s,t)}permute(...e){return l(this,e)}transpose(...e){return this.permute(...e)}sum(e=null,t=!1){return this.norm(1,e,t)}norm(e="fro",t=null,n=!1){if("fro"===e)e=2;else if("string"==typeof e)throw Error(`Unsupported norm: ${e}`);const r=this.data;if(null===t){let t=r.reduce(((t,n)=>t+n**e),0)**(1/e);return new o(this.type,[t],[])}t=w(t,this.dims.length);const i=this.dims.slice();i[t]=1;const a=new r.constructor(r.length/this.dims[t]);for(let n=0;n<r.length;++n){let s=0;for(let e=this.dims.length-1,r=n,a=1;e>=0;--e){const n=this.dims[e];if(e!==t){s+=r%n*a,a*=i[e]}r=Math.floor(r/n)}a[s]+=r[n]**e}if(1!==e)for(let t=0;t<a.length;++t)a[t]=a[t]**(1/e);return n||i.splice(t,1),new o(this.type,a,i)}normalize_(e=2,t=1){t=w(t,this.dims.length);const n=this.norm(e,t,!0),r=this.data,i=n.data;for(let e=0;e<r.length;++e){let n=0;for(let r=this.dims.length-1,i=e,a=1;r>=0;--r){const e=this.dims[r];if(r!==t){n+=i%e*a,a*=this.dims[r]}i=Math.floor(i/e)}r[e]/=i[n]}return this}normalize(e=2,t=1){return this.clone().normalize_(e,t)}stride(){return function(e){const t=new Array(e.length);for(let n=e.length-1,r=1;n>=0;--n)t[n]=r,r*=e[n];return t}(this.dims)}squeeze(e=null){return new o(this.type,this.data,g(this.dims,e))}squeeze_(e=null){return this.dims=g(this.dims,e),this}unsqueeze(e=null){return new o(this.type,this.data,_(this.dims,e))}unsqueeze_(e=null){return this.dims=_(this.dims,e),this}flatten_(e=0,t=-1){t=(t+this.dims.length)%this.dims.length;let n=this.dims.slice(0,e),r=this.dims.slice(e,t+1),i=this.dims.slice(t+1);return this.dims=[...n,r.reduce(((e,t)=>e*t),1),...i],this}flatten(e=0,t=-1){return this.clone().flatten_(e,t)}view(...e){let t=-1;for(let n=0;n<e.length;++n)if(-1===e[n]){if(-1!==t)throw new Error("Only one dimension can be inferred");t=n}const n=this.data;if(-1!==t){const r=e.reduce(((e,n,r)=>r!==t?e*n:e),1);e[t]=n.length/r}return new o(this.type,n,e)}neg_(){const e=this.data;for(let t=0;t<e.length;++t)e[t]=-e[t];return this}neg(){return this.clone().neg_()}clamp_(e,t){const n=this.data;for(let r=0;r<n.length;++r)n[r]=Math.min(Math.max(n[r],e),t);return this}clamp(e,t){return this.clone().clamp_(e,t)}round_(){const e=this.data;for(let t=0;t<e.length;++t)e[t]=Math.round(e[t]);return this}round(){return this.clone().round_()}mean(e=null,t=!1){return x(this,e,t)}to(e){if(this.type===e)return this;if(!s.hasOwnProperty(e))throw new Error(`Unsupported type: ${e}`);return new o(e,s[e].from(this.data),this.dims)}}function l(e,t){const[n,i]=(0,r.permute_data)(e.data,e.dims,t);return new o(e.type,n,i)}function u(e,[t,n],i="bilinear",a=!1){const s=e.dims.at(-3)??1,l=e.dims.at(-2),u=e.dims.at(-1);let d=(0,r.interpolate_data)(e.data,[s,l,u],[t,n],i,a);return new o(e.type,d,[s,t,n])}async function d(e,{size:t=null,mode:n="bilinear"}={}){if(4!==e.dims.length)throw new Error("`interpolate_4d` currently only supports 4D input.");if(!t)throw new Error("`interpolate_4d` requires a `size` argument.");let r,i;if(2===t.length)r=[...e.dims.slice(0,2),...t];else if(3===t.length)r=[e.dims[0],...t];else{if(4!==t.length)throw new Error("`size` must be of length 2, 3, or 4.");r=t}if("bilinear"===n)i=await a.TensorOpRegistry.bilinear_interpolate_4d;else{if("bicubic"!==n)throw new Error(`Unsupported mode: ${n}`);i=await a.TensorOpRegistry.bicubic_interpolate_4d}const s=new o("int64",new BigInt64Array(r.map(BigInt)),[r.length]);return await i({x:e,s})}async function c(e,t){const n=await a.TensorOpRegistry.matmul;return await n({a:e,b:t})}async function p(e,t){const n=await a.TensorOpRegistry.rfft;return await n({x:e,a:t})}async function h(e,t){const n=await a.TensorOpRegistry.top_k;return t=null===t?e.dims.at(-1):Math.min(t,e.dims.at(-1)),await n({x:e,k:new o("int64",[BigInt(t)],[1])})}function m(e,t){const n=e.data,r=t.data,i=[e.dims[0],e.dims[2]],a=new n.constructor(i[0]*i[1]),[s,l,u]=e.dims;let d=0;for(let e=0;e<s;++e){const t=e*u*l;for(let i=0;i<u;++i){let s=0,o=0;const c=e*l,p=t+i;for(let e=0;e<l;++e){const t=Number(r[c+e]);o+=t,s+=n[p+e*u]*t}const h=s/o;a[d++]=h}}return new o(e.type,a,i)}function f(e,t,{eps:n=1e-5}={}){if(2!==e.dims.length)throw new Error("`layer_norm` currently only supports 2D input.");const[r,i]=e.dims;if(1!==t.length&&t[0]!==i)throw new Error("`normalized_shape` must be a 1D array with shape `[input.dims[1]]`.");const[a,s]=v(e,1,0,!0),l=a.data,u=s.data,d=e.data,c=new d.constructor(d.length);for(let e=0;e<r;++e){const t=e*i;for(let r=0;r<i;++r){const i=t+r;c[i]=(d[i]-u[e])/(l[e]+n)}}return new o(e.type,c,e.dims)}function g(e,t){return e=e.slice(),null===t?e=e.filter((e=>1!==e)):"number"==typeof t?1===e[t]&&e.splice(t,1):Array.isArray(t)&&(e=e.filter(((e,n)=>1!==e||!t.includes(n)))),e}function _(e,t){return t=w(t,e.length+1),(e=e.slice()).splice(t,0,1),e}function w(e,t,n=null,r=!0){if(r&&(e<-t||e>=t))throw new Error(`IndexError: index ${e} is out of bounds for dimension${null===n?"":" "+n} with size ${t}`);return e<0&&(e=(e%t+t)%t),e}function y(e,t=0){t=w(t,e[0].dims.length);const n=e[0].dims.slice();n[t]=e.reduce(((e,n)=>e+n.dims[t]),0);const r=n.reduce(((e,t)=>e*t),1),i=new e[0].data.constructor(r),a=e[0].type;if(0===t){let t=0;for(const n of e){const e=n.data;i.set(e,t),t+=e.length}}else{let r=0;for(let a=0;a<e.length;++a){const{data:s,dims:o}=e[a];for(let e=0;e<s.length;++e){let a=0;for(let i=o.length-1,s=e,l=1;i>=0;--i){const e=o[i];let u=s%e;i===t&&(u+=r),a+=u*l,l*=n[i],s=Math.floor(s/e)}i[a]=s[e]}r+=o[t]}}return new o(a,i,n)}function b(e,t=0){return y(e.map((e=>e.unsqueeze(t))),t)}function v(e,t=null,n=1,r=!1){const i=e.data,a=e.dims;if(null===t){const t=i.reduce(((e,t)=>e+t),0)/i.length,r=Math.sqrt(i.reduce(((e,n)=>e+(n-t)**2),0)/(i.length-n)),a=new o(e.type,[t],[]);return[new o(e.type,[r],[]),a]}const s=x(e,t=w(t,a.length),r),l=s.data,u=a.slice();u[t]=1;const d=new i.constructor(i.length/a[t]);for(let e=0;e<i.length;++e){let n=0;for(let r=a.length-1,i=e,s=1;r>=0;--r){const e=a[r];if(r!==t){n+=i%e*s,s*=u[r]}i=Math.floor(i/e)}d[n]+=(i[e]-l[n])**2}for(let e=0;e<d.length;++e)d[e]=Math.sqrt(d[e]/(a[t]-n));r||u.splice(t,1);return[new o(e.type,d,u),s]}function x(e,t=null,n=!1){const r=e.data;if(null===t){const t=r.reduce(((e,t)=>e+t),0);return new o(e.type,[t/r.length],[])}const i=e.dims;t=w(t,i.length);const a=i.slice();a[t]=1;const s=new r.constructor(r.length/i[t]);for(let e=0;e<r.length;++e){let n=0;for(let r=i.length-1,s=e,o=1;r>=0;--r){const e=i[r];if(r!==t){n+=s%e*o,o*=a[r]}s=Math.floor(s/e)}s[n]+=r[e]}if(1!==i[t])for(let e=0;e<s.length;++e)s[e]=s[e]/i[t];return n||a.splice(t,1),new o(e.type,s,a)}function M(e,t,n,r){const i=e.reduce(((e,t)=>e*t),1);return new o(n,new r(i).fill(t),e)}function T(e,t){let n,r;if("number"==typeof t)n="float32",r=Float32Array;else{if("bigint"!=typeof t)throw new Error("Unsupported data type: "+typeof t);n="int64",r=BigInt64Array}return M(e,t,n,r)}function k(e,t){return T(e.dims,t)}function $(e){return M(e,1n,"int64",BigInt64Array)}function S(e){return $(e.dims)}function C(e){return M(e,0n,"int64",BigInt64Array)}function E(e){return C(e.dims)}function P(e,t){if(2!==e.dims.length)throw new Error("The tensor must have 2 dimensions");if(e.dims.at(-1)%8!=0)throw new Error("The last dimension of the tensor must be a multiple of 8");if(!["binary","ubinary"].includes(t))throw new Error("The precision must be either 'binary' or 'ubinary'");const n="binary"===t,r=n?"int8":"uint8",i=n?Int8Array:Uint8Array,a=e.data,s=new i(a.length/8);for(let e=0;e<a.length;++e){const t=a[e]>0?1:0,r=Math.floor(e/8),i=e%8;s[r]|=t<<7-i,n&&0===i&&(s[r]-=128)}return new o(r,s,[e.dims[0],e.dims[1]/8])}}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={exports:{}};return n[e](a,a.exports,i),a.exports}i.m=n,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var a=Object.create(null);i.r(a);var s={};e=e||[null,t({}),t([]),t(t)];for(var o=2&r&&n;"object"==typeof o&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach((e=>s[e]=()=>n[e]));return s.default=()=>n,i.d(a,s),a},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;if("string"==typeof import.meta.url&&(e=import.meta.url),!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),i.b=new URL("./",import.meta.url);var a={};
227
227
  /*!*****************************!*\
228
228
  !*** ./src/transformers.js ***!
229
- \*****************************/i.r(a),i.d(a,{ASTFeatureExtractor:()=>d.ASTFeatureExtractor,ASTForAudioClassification:()=>l.ASTForAudioClassification,ASTModel:()=>l.ASTModel,ASTPreTrainedModel:()=>l.ASTPreTrainedModel,AlbertForMaskedLM:()=>l.AlbertForMaskedLM,AlbertForQuestionAnswering:()=>l.AlbertForQuestionAnswering,AlbertForSequenceClassification:()=>l.AlbertForSequenceClassification,AlbertModel:()=>l.AlbertModel,AlbertPreTrainedModel:()=>l.AlbertPreTrainedModel,AlbertTokenizer:()=>u.AlbertTokenizer,AudioClassificationPipeline:()=>o.AudioClassificationPipeline,AutoConfig:()=>c.AutoConfig,AutoModel:()=>l.AutoModel,AutoModelForAudioClassification:()=>l.AutoModelForAudioClassification,AutoModelForAudioFrameClassification:()=>l.AutoModelForAudioFrameClassification,AutoModelForCTC:()=>l.AutoModelForCTC,AutoModelForCausalLM:()=>l.AutoModelForCausalLM,AutoModelForDepthEstimation:()=>l.AutoModelForDepthEstimation,AutoModelForDocumentQuestionAnswering:()=>l.AutoModelForDocumentQuestionAnswering,AutoModelForImageClassification:()=>l.AutoModelForImageClassification,AutoModelForImageFeatureExtraction:()=>l.AutoModelForImageFeatureExtraction,AutoModelForImageMatting:()=>l.AutoModelForImageMatting,AutoModelForImageSegmentation:()=>l.AutoModelForImageSegmentation,AutoModelForImageToImage:()=>l.AutoModelForImageToImage,AutoModelForMaskGeneration:()=>l.AutoModelForMaskGeneration,AutoModelForMaskedLM:()=>l.AutoModelForMaskedLM,AutoModelForObjectDetection:()=>l.AutoModelForObjectDetection,AutoModelForQuestionAnswering:()=>l.AutoModelForQuestionAnswering,AutoModelForSemanticSegmentation:()=>l.AutoModelForSemanticSegmentation,AutoModelForSeq2SeqLM:()=>l.AutoModelForSeq2SeqLM,AutoModelForSequenceClassification:()=>l.AutoModelForSequenceClassification,AutoModelForSpeechSeq2Seq:()=>l.AutoModelForSpeechSeq2Seq,AutoModelForTextToSpectrogram:()=>l.AutoModelForTextToSpectrogram,AutoModelForTextToWaveform:()=>l.AutoModelForTextToWaveform,AutoModelForTokenClassification:()=>l.AutoModelForTokenClassification,AutoModelForVision2Seq:()=>l.AutoModelForVision2Seq,AutoModelForXVector:()=>l.AutoModelForXVector,AutoModelForZeroShotObjectDetection:()=>l.AutoModelForZeroShotObjectDetection,AutoProcessor:()=>d.AutoProcessor,AutoTokenizer:()=>u.AutoTokenizer,AutomaticSpeechRecognitionPipeline:()=>o.AutomaticSpeechRecognitionPipeline,BartForConditionalGeneration:()=>l.BartForConditionalGeneration,BartForSequenceClassification:()=>l.BartForSequenceClassification,BartModel:()=>l.BartModel,BartPretrainedModel:()=>l.BartPretrainedModel,BartTokenizer:()=>u.BartTokenizer,BaseModelOutput:()=>l.BaseModelOutput,BaseStreamer:()=>g.BaseStreamer,BeitFeatureExtractor:()=>d.BeitFeatureExtractor,BeitForImageClassification:()=>l.BeitForImageClassification,BeitModel:()=>l.BeitModel,BeitPreTrainedModel:()=>l.BeitPreTrainedModel,BertForMaskedLM:()=>l.BertForMaskedLM,BertForQuestionAnswering:()=>l.BertForQuestionAnswering,BertForSequenceClassification:()=>l.BertForSequenceClassification,BertForTokenClassification:()=>l.BertForTokenClassification,BertModel:()=>l.BertModel,BertPreTrainedModel:()=>l.BertPreTrainedModel,BertTokenizer:()=>u.BertTokenizer,BitImageProcessor:()=>d.BitImageProcessor,BlenderbotForConditionalGeneration:()=>l.BlenderbotForConditionalGeneration,BlenderbotModel:()=>l.BlenderbotModel,BlenderbotPreTrainedModel:()=>l.BlenderbotPreTrainedModel,BlenderbotSmallForConditionalGeneration:()=>l.BlenderbotSmallForConditionalGeneration,BlenderbotSmallModel:()=>l.BlenderbotSmallModel,BlenderbotSmallPreTrainedModel:()=>l.BlenderbotSmallPreTrainedModel,BlenderbotSmallTokenizer:()=>u.BlenderbotSmallTokenizer,BlenderbotTokenizer:()=>u.BlenderbotTokenizer,BloomForCausalLM:()=>l.BloomForCausalLM,BloomModel:()=>l.BloomModel,BloomPreTrainedModel:()=>l.BloomPreTrainedModel,BloomTokenizer:()=>u.BloomTokenizer,CLIPFeatureExtractor:()=>d.CLIPFeatureExtractor,CLIPImageProcessor:()=>d.CLIPImageProcessor,CLIPModel:()=>l.CLIPModel,CLIPPreTrainedModel:()=>l.CLIPPreTrainedModel,CLIPSegForImageSegmentation:()=>l.CLIPSegForImageSegmentation,CLIPSegModel:()=>l.CLIPSegModel,CLIPSegPreTrainedModel:()=>l.CLIPSegPreTrainedModel,CLIPTextModelWithProjection:()=>l.CLIPTextModelWithProjection,CLIPTokenizer:()=>u.CLIPTokenizer,CLIPVisionModelWithProjection:()=>l.CLIPVisionModelWithProjection,CamembertForMaskedLM:()=>l.CamembertForMaskedLM,CamembertForQuestionAnswering:()=>l.CamembertForQuestionAnswering,CamembertForSequenceClassification:()=>l.CamembertForSequenceClassification,CamembertForTokenClassification:()=>l.CamembertForTokenClassification,CamembertModel:()=>l.CamembertModel,CamembertPreTrainedModel:()=>l.CamembertPreTrainedModel,CamembertTokenizer:()=>u.CamembertTokenizer,CausalLMOutput:()=>l.CausalLMOutput,CausalLMOutputWithPast:()=>l.CausalLMOutputWithPast,ChineseCLIPFeatureExtractor:()=>d.ChineseCLIPFeatureExtractor,ChineseCLIPModel:()=>l.ChineseCLIPModel,ChineseCLIPPreTrainedModel:()=>l.ChineseCLIPPreTrainedModel,ClapAudioModelWithProjection:()=>l.ClapAudioModelWithProjection,ClapFeatureExtractor:()=>d.ClapFeatureExtractor,ClapModel:()=>l.ClapModel,ClapPreTrainedModel:()=>l.ClapPreTrainedModel,ClapTextModelWithProjection:()=>l.ClapTextModelWithProjection,CodeGenForCausalLM:()=>l.CodeGenForCausalLM,CodeGenModel:()=>l.CodeGenModel,CodeGenPreTrainedModel:()=>l.CodeGenPreTrainedModel,CodeGenTokenizer:()=>u.CodeGenTokenizer,CodeLlamaTokenizer:()=>u.CodeLlamaTokenizer,CohereForCausalLM:()=>l.CohereForCausalLM,CohereModel:()=>l.CohereModel,CoherePreTrainedModel:()=>l.CoherePreTrainedModel,CohereTokenizer:()=>u.CohereTokenizer,ConvBertForMaskedLM:()=>l.ConvBertForMaskedLM,ConvBertForQuestionAnswering:()=>l.ConvBertForQuestionAnswering,ConvBertForSequenceClassification:()=>l.ConvBertForSequenceClassification,ConvBertForTokenClassification:()=>l.ConvBertForTokenClassification,ConvBertModel:()=>l.ConvBertModel,ConvBertPreTrainedModel:()=>l.ConvBertPreTrainedModel,ConvBertTokenizer:()=>u.ConvBertTokenizer,ConvNextFeatureExtractor:()=>d.ConvNextFeatureExtractor,ConvNextForImageClassification:()=>l.ConvNextForImageClassification,ConvNextImageProcessor:()=>d.ConvNextImageProcessor,ConvNextModel:()=>l.ConvNextModel,ConvNextPreTrainedModel:()=>l.ConvNextPreTrainedModel,ConvNextV2ForImageClassification:()=>l.ConvNextV2ForImageClassification,ConvNextV2Model:()=>l.ConvNextV2Model,ConvNextV2PreTrainedModel:()=>l.ConvNextV2PreTrainedModel,DPTFeatureExtractor:()=>d.DPTFeatureExtractor,DPTForDepthEstimation:()=>l.DPTForDepthEstimation,DPTImageProcessor:()=>d.DPTImageProcessor,DPTModel:()=>l.DPTModel,DPTPreTrainedModel:()=>l.DPTPreTrainedModel,DebertaForMaskedLM:()=>l.DebertaForMaskedLM,DebertaForQuestionAnswering:()=>l.DebertaForQuestionAnswering,DebertaForSequenceClassification:()=>l.DebertaForSequenceClassification,DebertaForTokenClassification:()=>l.DebertaForTokenClassification,DebertaModel:()=>l.DebertaModel,DebertaPreTrainedModel:()=>l.DebertaPreTrainedModel,DebertaTokenizer:()=>u.DebertaTokenizer,DebertaV2ForMaskedLM:()=>l.DebertaV2ForMaskedLM,DebertaV2ForQuestionAnswering:()=>l.DebertaV2ForQuestionAnswering,DebertaV2ForSequenceClassification:()=>l.DebertaV2ForSequenceClassification,DebertaV2ForTokenClassification:()=>l.DebertaV2ForTokenClassification,DebertaV2Model:()=>l.DebertaV2Model,DebertaV2PreTrainedModel:()=>l.DebertaV2PreTrainedModel,DebertaV2Tokenizer:()=>u.DebertaV2Tokenizer,DeiTFeatureExtractor:()=>d.DeiTFeatureExtractor,DeiTForImageClassification:()=>l.DeiTForImageClassification,DeiTModel:()=>l.DeiTModel,DeiTPreTrainedModel:()=>l.DeiTPreTrainedModel,DepthAnythingForDepthEstimation:()=>l.DepthAnythingForDepthEstimation,DepthAnythingPreTrainedModel:()=>l.DepthAnythingPreTrainedModel,DepthEstimationPipeline:()=>o.DepthEstimationPipeline,DetrFeatureExtractor:()=>d.DetrFeatureExtractor,DetrForObjectDetection:()=>l.DetrForObjectDetection,DetrForSegmentation:()=>l.DetrForSegmentation,DetrModel:()=>l.DetrModel,DetrObjectDetectionOutput:()=>l.DetrObjectDetectionOutput,DetrPreTrainedModel:()=>l.DetrPreTrainedModel,DetrSegmentationOutput:()=>l.DetrSegmentationOutput,Dinov2ForImageClassification:()=>l.Dinov2ForImageClassification,Dinov2Model:()=>l.Dinov2Model,Dinov2PreTrainedModel:()=>l.Dinov2PreTrainedModel,DistilBertForMaskedLM:()=>l.DistilBertForMaskedLM,DistilBertForQuestionAnswering:()=>l.DistilBertForQuestionAnswering,DistilBertForSequenceClassification:()=>l.DistilBertForSequenceClassification,DistilBertForTokenClassification:()=>l.DistilBertForTokenClassification,DistilBertModel:()=>l.DistilBertModel,DistilBertPreTrainedModel:()=>l.DistilBertPreTrainedModel,DistilBertTokenizer:()=>u.DistilBertTokenizer,DocumentQuestionAnsweringPipeline:()=>o.DocumentQuestionAnsweringPipeline,DonutFeatureExtractor:()=>d.DonutFeatureExtractor,DonutSwinModel:()=>l.DonutSwinModel,DonutSwinPreTrainedModel:()=>l.DonutSwinPreTrainedModel,EfficientNetForImageClassification:()=>l.EfficientNetForImageClassification,EfficientNetImageProcessor:()=>d.EfficientNetImageProcessor,EfficientNetModel:()=>l.EfficientNetModel,EfficientNetPreTrainedModel:()=>l.EfficientNetPreTrainedModel,ElectraForMaskedLM:()=>l.ElectraForMaskedLM,ElectraForQuestionAnswering:()=>l.ElectraForQuestionAnswering,ElectraForSequenceClassification:()=>l.ElectraForSequenceClassification,ElectraForTokenClassification:()=>l.ElectraForTokenClassification,ElectraModel:()=>l.ElectraModel,ElectraPreTrainedModel:()=>l.ElectraPreTrainedModel,ElectraTokenizer:()=>u.ElectraTokenizer,EosTokenCriteria:()=>_.EosTokenCriteria,EsmForMaskedLM:()=>l.EsmForMaskedLM,EsmForSequenceClassification:()=>l.EsmForSequenceClassification,EsmForTokenClassification:()=>l.EsmForTokenClassification,EsmModel:()=>l.EsmModel,EsmPreTrainedModel:()=>l.EsmPreTrainedModel,EsmTokenizer:()=>u.EsmTokenizer,FFT:()=>f.FFT,FalconForCausalLM:()=>l.FalconForCausalLM,FalconModel:()=>l.FalconModel,FalconPreTrainedModel:()=>l.FalconPreTrainedModel,FalconTokenizer:()=>u.FalconTokenizer,FastViTForImageClassification:()=>l.FastViTForImageClassification,FastViTModel:()=>l.FastViTModel,FastViTPreTrainedModel:()=>l.FastViTPreTrainedModel,FeatureExtractionPipeline:()=>o.FeatureExtractionPipeline,FeatureExtractor:()=>d.FeatureExtractor,FillMaskPipeline:()=>o.FillMaskPipeline,Florence2ForConditionalGeneration:()=>l.Florence2ForConditionalGeneration,Florence2PreTrainedModel:()=>l.Florence2PreTrainedModel,Florence2Processor:()=>d.Florence2Processor,GLPNFeatureExtractor:()=>d.GLPNFeatureExtractor,GLPNForDepthEstimation:()=>l.GLPNForDepthEstimation,GLPNModel:()=>l.GLPNModel,GLPNPreTrainedModel:()=>l.GLPNPreTrainedModel,GPT2LMHeadModel:()=>l.GPT2LMHeadModel,GPT2Model:()=>l.GPT2Model,GPT2PreTrainedModel:()=>l.GPT2PreTrainedModel,GPT2Tokenizer:()=>u.GPT2Tokenizer,GPTBigCodeForCausalLM:()=>l.GPTBigCodeForCausalLM,GPTBigCodeModel:()=>l.GPTBigCodeModel,GPTBigCodePreTrainedModel:()=>l.GPTBigCodePreTrainedModel,GPTJForCausalLM:()=>l.GPTJForCausalLM,GPTJModel:()=>l.GPTJModel,GPTJPreTrainedModel:()=>l.GPTJPreTrainedModel,GPTNeoForCausalLM:()=>l.GPTNeoForCausalLM,GPTNeoModel:()=>l.GPTNeoModel,GPTNeoPreTrainedModel:()=>l.GPTNeoPreTrainedModel,GPTNeoXForCausalLM:()=>l.GPTNeoXForCausalLM,GPTNeoXModel:()=>l.GPTNeoXModel,GPTNeoXPreTrainedModel:()=>l.GPTNeoXPreTrainedModel,GPTNeoXTokenizer:()=>u.GPTNeoXTokenizer,Gemma2ForCausalLM:()=>l.Gemma2ForCausalLM,Gemma2Model:()=>l.Gemma2Model,Gemma2PreTrainedModel:()=>l.Gemma2PreTrainedModel,GemmaForCausalLM:()=>l.GemmaForCausalLM,GemmaModel:()=>l.GemmaModel,GemmaPreTrainedModel:()=>l.GemmaPreTrainedModel,GemmaTokenizer:()=>u.GemmaTokenizer,Grok1Tokenizer:()=>u.Grok1Tokenizer,HerbertTokenizer:()=>u.HerbertTokenizer,HubertForCTC:()=>l.HubertForCTC,HubertForSequenceClassification:()=>l.HubertForSequenceClassification,HubertModel:()=>l.HubertModel,HubertPreTrainedModel:()=>l.HubertPreTrainedModel,ImageClassificationPipeline:()=>o.ImageClassificationPipeline,ImageFeatureExtractionPipeline:()=>o.ImageFeatureExtractionPipeline,ImageFeatureExtractor:()=>d.ImageFeatureExtractor,ImageMattingOutput:()=>l.ImageMattingOutput,ImageSegmentationPipeline:()=>o.ImageSegmentationPipeline,ImageToImagePipeline:()=>o.ImageToImagePipeline,ImageToTextPipeline:()=>o.ImageToTextPipeline,InterruptableStoppingCriteria:()=>_.InterruptableStoppingCriteria,JAISLMHeadModel:()=>l.JAISLMHeadModel,JAISModel:()=>l.JAISModel,JAISPreTrainedModel:()=>l.JAISPreTrainedModel,LlamaForCausalLM:()=>l.LlamaForCausalLM,LlamaModel:()=>l.LlamaModel,LlamaPreTrainedModel:()=>l.LlamaPreTrainedModel,LlamaTokenizer:()=>u.LlamaTokenizer,LlavaForConditionalGeneration:()=>l.LlavaForConditionalGeneration,LlavaPreTrainedModel:()=>l.LlavaPreTrainedModel,LongT5ForConditionalGeneration:()=>l.LongT5ForConditionalGeneration,LongT5Model:()=>l.LongT5Model,LongT5PreTrainedModel:()=>l.LongT5PreTrainedModel,M2M100ForConditionalGeneration:()=>l.M2M100ForConditionalGeneration,M2M100Model:()=>l.M2M100Model,M2M100PreTrainedModel:()=>l.M2M100PreTrainedModel,M2M100Tokenizer:()=>u.M2M100Tokenizer,MBart50Tokenizer:()=>u.MBart50Tokenizer,MBartForCausalLM:()=>l.MBartForCausalLM,MBartForConditionalGeneration:()=>l.MBartForConditionalGeneration,MBartForSequenceClassification:()=>l.MBartForSequenceClassification,MBartModel:()=>l.MBartModel,MBartPreTrainedModel:()=>l.MBartPreTrainedModel,MBartTokenizer:()=>u.MBartTokenizer,MPNetForMaskedLM:()=>l.MPNetForMaskedLM,MPNetForQuestionAnswering:()=>l.MPNetForQuestionAnswering,MPNetForSequenceClassification:()=>l.MPNetForSequenceClassification,MPNetForTokenClassification:()=>l.MPNetForTokenClassification,MPNetModel:()=>l.MPNetModel,MPNetPreTrainedModel:()=>l.MPNetPreTrainedModel,MPNetTokenizer:()=>u.MPNetTokenizer,MT5ForConditionalGeneration:()=>l.MT5ForConditionalGeneration,MT5Model:()=>l.MT5Model,MT5PreTrainedModel:()=>l.MT5PreTrainedModel,MarianMTModel:()=>l.MarianMTModel,MarianModel:()=>l.MarianModel,MarianPreTrainedModel:()=>l.MarianPreTrainedModel,MarianTokenizer:()=>u.MarianTokenizer,MaskedLMOutput:()=>l.MaskedLMOutput,MaxLengthCriteria:()=>_.MaxLengthCriteria,MistralForCausalLM:()=>l.MistralForCausalLM,MistralModel:()=>l.MistralModel,MistralPreTrainedModel:()=>l.MistralPreTrainedModel,MobileBertForMaskedLM:()=>l.MobileBertForMaskedLM,MobileBertForQuestionAnswering:()=>l.MobileBertForQuestionAnswering,MobileBertForSequenceClassification:()=>l.MobileBertForSequenceClassification,MobileBertModel:()=>l.MobileBertModel,MobileBertPreTrainedModel:()=>l.MobileBertPreTrainedModel,MobileBertTokenizer:()=>u.MobileBertTokenizer,MobileNetV1FeatureExtractor:()=>d.MobileNetV1FeatureExtractor,MobileNetV1ForImageClassification:()=>l.MobileNetV1ForImageClassification,MobileNetV1Model:()=>l.MobileNetV1Model,MobileNetV1PreTrainedModel:()=>l.MobileNetV1PreTrainedModel,MobileNetV2FeatureExtractor:()=>d.MobileNetV2FeatureExtractor,MobileNetV2ForImageClassification:()=>l.MobileNetV2ForImageClassification,MobileNetV2Model:()=>l.MobileNetV2Model,MobileNetV2PreTrainedModel:()=>l.MobileNetV2PreTrainedModel,MobileNetV3FeatureExtractor:()=>d.MobileNetV3FeatureExtractor,MobileNetV3ForImageClassification:()=>l.MobileNetV3ForImageClassification,MobileNetV3Model:()=>l.MobileNetV3Model,MobileNetV3PreTrainedModel:()=>l.MobileNetV3PreTrainedModel,MobileNetV4FeatureExtractor:()=>d.MobileNetV4FeatureExtractor,MobileNetV4ForImageClassification:()=>l.MobileNetV4ForImageClassification,MobileNetV4Model:()=>l.MobileNetV4Model,MobileNetV4PreTrainedModel:()=>l.MobileNetV4PreTrainedModel,MobileViTFeatureExtractor:()=>d.MobileViTFeatureExtractor,MobileViTForImageClassification:()=>l.MobileViTForImageClassification,MobileViTImageProcessor:()=>d.MobileViTImageProcessor,MobileViTModel:()=>l.MobileViTModel,MobileViTPreTrainedModel:()=>l.MobileViTPreTrainedModel,MobileViTV2ForImageClassification:()=>l.MobileViTV2ForImageClassification,MobileViTV2Model:()=>l.MobileViTV2Model,MobileViTV2PreTrainedModel:()=>l.MobileViTV2PreTrainedModel,ModelOutput:()=>l.ModelOutput,Moondream1ForConditionalGeneration:()=>l.Moondream1ForConditionalGeneration,MptForCausalLM:()=>l.MptForCausalLM,MptModel:()=>l.MptModel,MptPreTrainedModel:()=>l.MptPreTrainedModel,MusicgenForCausalLM:()=>l.MusicgenForCausalLM,MusicgenForConditionalGeneration:()=>l.MusicgenForConditionalGeneration,MusicgenModel:()=>l.MusicgenModel,MusicgenPreTrainedModel:()=>l.MusicgenPreTrainedModel,NllbTokenizer:()=>u.NllbTokenizer,NomicBertModel:()=>l.NomicBertModel,NomicBertPreTrainedModel:()=>l.NomicBertPreTrainedModel,NougatImageProcessor:()=>d.NougatImageProcessor,NougatTokenizer:()=>u.NougatTokenizer,OPTForCausalLM:()=>l.OPTForCausalLM,OPTModel:()=>l.OPTModel,OPTPreTrainedModel:()=>l.OPTPreTrainedModel,ObjectDetectionPipeline:()=>o.ObjectDetectionPipeline,OpenELMForCausalLM:()=>l.OpenELMForCausalLM,OpenELMModel:()=>l.OpenELMModel,OpenELMPreTrainedModel:()=>l.OpenELMPreTrainedModel,OwlViTFeatureExtractor:()=>d.OwlViTFeatureExtractor,OwlViTForObjectDetection:()=>l.OwlViTForObjectDetection,OwlViTModel:()=>l.OwlViTModel,OwlViTPreTrainedModel:()=>l.OwlViTPreTrainedModel,OwlViTProcessor:()=>d.OwlViTProcessor,Owlv2ForObjectDetection:()=>l.Owlv2ForObjectDetection,Owlv2ImageProcessor:()=>d.Owlv2ImageProcessor,Owlv2Model:()=>l.Owlv2Model,Owlv2PreTrainedModel:()=>l.Owlv2PreTrainedModel,Phi3ForCausalLM:()=>l.Phi3ForCausalLM,Phi3Model:()=>l.Phi3Model,Phi3PreTrainedModel:()=>l.Phi3PreTrainedModel,PhiForCausalLM:()=>l.PhiForCausalLM,PhiModel:()=>l.PhiModel,PhiPreTrainedModel:()=>l.PhiPreTrainedModel,Pipeline:()=>o.Pipeline,PreTrainedModel:()=>l.PreTrainedModel,PreTrainedTokenizer:()=>u.PreTrainedTokenizer,PretrainedConfig:()=>c.PretrainedConfig,PretrainedMixin:()=>l.PretrainedMixin,Processor:()=>d.Processor,PyAnnoteFeatureExtractor:()=>d.PyAnnoteFeatureExtractor,PyAnnoteForAudioFrameClassification:()=>l.PyAnnoteForAudioFrameClassification,PyAnnoteModel:()=>l.PyAnnoteModel,PyAnnotePreTrainedModel:()=>l.PyAnnotePreTrainedModel,PyAnnoteProcessor:()=>d.PyAnnoteProcessor,QuestionAnsweringModelOutput:()=>l.QuestionAnsweringModelOutput,QuestionAnsweringPipeline:()=>o.QuestionAnsweringPipeline,Qwen2ForCausalLM:()=>l.Qwen2ForCausalLM,Qwen2Model:()=>l.Qwen2Model,Qwen2PreTrainedModel:()=>l.Qwen2PreTrainedModel,Qwen2Tokenizer:()=>u.Qwen2Tokenizer,RTDetrForObjectDetection:()=>l.RTDetrForObjectDetection,RTDetrImageProcessor:()=>d.RTDetrImageProcessor,RTDetrModel:()=>l.RTDetrModel,RTDetrObjectDetectionOutput:()=>l.RTDetrObjectDetectionOutput,RTDetrPreTrainedModel:()=>l.RTDetrPreTrainedModel,RawImage:()=>h.RawImage,ResNetForImageClassification:()=>l.ResNetForImageClassification,ResNetModel:()=>l.ResNetModel,ResNetPreTrainedModel:()=>l.ResNetPreTrainedModel,RoFormerForMaskedLM:()=>l.RoFormerForMaskedLM,RoFormerForQuestionAnswering:()=>l.RoFormerForQuestionAnswering,RoFormerForSequenceClassification:()=>l.RoFormerForSequenceClassification,RoFormerForTokenClassification:()=>l.RoFormerForTokenClassification,RoFormerModel:()=>l.RoFormerModel,RoFormerPreTrainedModel:()=>l.RoFormerPreTrainedModel,RoFormerTokenizer:()=>u.RoFormerTokenizer,RobertaForMaskedLM:()=>l.RobertaForMaskedLM,RobertaForQuestionAnswering:()=>l.RobertaForQuestionAnswering,RobertaForSequenceClassification:()=>l.RobertaForSequenceClassification,RobertaForTokenClassification:()=>l.RobertaForTokenClassification,RobertaModel:()=>l.RobertaModel,RobertaPreTrainedModel:()=>l.RobertaPreTrainedModel,RobertaTokenizer:()=>u.RobertaTokenizer,SamImageProcessor:()=>d.SamImageProcessor,SamImageSegmentationOutput:()=>l.SamImageSegmentationOutput,SamModel:()=>l.SamModel,SamPreTrainedModel:()=>l.SamPreTrainedModel,SamProcessor:()=>d.SamProcessor,SapiensFeatureExtractor:()=>d.SapiensFeatureExtractor,SapiensForDepthEstimation:()=>l.SapiensForDepthEstimation,SapiensForNormalEstimation:()=>l.SapiensForNormalEstimation,SapiensForSemanticSegmentation:()=>l.SapiensForSemanticSegmentation,SapiensPreTrainedModel:()=>l.SapiensPreTrainedModel,SeamlessM4TFeatureExtractor:()=>d.SeamlessM4TFeatureExtractor,SegformerFeatureExtractor:()=>d.SegformerFeatureExtractor,SegformerForImageClassification:()=>l.SegformerForImageClassification,SegformerForSemanticSegmentation:()=>l.SegformerForSemanticSegmentation,SegformerModel:()=>l.SegformerModel,SegformerPreTrainedModel:()=>l.SegformerPreTrainedModel,Seq2SeqLMOutput:()=>l.Seq2SeqLMOutput,SequenceClassifierOutput:()=>l.SequenceClassifierOutput,SiglipImageProcessor:()=>d.SiglipImageProcessor,SiglipModel:()=>l.SiglipModel,SiglipPreTrainedModel:()=>l.SiglipPreTrainedModel,SiglipTextModel:()=>l.SiglipTextModel,SiglipTokenizer:()=>u.SiglipTokenizer,SiglipVisionModel:()=>l.SiglipVisionModel,SpeechT5FeatureExtractor:()=>d.SpeechT5FeatureExtractor,SpeechT5ForSpeechToText:()=>l.SpeechT5ForSpeechToText,SpeechT5ForTextToSpeech:()=>l.SpeechT5ForTextToSpeech,SpeechT5HifiGan:()=>l.SpeechT5HifiGan,SpeechT5Model:()=>l.SpeechT5Model,SpeechT5PreTrainedModel:()=>l.SpeechT5PreTrainedModel,SpeechT5Processor:()=>d.SpeechT5Processor,SpeechT5Tokenizer:()=>u.SpeechT5Tokenizer,SqueezeBertForMaskedLM:()=>l.SqueezeBertForMaskedLM,SqueezeBertForQuestionAnswering:()=>l.SqueezeBertForQuestionAnswering,SqueezeBertForSequenceClassification:()=>l.SqueezeBertForSequenceClassification,SqueezeBertModel:()=>l.SqueezeBertModel,SqueezeBertPreTrainedModel:()=>l.SqueezeBertPreTrainedModel,SqueezeBertTokenizer:()=>u.SqueezeBertTokenizer,StableLmForCausalLM:()=>l.StableLmForCausalLM,StableLmModel:()=>l.StableLmModel,StableLmPreTrainedModel:()=>l.StableLmPreTrainedModel,Starcoder2ForCausalLM:()=>l.Starcoder2ForCausalLM,Starcoder2Model:()=>l.Starcoder2Model,Starcoder2PreTrainedModel:()=>l.Starcoder2PreTrainedModel,StoppingCriteria:()=>_.StoppingCriteria,StoppingCriteriaList:()=>_.StoppingCriteriaList,SummarizationPipeline:()=>o.SummarizationPipeline,Swin2SRForImageSuperResolution:()=>l.Swin2SRForImageSuperResolution,Swin2SRImageProcessor:()=>d.Swin2SRImageProcessor,Swin2SRModel:()=>l.Swin2SRModel,Swin2SRPreTrainedModel:()=>l.Swin2SRPreTrainedModel,SwinForImageClassification:()=>l.SwinForImageClassification,SwinModel:()=>l.SwinModel,SwinPreTrainedModel:()=>l.SwinPreTrainedModel,T5ForConditionalGeneration:()=>l.T5ForConditionalGeneration,T5Model:()=>l.T5Model,T5PreTrainedModel:()=>l.T5PreTrainedModel,T5Tokenizer:()=>u.T5Tokenizer,TableTransformerForObjectDetection:()=>l.TableTransformerForObjectDetection,TableTransformerModel:()=>l.TableTransformerModel,TableTransformerObjectDetectionOutput:()=>l.TableTransformerObjectDetectionOutput,TableTransformerPreTrainedModel:()=>l.TableTransformerPreTrainedModel,Tensor:()=>m.Tensor,Text2TextGenerationPipeline:()=>o.Text2TextGenerationPipeline,TextClassificationPipeline:()=>o.TextClassificationPipeline,TextGenerationPipeline:()=>o.TextGenerationPipeline,TextStreamer:()=>g.TextStreamer,TextToAudioPipeline:()=>o.TextToAudioPipeline,TokenClassificationPipeline:()=>o.TokenClassificationPipeline,TokenClassifierOutput:()=>l.TokenClassifierOutput,TokenizerModel:()=>u.TokenizerModel,TrOCRForCausalLM:()=>l.TrOCRForCausalLM,TrOCRPreTrainedModel:()=>l.TrOCRPreTrainedModel,TranslationPipeline:()=>o.TranslationPipeline,UniSpeechForCTC:()=>l.UniSpeechForCTC,UniSpeechForSequenceClassification:()=>l.UniSpeechForSequenceClassification,UniSpeechModel:()=>l.UniSpeechModel,UniSpeechPreTrainedModel:()=>l.UniSpeechPreTrainedModel,UniSpeechSatForAudioFrameClassification:()=>l.UniSpeechSatForAudioFrameClassification,UniSpeechSatForCTC:()=>l.UniSpeechSatForCTC,UniSpeechSatForSequenceClassification:()=>l.UniSpeechSatForSequenceClassification,UniSpeechSatModel:()=>l.UniSpeechSatModel,UniSpeechSatPreTrainedModel:()=>l.UniSpeechSatPreTrainedModel,ViTFeatureExtractor:()=>d.ViTFeatureExtractor,ViTForImageClassification:()=>l.ViTForImageClassification,ViTImageProcessor:()=>d.ViTImageProcessor,ViTModel:()=>l.ViTModel,ViTPreTrainedModel:()=>l.ViTPreTrainedModel,VisionEncoderDecoderModel:()=>l.VisionEncoderDecoderModel,VitMatteForImageMatting:()=>l.VitMatteForImageMatting,VitMatteImageProcessor:()=>d.VitMatteImageProcessor,VitMattePreTrainedModel:()=>l.VitMattePreTrainedModel,VitsModel:()=>l.VitsModel,VitsModelOutput:()=>l.VitsModelOutput,VitsPreTrainedModel:()=>l.VitsPreTrainedModel,VitsTokenizer:()=>u.VitsTokenizer,Wav2Vec2BertForCTC:()=>l.Wav2Vec2BertForCTC,Wav2Vec2BertForSequenceClassification:()=>l.Wav2Vec2BertForSequenceClassification,Wav2Vec2BertModel:()=>l.Wav2Vec2BertModel,Wav2Vec2BertPreTrainedModel:()=>l.Wav2Vec2BertPreTrainedModel,Wav2Vec2CTCTokenizer:()=>u.Wav2Vec2CTCTokenizer,Wav2Vec2FeatureExtractor:()=>d.Wav2Vec2FeatureExtractor,Wav2Vec2ForAudioFrameClassification:()=>l.Wav2Vec2ForAudioFrameClassification,Wav2Vec2ForCTC:()=>l.Wav2Vec2ForCTC,Wav2Vec2ForSequenceClassification:()=>l.Wav2Vec2ForSequenceClassification,Wav2Vec2Model:()=>l.Wav2Vec2Model,Wav2Vec2PreTrainedModel:()=>l.Wav2Vec2PreTrainedModel,Wav2Vec2ProcessorWithLM:()=>d.Wav2Vec2ProcessorWithLM,WavLMForAudioFrameClassification:()=>l.WavLMForAudioFrameClassification,WavLMForCTC:()=>l.WavLMForCTC,WavLMForSequenceClassification:()=>l.WavLMForSequenceClassification,WavLMForXVector:()=>l.WavLMForXVector,WavLMModel:()=>l.WavLMModel,WavLMPreTrainedModel:()=>l.WavLMPreTrainedModel,WeSpeakerFeatureExtractor:()=>d.WeSpeakerFeatureExtractor,WeSpeakerResNetModel:()=>l.WeSpeakerResNetModel,WeSpeakerResNetPreTrainedModel:()=>l.WeSpeakerResNetPreTrainedModel,WhisperFeatureExtractor:()=>d.WhisperFeatureExtractor,WhisperForConditionalGeneration:()=>l.WhisperForConditionalGeneration,WhisperModel:()=>l.WhisperModel,WhisperPreTrainedModel:()=>l.WhisperPreTrainedModel,WhisperProcessor:()=>d.WhisperProcessor,WhisperTextStreamer:()=>g.WhisperTextStreamer,WhisperTokenizer:()=>u.WhisperTokenizer,XLMForQuestionAnswering:()=>l.XLMForQuestionAnswering,XLMForSequenceClassification:()=>l.XLMForSequenceClassification,XLMForTokenClassification:()=>l.XLMForTokenClassification,XLMModel:()=>l.XLMModel,XLMPreTrainedModel:()=>l.XLMPreTrainedModel,XLMRobertaForMaskedLM:()=>l.XLMRobertaForMaskedLM,XLMRobertaForQuestionAnswering:()=>l.XLMRobertaForQuestionAnswering,XLMRobertaForSequenceClassification:()=>l.XLMRobertaForSequenceClassification,XLMRobertaForTokenClassification:()=>l.XLMRobertaForTokenClassification,XLMRobertaModel:()=>l.XLMRobertaModel,XLMRobertaPreTrainedModel:()=>l.XLMRobertaPreTrainedModel,XLMRobertaTokenizer:()=>u.XLMRobertaTokenizer,XLMTokenizer:()=>u.XLMTokenizer,XLMWithLMHeadModel:()=>l.XLMWithLMHeadModel,XVectorOutput:()=>l.XVectorOutput,YolosFeatureExtractor:()=>d.YolosFeatureExtractor,YolosForObjectDetection:()=>l.YolosForObjectDetection,YolosModel:()=>l.YolosModel,YolosObjectDetectionOutput:()=>l.YolosObjectDetectionOutput,YolosPreTrainedModel:()=>l.YolosPreTrainedModel,ZeroShotAudioClassificationPipeline:()=>o.ZeroShotAudioClassificationPipeline,ZeroShotClassificationPipeline:()=>o.ZeroShotClassificationPipeline,ZeroShotImageClassificationPipeline:()=>o.ZeroShotImageClassificationPipeline,ZeroShotObjectDetectionPipeline:()=>o.ZeroShotObjectDetectionPipeline,bankers_round:()=>f.bankers_round,cat:()=>m.cat,cos_sim:()=>f.cos_sim,dot:()=>f.dot,dynamic_time_warping:()=>f.dynamic_time_warping,env:()=>s.env,full:()=>m.full,full_like:()=>m.full_like,getKeyValueShapes:()=>c.getKeyValueShapes,hamming:()=>p.hamming,hanning:()=>p.hanning,interpolate:()=>m.interpolate,interpolate_4d:()=>m.interpolate_4d,interpolate_data:()=>f.interpolate_data,is_chinese_char:()=>u.is_chinese_char,layer_norm:()=>m.layer_norm,log_softmax:()=>f.log_softmax,magnitude:()=>f.magnitude,matmul:()=>m.matmul,max:()=>f.max,mean:()=>m.mean,mean_pooling:()=>m.mean_pooling,medianFilter:()=>f.medianFilter,mel_filter_bank:()=>p.mel_filter_bank,min:()=>f.min,ones:()=>m.ones,ones_like:()=>m.ones_like,permute:()=>m.permute,permute_data:()=>f.permute_data,pipeline:()=>o.pipeline,quantize_embeddings:()=>m.quantize_embeddings,read_audio:()=>p.read_audio,rfft:()=>m.rfft,round:()=>f.round,softmax:()=>f.softmax,spectrogram:()=>p.spectrogram,stack:()=>m.stack,std_mean:()=>m.std_mean,topk:()=>m.topk,window_function:()=>p.window_function,zeros:()=>m.zeros,zeros_like:()=>m.zeros_like});var s=i(/*! ./env.js */"./src/env.js"),o=i(/*! ./pipelines.js */"./src/pipelines.js"),l=i(/*! ./models.js */"./src/models.js"),u=i(/*! ./tokenizers.js */"./src/tokenizers.js"),d=i(/*! ./processors.js */"./src/processors.js"),c=i(/*! ./configs.js */"./src/configs.js"),p=i(/*! ./utils/audio.js */"./src/utils/audio.js"),h=i(/*! ./utils/image.js */"./src/utils/image.js"),m=i(/*! ./utils/tensor.js */"./src/utils/tensor.js"),f=i(/*! ./utils/maths.js */"./src/utils/maths.js"),g=i(/*! ./generation/streamers.js */"./src/generation/streamers.js"),_=i(/*! ./generation/stopping_criteria.js */"./src/generation/stopping_criteria.js"),w=a.ASTFeatureExtractor,y=a.ASTForAudioClassification,b=a.ASTModel,v=a.ASTPreTrainedModel,x=a.AlbertForMaskedLM,M=a.AlbertForQuestionAnswering,T=a.AlbertForSequenceClassification,k=a.AlbertModel,$=a.AlbertPreTrainedModel,S=a.AlbertTokenizer,C=a.AudioClassificationPipeline,E=a.AutoConfig,P=a.AutoModel,A=a.AutoModelForAudioClassification,F=a.AutoModelForAudioFrameClassification,z=a.AutoModelForCTC,I=a.AutoModelForCausalLM,O=a.AutoModelForDepthEstimation,B=a.AutoModelForDocumentQuestionAnswering,L=a.AutoModelForImageClassification,D=a.AutoModelForImageFeatureExtraction,R=a.AutoModelForImageMatting,N=a.AutoModelForImageSegmentation,V=a.AutoModelForImageToImage,j=a.AutoModelForMaskGeneration,G=a.AutoModelForMaskedLM,q=a.AutoModelForObjectDetection,U=a.AutoModelForQuestionAnswering,W=a.AutoModelForSemanticSegmentation,H=a.AutoModelForSeq2SeqLM,X=a.AutoModelForSequenceClassification,K=a.AutoModelForSpeechSeq2Seq,Q=a.AutoModelForTextToSpectrogram,Y=a.AutoModelForTextToWaveform,J=a.AutoModelForTokenClassification,Z=a.AutoModelForVision2Seq,ee=a.AutoModelForXVector,te=a.AutoModelForZeroShotObjectDetection,ne=a.AutoProcessor,re=a.AutoTokenizer,ie=a.AutomaticSpeechRecognitionPipeline,ae=a.BartForConditionalGeneration,se=a.BartForSequenceClassification,oe=a.BartModel,le=a.BartPretrainedModel,ue=a.BartTokenizer,de=a.BaseModelOutput,ce=a.BaseStreamer,pe=a.BeitFeatureExtractor,he=a.BeitForImageClassification,me=a.BeitModel,fe=a.BeitPreTrainedModel,ge=a.BertForMaskedLM,_e=a.BertForQuestionAnswering,we=a.BertForSequenceClassification,ye=a.BertForTokenClassification,be=a.BertModel,ve=a.BertPreTrainedModel,xe=a.BertTokenizer,Me=a.BitImageProcessor,Te=a.BlenderbotForConditionalGeneration,ke=a.BlenderbotModel,$e=a.BlenderbotPreTrainedModel,Se=a.BlenderbotSmallForConditionalGeneration,Ce=a.BlenderbotSmallModel,Ee=a.BlenderbotSmallPreTrainedModel,Pe=a.BlenderbotSmallTokenizer,Ae=a.BlenderbotTokenizer,Fe=a.BloomForCausalLM,ze=a.BloomModel,Ie=a.BloomPreTrainedModel,Oe=a.BloomTokenizer,Be=a.CLIPFeatureExtractor,Le=a.CLIPImageProcessor,De=a.CLIPModel,Re=a.CLIPPreTrainedModel,Ne=a.CLIPSegForImageSegmentation,Ve=a.CLIPSegModel,je=a.CLIPSegPreTrainedModel,Ge=a.CLIPTextModelWithProjection,qe=a.CLIPTokenizer,Ue=a.CLIPVisionModelWithProjection,We=a.CamembertForMaskedLM,He=a.CamembertForQuestionAnswering,Xe=a.CamembertForSequenceClassification,Ke=a.CamembertForTokenClassification,Qe=a.CamembertModel,Ye=a.CamembertPreTrainedModel,Je=a.CamembertTokenizer,Ze=a.CausalLMOutput,et=a.CausalLMOutputWithPast,tt=a.ChineseCLIPFeatureExtractor,nt=a.ChineseCLIPModel,rt=a.ChineseCLIPPreTrainedModel,it=a.ClapAudioModelWithProjection,at=a.ClapFeatureExtractor,st=a.ClapModel,ot=a.ClapPreTrainedModel,lt=a.ClapTextModelWithProjection,ut=a.CodeGenForCausalLM,dt=a.CodeGenModel,ct=a.CodeGenPreTrainedModel,pt=a.CodeGenTokenizer,ht=a.CodeLlamaTokenizer,mt=a.CohereForCausalLM,ft=a.CohereModel,gt=a.CoherePreTrainedModel,_t=a.CohereTokenizer,wt=a.ConvBertForMaskedLM,yt=a.ConvBertForQuestionAnswering,bt=a.ConvBertForSequenceClassification,vt=a.ConvBertForTokenClassification,xt=a.ConvBertModel,Mt=a.ConvBertPreTrainedModel,Tt=a.ConvBertTokenizer,kt=a.ConvNextFeatureExtractor,$t=a.ConvNextForImageClassification,St=a.ConvNextImageProcessor,Ct=a.ConvNextModel,Et=a.ConvNextPreTrainedModel,Pt=a.ConvNextV2ForImageClassification,At=a.ConvNextV2Model,Ft=a.ConvNextV2PreTrainedModel,zt=a.DPTFeatureExtractor,It=a.DPTForDepthEstimation,Ot=a.DPTImageProcessor,Bt=a.DPTModel,Lt=a.DPTPreTrainedModel,Dt=a.DebertaForMaskedLM,Rt=a.DebertaForQuestionAnswering,Nt=a.DebertaForSequenceClassification,Vt=a.DebertaForTokenClassification,jt=a.DebertaModel,Gt=a.DebertaPreTrainedModel,qt=a.DebertaTokenizer,Ut=a.DebertaV2ForMaskedLM,Wt=a.DebertaV2ForQuestionAnswering,Ht=a.DebertaV2ForSequenceClassification,Xt=a.DebertaV2ForTokenClassification,Kt=a.DebertaV2Model,Qt=a.DebertaV2PreTrainedModel,Yt=a.DebertaV2Tokenizer,Jt=a.DeiTFeatureExtractor,Zt=a.DeiTForImageClassification,en=a.DeiTModel,tn=a.DeiTPreTrainedModel,nn=a.DepthAnythingForDepthEstimation,rn=a.DepthAnythingPreTrainedModel,an=a.DepthEstimationPipeline,sn=a.DetrFeatureExtractor,on=a.DetrForObjectDetection,ln=a.DetrForSegmentation,un=a.DetrModel,dn=a.DetrObjectDetectionOutput,cn=a.DetrPreTrainedModel,pn=a.DetrSegmentationOutput,hn=a.Dinov2ForImageClassification,mn=a.Dinov2Model,fn=a.Dinov2PreTrainedModel,gn=a.DistilBertForMaskedLM,_n=a.DistilBertForQuestionAnswering,wn=a.DistilBertForSequenceClassification,yn=a.DistilBertForTokenClassification,bn=a.DistilBertModel,vn=a.DistilBertPreTrainedModel,xn=a.DistilBertTokenizer,Mn=a.DocumentQuestionAnsweringPipeline,Tn=a.DonutFeatureExtractor,kn=a.DonutSwinModel,$n=a.DonutSwinPreTrainedModel,Sn=a.EfficientNetForImageClassification,Cn=a.EfficientNetImageProcessor,En=a.EfficientNetModel,Pn=a.EfficientNetPreTrainedModel,An=a.ElectraForMaskedLM,Fn=a.ElectraForQuestionAnswering,zn=a.ElectraForSequenceClassification,In=a.ElectraForTokenClassification,On=a.ElectraModel,Bn=a.ElectraPreTrainedModel,Ln=a.ElectraTokenizer,Dn=a.EosTokenCriteria,Rn=a.EsmForMaskedLM,Nn=a.EsmForSequenceClassification,Vn=a.EsmForTokenClassification,jn=a.EsmModel,Gn=a.EsmPreTrainedModel,qn=a.EsmTokenizer,Un=a.FFT,Wn=a.FalconForCausalLM,Hn=a.FalconModel,Xn=a.FalconPreTrainedModel,Kn=a.FalconTokenizer,Qn=a.FastViTForImageClassification,Yn=a.FastViTModel,Jn=a.FastViTPreTrainedModel,Zn=a.FeatureExtractionPipeline,er=a.FeatureExtractor,tr=a.FillMaskPipeline,nr=a.Florence2ForConditionalGeneration,rr=a.Florence2PreTrainedModel,ir=a.Florence2Processor,ar=a.GLPNFeatureExtractor,sr=a.GLPNForDepthEstimation,or=a.GLPNModel,lr=a.GLPNPreTrainedModel,ur=a.GPT2LMHeadModel,dr=a.GPT2Model,cr=a.GPT2PreTrainedModel,pr=a.GPT2Tokenizer,hr=a.GPTBigCodeForCausalLM,mr=a.GPTBigCodeModel,fr=a.GPTBigCodePreTrainedModel,gr=a.GPTJForCausalLM,_r=a.GPTJModel,wr=a.GPTJPreTrainedModel,yr=a.GPTNeoForCausalLM,br=a.GPTNeoModel,vr=a.GPTNeoPreTrainedModel,xr=a.GPTNeoXForCausalLM,Mr=a.GPTNeoXModel,Tr=a.GPTNeoXPreTrainedModel,kr=a.GPTNeoXTokenizer,$r=a.Gemma2ForCausalLM,Sr=a.Gemma2Model,Cr=a.Gemma2PreTrainedModel,Er=a.GemmaForCausalLM,Pr=a.GemmaModel,Ar=a.GemmaPreTrainedModel,Fr=a.GemmaTokenizer,zr=a.Grok1Tokenizer,Ir=a.HerbertTokenizer,Or=a.HubertForCTC,Br=a.HubertForSequenceClassification,Lr=a.HubertModel,Dr=a.HubertPreTrainedModel,Rr=a.ImageClassificationPipeline,Nr=a.ImageFeatureExtractionPipeline,Vr=a.ImageFeatureExtractor,jr=a.ImageMattingOutput,Gr=a.ImageSegmentationPipeline,qr=a.ImageToImagePipeline,Ur=a.ImageToTextPipeline,Wr=a.InterruptableStoppingCriteria,Hr=a.JAISLMHeadModel,Xr=a.JAISModel,Kr=a.JAISPreTrainedModel,Qr=a.LlamaForCausalLM,Yr=a.LlamaModel,Jr=a.LlamaPreTrainedModel,Zr=a.LlamaTokenizer,ei=a.LlavaForConditionalGeneration,ti=a.LlavaPreTrainedModel,ni=a.LongT5ForConditionalGeneration,ri=a.LongT5Model,ii=a.LongT5PreTrainedModel,ai=a.M2M100ForConditionalGeneration,si=a.M2M100Model,oi=a.M2M100PreTrainedModel,li=a.M2M100Tokenizer,ui=a.MBart50Tokenizer,di=a.MBartForCausalLM,ci=a.MBartForConditionalGeneration,pi=a.MBartForSequenceClassification,hi=a.MBartModel,mi=a.MBartPreTrainedModel,fi=a.MBartTokenizer,gi=a.MPNetForMaskedLM,_i=a.MPNetForQuestionAnswering,wi=a.MPNetForSequenceClassification,yi=a.MPNetForTokenClassification,bi=a.MPNetModel,vi=a.MPNetPreTrainedModel,xi=a.MPNetTokenizer,Mi=a.MT5ForConditionalGeneration,Ti=a.MT5Model,ki=a.MT5PreTrainedModel,$i=a.MarianMTModel,Si=a.MarianModel,Ci=a.MarianPreTrainedModel,Ei=a.MarianTokenizer,Pi=a.MaskedLMOutput,Ai=a.MaxLengthCriteria,Fi=a.MistralForCausalLM,zi=a.MistralModel,Ii=a.MistralPreTrainedModel,Oi=a.MobileBertForMaskedLM,Bi=a.MobileBertForQuestionAnswering,Li=a.MobileBertForSequenceClassification,Di=a.MobileBertModel,Ri=a.MobileBertPreTrainedModel,Ni=a.MobileBertTokenizer,Vi=a.MobileNetV1FeatureExtractor,ji=a.MobileNetV1ForImageClassification,Gi=a.MobileNetV1Model,qi=a.MobileNetV1PreTrainedModel,Ui=a.MobileNetV2FeatureExtractor,Wi=a.MobileNetV2ForImageClassification,Hi=a.MobileNetV2Model,Xi=a.MobileNetV2PreTrainedModel,Ki=a.MobileNetV3FeatureExtractor,Qi=a.MobileNetV3ForImageClassification,Yi=a.MobileNetV3Model,Ji=a.MobileNetV3PreTrainedModel,Zi=a.MobileNetV4FeatureExtractor,ea=a.MobileNetV4ForImageClassification,ta=a.MobileNetV4Model,na=a.MobileNetV4PreTrainedModel,ra=a.MobileViTFeatureExtractor,ia=a.MobileViTForImageClassification,aa=a.MobileViTImageProcessor,sa=a.MobileViTModel,oa=a.MobileViTPreTrainedModel,la=a.MobileViTV2ForImageClassification,ua=a.MobileViTV2Model,da=a.MobileViTV2PreTrainedModel,ca=a.ModelOutput,pa=a.Moondream1ForConditionalGeneration,ha=a.MptForCausalLM,ma=a.MptModel,fa=a.MptPreTrainedModel,ga=a.MusicgenForCausalLM,_a=a.MusicgenForConditionalGeneration,wa=a.MusicgenModel,ya=a.MusicgenPreTrainedModel,ba=a.NllbTokenizer,va=a.NomicBertModel,xa=a.NomicBertPreTrainedModel,Ma=a.NougatImageProcessor,Ta=a.NougatTokenizer,ka=a.OPTForCausalLM,$a=a.OPTModel,Sa=a.OPTPreTrainedModel,Ca=a.ObjectDetectionPipeline,Ea=a.OpenELMForCausalLM,Pa=a.OpenELMModel,Aa=a.OpenELMPreTrainedModel,Fa=a.OwlViTFeatureExtractor,za=a.OwlViTForObjectDetection,Ia=a.OwlViTModel,Oa=a.OwlViTPreTrainedModel,Ba=a.OwlViTProcessor,La=a.Owlv2ForObjectDetection,Da=a.Owlv2ImageProcessor,Ra=a.Owlv2Model,Na=a.Owlv2PreTrainedModel,Va=a.Phi3ForCausalLM,ja=a.Phi3Model,Ga=a.Phi3PreTrainedModel,qa=a.PhiForCausalLM,Ua=a.PhiModel,Wa=a.PhiPreTrainedModel,Ha=a.Pipeline,Xa=a.PreTrainedModel,Ka=a.PreTrainedTokenizer,Qa=a.PretrainedConfig,Ya=a.PretrainedMixin,Ja=a.Processor,Za=a.PyAnnoteFeatureExtractor,es=a.PyAnnoteForAudioFrameClassification,ts=a.PyAnnoteModel,ns=a.PyAnnotePreTrainedModel,rs=a.PyAnnoteProcessor,is=a.QuestionAnsweringModelOutput,as=a.QuestionAnsweringPipeline,ss=a.Qwen2ForCausalLM,os=a.Qwen2Model,ls=a.Qwen2PreTrainedModel,us=a.Qwen2Tokenizer,ds=a.RTDetrForObjectDetection,cs=a.RTDetrImageProcessor,ps=a.RTDetrModel,hs=a.RTDetrObjectDetectionOutput,ms=a.RTDetrPreTrainedModel,fs=a.RawImage,gs=a.ResNetForImageClassification,_s=a.ResNetModel,ws=a.ResNetPreTrainedModel,ys=a.RoFormerForMaskedLM,bs=a.RoFormerForQuestionAnswering,vs=a.RoFormerForSequenceClassification,xs=a.RoFormerForTokenClassification,Ms=a.RoFormerModel,Ts=a.RoFormerPreTrainedModel,ks=a.RoFormerTokenizer,$s=a.RobertaForMaskedLM,Ss=a.RobertaForQuestionAnswering,Cs=a.RobertaForSequenceClassification,Es=a.RobertaForTokenClassification,Ps=a.RobertaModel,As=a.RobertaPreTrainedModel,Fs=a.RobertaTokenizer,zs=a.SamImageProcessor,Is=a.SamImageSegmentationOutput,Os=a.SamModel,Bs=a.SamPreTrainedModel,Ls=a.SamProcessor,Ds=a.SapiensFeatureExtractor,Rs=a.SapiensForDepthEstimation,Ns=a.SapiensForNormalEstimation,Vs=a.SapiensForSemanticSegmentation,js=a.SapiensPreTrainedModel,Gs=a.SeamlessM4TFeatureExtractor,qs=a.SegformerFeatureExtractor,Us=a.SegformerForImageClassification,Ws=a.SegformerForSemanticSegmentation,Hs=a.SegformerModel,Xs=a.SegformerPreTrainedModel,Ks=a.Seq2SeqLMOutput,Qs=a.SequenceClassifierOutput,Ys=a.SiglipImageProcessor,Js=a.SiglipModel,Zs=a.SiglipPreTrainedModel,eo=a.SiglipTextModel,to=a.SiglipTokenizer,no=a.SiglipVisionModel,ro=a.SpeechT5FeatureExtractor,io=a.SpeechT5ForSpeechToText,ao=a.SpeechT5ForTextToSpeech,so=a.SpeechT5HifiGan,oo=a.SpeechT5Model,lo=a.SpeechT5PreTrainedModel,uo=a.SpeechT5Processor,co=a.SpeechT5Tokenizer,po=a.SqueezeBertForMaskedLM,ho=a.SqueezeBertForQuestionAnswering,mo=a.SqueezeBertForSequenceClassification,fo=a.SqueezeBertModel,go=a.SqueezeBertPreTrainedModel,_o=a.SqueezeBertTokenizer,wo=a.StableLmForCausalLM,yo=a.StableLmModel,bo=a.StableLmPreTrainedModel,vo=a.Starcoder2ForCausalLM,xo=a.Starcoder2Model,Mo=a.Starcoder2PreTrainedModel,To=a.StoppingCriteria,ko=a.StoppingCriteriaList,$o=a.SummarizationPipeline,So=a.Swin2SRForImageSuperResolution,Co=a.Swin2SRImageProcessor,Eo=a.Swin2SRModel,Po=a.Swin2SRPreTrainedModel,Ao=a.SwinForImageClassification,Fo=a.SwinModel,zo=a.SwinPreTrainedModel,Io=a.T5ForConditionalGeneration,Oo=a.T5Model,Bo=a.T5PreTrainedModel,Lo=a.T5Tokenizer,Do=a.TableTransformerForObjectDetection,Ro=a.TableTransformerModel,No=a.TableTransformerObjectDetectionOutput,Vo=a.TableTransformerPreTrainedModel,jo=a.Tensor,Go=a.Text2TextGenerationPipeline,qo=a.TextClassificationPipeline,Uo=a.TextGenerationPipeline,Wo=a.TextStreamer,Ho=a.TextToAudioPipeline,Xo=a.TokenClassificationPipeline,Ko=a.TokenClassifierOutput,Qo=a.TokenizerModel,Yo=a.TrOCRForCausalLM,Jo=a.TrOCRPreTrainedModel,Zo=a.TranslationPipeline,el=a.UniSpeechForCTC,tl=a.UniSpeechForSequenceClassification,nl=a.UniSpeechModel,rl=a.UniSpeechPreTrainedModel,il=a.UniSpeechSatForAudioFrameClassification,al=a.UniSpeechSatForCTC,sl=a.UniSpeechSatForSequenceClassification,ol=a.UniSpeechSatModel,ll=a.UniSpeechSatPreTrainedModel,ul=a.ViTFeatureExtractor,dl=a.ViTForImageClassification,cl=a.ViTImageProcessor,pl=a.ViTModel,hl=a.ViTPreTrainedModel,ml=a.VisionEncoderDecoderModel,fl=a.VitMatteForImageMatting,gl=a.VitMatteImageProcessor,_l=a.VitMattePreTrainedModel,wl=a.VitsModel,yl=a.VitsModelOutput,bl=a.VitsPreTrainedModel,vl=a.VitsTokenizer,xl=a.Wav2Vec2BertForCTC,Ml=a.Wav2Vec2BertForSequenceClassification,Tl=a.Wav2Vec2BertModel,kl=a.Wav2Vec2BertPreTrainedModel,$l=a.Wav2Vec2CTCTokenizer,Sl=a.Wav2Vec2FeatureExtractor,Cl=a.Wav2Vec2ForAudioFrameClassification,El=a.Wav2Vec2ForCTC,Pl=a.Wav2Vec2ForSequenceClassification,Al=a.Wav2Vec2Model,Fl=a.Wav2Vec2PreTrainedModel,zl=a.Wav2Vec2ProcessorWithLM,Il=a.WavLMForAudioFrameClassification,Ol=a.WavLMForCTC,Bl=a.WavLMForSequenceClassification,Ll=a.WavLMForXVector,Dl=a.WavLMModel,Rl=a.WavLMPreTrainedModel,Nl=a.WeSpeakerFeatureExtractor,Vl=a.WeSpeakerResNetModel,jl=a.WeSpeakerResNetPreTrainedModel,Gl=a.WhisperFeatureExtractor,ql=a.WhisperForConditionalGeneration,Ul=a.WhisperModel,Wl=a.WhisperPreTrainedModel,Hl=a.WhisperProcessor,Xl=a.WhisperTextStreamer,Kl=a.WhisperTokenizer,Ql=a.XLMForQuestionAnswering,Yl=a.XLMForSequenceClassification,Jl=a.XLMForTokenClassification,Zl=a.XLMModel,eu=a.XLMPreTrainedModel,tu=a.XLMRobertaForMaskedLM,nu=a.XLMRobertaForQuestionAnswering,ru=a.XLMRobertaForSequenceClassification,iu=a.XLMRobertaForTokenClassification,au=a.XLMRobertaModel,su=a.XLMRobertaPreTrainedModel,ou=a.XLMRobertaTokenizer,lu=a.XLMTokenizer,uu=a.XLMWithLMHeadModel,du=a.XVectorOutput,cu=a.YolosFeatureExtractor,pu=a.YolosForObjectDetection,hu=a.YolosModel,mu=a.YolosObjectDetectionOutput,fu=a.YolosPreTrainedModel,gu=a.ZeroShotAudioClassificationPipeline,_u=a.ZeroShotClassificationPipeline,wu=a.ZeroShotImageClassificationPipeline,yu=a.ZeroShotObjectDetectionPipeline,bu=a.bankers_round,vu=a.cat,xu=a.cos_sim,Mu=a.dot,Tu=a.dynamic_time_warping,ku=a.env,$u=a.full,Su=a.full_like,Cu=a.getKeyValueShapes,Eu=a.hamming,Pu=a.hanning,Au=a.interpolate,Fu=a.interpolate_4d,zu=a.interpolate_data,Iu=a.is_chinese_char,Ou=a.layer_norm,Bu=a.log_softmax,Lu=a.magnitude,Du=a.matmul,Ru=a.max,Nu=a.mean,Vu=a.mean_pooling,ju=a.medianFilter,Gu=a.mel_filter_bank,qu=a.min,Uu=a.ones,Wu=a.ones_like,Hu=a.permute,Xu=a.permute_data,Ku=a.pipeline,Qu=a.quantize_embeddings,Yu=a.read_audio,Ju=a.rfft,Zu=a.round,ed=a.softmax,td=a.spectrogram,nd=a.stack,rd=a.std_mean,id=a.topk,ad=a.window_function,sd=a.zeros,od=a.zeros_like;export{w as ASTFeatureExtractor,y as ASTForAudioClassification,b as ASTModel,v as ASTPreTrainedModel,x as AlbertForMaskedLM,M as AlbertForQuestionAnswering,T as AlbertForSequenceClassification,k as AlbertModel,$ as AlbertPreTrainedModel,S as AlbertTokenizer,C as AudioClassificationPipeline,E as AutoConfig,P as AutoModel,A as AutoModelForAudioClassification,F as AutoModelForAudioFrameClassification,z as AutoModelForCTC,I as AutoModelForCausalLM,O as AutoModelForDepthEstimation,B as AutoModelForDocumentQuestionAnswering,L as AutoModelForImageClassification,D as AutoModelForImageFeatureExtraction,R as AutoModelForImageMatting,N as AutoModelForImageSegmentation,V as AutoModelForImageToImage,j as AutoModelForMaskGeneration,G as AutoModelForMaskedLM,q as AutoModelForObjectDetection,U as AutoModelForQuestionAnswering,W as AutoModelForSemanticSegmentation,H as AutoModelForSeq2SeqLM,X as AutoModelForSequenceClassification,K as AutoModelForSpeechSeq2Seq,Q as AutoModelForTextToSpectrogram,Y as AutoModelForTextToWaveform,J as AutoModelForTokenClassification,Z as AutoModelForVision2Seq,ee as AutoModelForXVector,te as AutoModelForZeroShotObjectDetection,ne as AutoProcessor,re as AutoTokenizer,ie as AutomaticSpeechRecognitionPipeline,ae as BartForConditionalGeneration,se as BartForSequenceClassification,oe as BartModel,le as BartPretrainedModel,ue as BartTokenizer,de as BaseModelOutput,ce as BaseStreamer,pe as BeitFeatureExtractor,he as BeitForImageClassification,me as BeitModel,fe as BeitPreTrainedModel,ge as BertForMaskedLM,_e as BertForQuestionAnswering,we as BertForSequenceClassification,ye as BertForTokenClassification,be as BertModel,ve as BertPreTrainedModel,xe as BertTokenizer,Me as BitImageProcessor,Te as BlenderbotForConditionalGeneration,ke as BlenderbotModel,$e as BlenderbotPreTrainedModel,Se as BlenderbotSmallForConditionalGeneration,Ce as BlenderbotSmallModel,Ee as BlenderbotSmallPreTrainedModel,Pe as BlenderbotSmallTokenizer,Ae as BlenderbotTokenizer,Fe as BloomForCausalLM,ze as BloomModel,Ie as BloomPreTrainedModel,Oe as BloomTokenizer,Be as CLIPFeatureExtractor,Le as CLIPImageProcessor,De as CLIPModel,Re as CLIPPreTrainedModel,Ne as CLIPSegForImageSegmentation,Ve as CLIPSegModel,je as CLIPSegPreTrainedModel,Ge as CLIPTextModelWithProjection,qe as CLIPTokenizer,Ue as CLIPVisionModelWithProjection,We as CamembertForMaskedLM,He as CamembertForQuestionAnswering,Xe as CamembertForSequenceClassification,Ke as CamembertForTokenClassification,Qe as CamembertModel,Ye as CamembertPreTrainedModel,Je as CamembertTokenizer,Ze as CausalLMOutput,et as CausalLMOutputWithPast,tt as ChineseCLIPFeatureExtractor,nt as ChineseCLIPModel,rt as ChineseCLIPPreTrainedModel,it as ClapAudioModelWithProjection,at as ClapFeatureExtractor,st as ClapModel,ot as ClapPreTrainedModel,lt as ClapTextModelWithProjection,ut as CodeGenForCausalLM,dt as CodeGenModel,ct as CodeGenPreTrainedModel,pt as CodeGenTokenizer,ht as CodeLlamaTokenizer,mt as CohereForCausalLM,ft as CohereModel,gt as CoherePreTrainedModel,_t as CohereTokenizer,wt as ConvBertForMaskedLM,yt as ConvBertForQuestionAnswering,bt as ConvBertForSequenceClassification,vt as ConvBertForTokenClassification,xt as ConvBertModel,Mt as ConvBertPreTrainedModel,Tt as ConvBertTokenizer,kt as ConvNextFeatureExtractor,$t as ConvNextForImageClassification,St as ConvNextImageProcessor,Ct as ConvNextModel,Et as ConvNextPreTrainedModel,Pt as ConvNextV2ForImageClassification,At as ConvNextV2Model,Ft as ConvNextV2PreTrainedModel,zt as DPTFeatureExtractor,It as DPTForDepthEstimation,Ot as DPTImageProcessor,Bt as DPTModel,Lt as DPTPreTrainedModel,Dt as DebertaForMaskedLM,Rt as DebertaForQuestionAnswering,Nt as DebertaForSequenceClassification,Vt as DebertaForTokenClassification,jt as DebertaModel,Gt as DebertaPreTrainedModel,qt as DebertaTokenizer,Ut as DebertaV2ForMaskedLM,Wt as DebertaV2ForQuestionAnswering,Ht as DebertaV2ForSequenceClassification,Xt as DebertaV2ForTokenClassification,Kt as DebertaV2Model,Qt as DebertaV2PreTrainedModel,Yt as DebertaV2Tokenizer,Jt as DeiTFeatureExtractor,Zt as DeiTForImageClassification,en as DeiTModel,tn as DeiTPreTrainedModel,nn as DepthAnythingForDepthEstimation,rn as DepthAnythingPreTrainedModel,an as DepthEstimationPipeline,sn as DetrFeatureExtractor,on as DetrForObjectDetection,ln as DetrForSegmentation,un as DetrModel,dn as DetrObjectDetectionOutput,cn as DetrPreTrainedModel,pn as DetrSegmentationOutput,hn as Dinov2ForImageClassification,mn as Dinov2Model,fn as Dinov2PreTrainedModel,gn as DistilBertForMaskedLM,_n as DistilBertForQuestionAnswering,wn as DistilBertForSequenceClassification,yn as DistilBertForTokenClassification,bn as DistilBertModel,vn as DistilBertPreTrainedModel,xn as DistilBertTokenizer,Mn as DocumentQuestionAnsweringPipeline,Tn as DonutFeatureExtractor,kn as DonutSwinModel,$n as DonutSwinPreTrainedModel,Sn as EfficientNetForImageClassification,Cn as EfficientNetImageProcessor,En as EfficientNetModel,Pn as EfficientNetPreTrainedModel,An as ElectraForMaskedLM,Fn as ElectraForQuestionAnswering,zn as ElectraForSequenceClassification,In as ElectraForTokenClassification,On as ElectraModel,Bn as ElectraPreTrainedModel,Ln as ElectraTokenizer,Dn as EosTokenCriteria,Rn as EsmForMaskedLM,Nn as EsmForSequenceClassification,Vn as EsmForTokenClassification,jn as EsmModel,Gn as EsmPreTrainedModel,qn as EsmTokenizer,Un as FFT,Wn as FalconForCausalLM,Hn as FalconModel,Xn as FalconPreTrainedModel,Kn as FalconTokenizer,Qn as FastViTForImageClassification,Yn as FastViTModel,Jn as FastViTPreTrainedModel,Zn as FeatureExtractionPipeline,er as FeatureExtractor,tr as FillMaskPipeline,nr as Florence2ForConditionalGeneration,rr as Florence2PreTrainedModel,ir as Florence2Processor,ar as GLPNFeatureExtractor,sr as GLPNForDepthEstimation,or as GLPNModel,lr as GLPNPreTrainedModel,ur as GPT2LMHeadModel,dr as GPT2Model,cr as GPT2PreTrainedModel,pr as GPT2Tokenizer,hr as GPTBigCodeForCausalLM,mr as GPTBigCodeModel,fr as GPTBigCodePreTrainedModel,gr as GPTJForCausalLM,_r as GPTJModel,wr as GPTJPreTrainedModel,yr as GPTNeoForCausalLM,br as GPTNeoModel,vr as GPTNeoPreTrainedModel,xr as GPTNeoXForCausalLM,Mr as GPTNeoXModel,Tr as GPTNeoXPreTrainedModel,kr as GPTNeoXTokenizer,$r as Gemma2ForCausalLM,Sr as Gemma2Model,Cr as Gemma2PreTrainedModel,Er as GemmaForCausalLM,Pr as GemmaModel,Ar as GemmaPreTrainedModel,Fr as GemmaTokenizer,zr as Grok1Tokenizer,Ir as HerbertTokenizer,Or as HubertForCTC,Br as HubertForSequenceClassification,Lr as HubertModel,Dr as HubertPreTrainedModel,Rr as ImageClassificationPipeline,Nr as ImageFeatureExtractionPipeline,Vr as ImageFeatureExtractor,jr as ImageMattingOutput,Gr as ImageSegmentationPipeline,qr as ImageToImagePipeline,Ur as ImageToTextPipeline,Wr as InterruptableStoppingCriteria,Hr as JAISLMHeadModel,Xr as JAISModel,Kr as JAISPreTrainedModel,Qr as LlamaForCausalLM,Yr as LlamaModel,Jr as LlamaPreTrainedModel,Zr as LlamaTokenizer,ei as LlavaForConditionalGeneration,ti as LlavaPreTrainedModel,ni as LongT5ForConditionalGeneration,ri as LongT5Model,ii as LongT5PreTrainedModel,ai as M2M100ForConditionalGeneration,si as M2M100Model,oi as M2M100PreTrainedModel,li as M2M100Tokenizer,ui as MBart50Tokenizer,di as MBartForCausalLM,ci as MBartForConditionalGeneration,pi as MBartForSequenceClassification,hi as MBartModel,mi as MBartPreTrainedModel,fi as MBartTokenizer,gi as MPNetForMaskedLM,_i as MPNetForQuestionAnswering,wi as MPNetForSequenceClassification,yi as MPNetForTokenClassification,bi as MPNetModel,vi as MPNetPreTrainedModel,xi as MPNetTokenizer,Mi as MT5ForConditionalGeneration,Ti as MT5Model,ki as MT5PreTrainedModel,$i as MarianMTModel,Si as MarianModel,Ci as MarianPreTrainedModel,Ei as MarianTokenizer,Pi as MaskedLMOutput,Ai as MaxLengthCriteria,Fi as MistralForCausalLM,zi as MistralModel,Ii as MistralPreTrainedModel,Oi as MobileBertForMaskedLM,Bi as MobileBertForQuestionAnswering,Li as MobileBertForSequenceClassification,Di as MobileBertModel,Ri as MobileBertPreTrainedModel,Ni as MobileBertTokenizer,Vi as MobileNetV1FeatureExtractor,ji as MobileNetV1ForImageClassification,Gi as MobileNetV1Model,qi as MobileNetV1PreTrainedModel,Ui as MobileNetV2FeatureExtractor,Wi as MobileNetV2ForImageClassification,Hi as MobileNetV2Model,Xi as MobileNetV2PreTrainedModel,Ki as MobileNetV3FeatureExtractor,Qi as MobileNetV3ForImageClassification,Yi as MobileNetV3Model,Ji as MobileNetV3PreTrainedModel,Zi as MobileNetV4FeatureExtractor,ea as MobileNetV4ForImageClassification,ta as MobileNetV4Model,na as MobileNetV4PreTrainedModel,ra as MobileViTFeatureExtractor,ia as MobileViTForImageClassification,aa as MobileViTImageProcessor,sa as MobileViTModel,oa as MobileViTPreTrainedModel,la as MobileViTV2ForImageClassification,ua as MobileViTV2Model,da as MobileViTV2PreTrainedModel,ca as ModelOutput,pa as Moondream1ForConditionalGeneration,ha as MptForCausalLM,ma as MptModel,fa as MptPreTrainedModel,ga as MusicgenForCausalLM,_a as MusicgenForConditionalGeneration,wa as MusicgenModel,ya as MusicgenPreTrainedModel,ba as NllbTokenizer,va as NomicBertModel,xa as NomicBertPreTrainedModel,Ma as NougatImageProcessor,Ta as NougatTokenizer,ka as OPTForCausalLM,$a as OPTModel,Sa as OPTPreTrainedModel,Ca as ObjectDetectionPipeline,Ea as OpenELMForCausalLM,Pa as OpenELMModel,Aa as OpenELMPreTrainedModel,Fa as OwlViTFeatureExtractor,za as OwlViTForObjectDetection,Ia as OwlViTModel,Oa as OwlViTPreTrainedModel,Ba as OwlViTProcessor,La as Owlv2ForObjectDetection,Da as Owlv2ImageProcessor,Ra as Owlv2Model,Na as Owlv2PreTrainedModel,Va as Phi3ForCausalLM,ja as Phi3Model,Ga as Phi3PreTrainedModel,qa as PhiForCausalLM,Ua as PhiModel,Wa as PhiPreTrainedModel,Ha as Pipeline,Xa as PreTrainedModel,Ka as PreTrainedTokenizer,Qa as PretrainedConfig,Ya as PretrainedMixin,Ja as Processor,Za as PyAnnoteFeatureExtractor,es as PyAnnoteForAudioFrameClassification,ts as PyAnnoteModel,ns as PyAnnotePreTrainedModel,rs as PyAnnoteProcessor,is as QuestionAnsweringModelOutput,as as QuestionAnsweringPipeline,ss as Qwen2ForCausalLM,os as Qwen2Model,ls as Qwen2PreTrainedModel,us as Qwen2Tokenizer,ds as RTDetrForObjectDetection,cs as RTDetrImageProcessor,ps as RTDetrModel,hs as RTDetrObjectDetectionOutput,ms as RTDetrPreTrainedModel,fs as RawImage,gs as ResNetForImageClassification,_s as ResNetModel,ws as ResNetPreTrainedModel,ys as RoFormerForMaskedLM,bs as RoFormerForQuestionAnswering,vs as RoFormerForSequenceClassification,xs as RoFormerForTokenClassification,Ms as RoFormerModel,Ts as RoFormerPreTrainedModel,ks as RoFormerTokenizer,$s as RobertaForMaskedLM,Ss as RobertaForQuestionAnswering,Cs as RobertaForSequenceClassification,Es as RobertaForTokenClassification,Ps as RobertaModel,As as RobertaPreTrainedModel,Fs as RobertaTokenizer,zs as SamImageProcessor,Is as SamImageSegmentationOutput,Os as SamModel,Bs as SamPreTrainedModel,Ls as SamProcessor,Ds as SapiensFeatureExtractor,Rs as SapiensForDepthEstimation,Ns as SapiensForNormalEstimation,Vs as SapiensForSemanticSegmentation,js as SapiensPreTrainedModel,Gs as SeamlessM4TFeatureExtractor,qs as SegformerFeatureExtractor,Us as SegformerForImageClassification,Ws as SegformerForSemanticSegmentation,Hs as SegformerModel,Xs as SegformerPreTrainedModel,Ks as Seq2SeqLMOutput,Qs as SequenceClassifierOutput,Ys as SiglipImageProcessor,Js as SiglipModel,Zs as SiglipPreTrainedModel,eo as SiglipTextModel,to as SiglipTokenizer,no as SiglipVisionModel,ro as SpeechT5FeatureExtractor,io as SpeechT5ForSpeechToText,ao as SpeechT5ForTextToSpeech,so as SpeechT5HifiGan,oo as SpeechT5Model,lo as SpeechT5PreTrainedModel,uo as SpeechT5Processor,co as SpeechT5Tokenizer,po as SqueezeBertForMaskedLM,ho as SqueezeBertForQuestionAnswering,mo as SqueezeBertForSequenceClassification,fo as SqueezeBertModel,go as SqueezeBertPreTrainedModel,_o as SqueezeBertTokenizer,wo as StableLmForCausalLM,yo as StableLmModel,bo as StableLmPreTrainedModel,vo as Starcoder2ForCausalLM,xo as Starcoder2Model,Mo as Starcoder2PreTrainedModel,To as StoppingCriteria,ko as StoppingCriteriaList,$o as SummarizationPipeline,So as Swin2SRForImageSuperResolution,Co as Swin2SRImageProcessor,Eo as Swin2SRModel,Po as Swin2SRPreTrainedModel,Ao as SwinForImageClassification,Fo as SwinModel,zo as SwinPreTrainedModel,Io as T5ForConditionalGeneration,Oo as T5Model,Bo as T5PreTrainedModel,Lo as T5Tokenizer,Do as TableTransformerForObjectDetection,Ro as TableTransformerModel,No as TableTransformerObjectDetectionOutput,Vo as TableTransformerPreTrainedModel,jo as Tensor,Go as Text2TextGenerationPipeline,qo as TextClassificationPipeline,Uo as TextGenerationPipeline,Wo as TextStreamer,Ho as TextToAudioPipeline,Xo as TokenClassificationPipeline,Ko as TokenClassifierOutput,Qo as TokenizerModel,Yo as TrOCRForCausalLM,Jo as TrOCRPreTrainedModel,Zo as TranslationPipeline,el as UniSpeechForCTC,tl as UniSpeechForSequenceClassification,nl as UniSpeechModel,rl as UniSpeechPreTrainedModel,il as UniSpeechSatForAudioFrameClassification,al as UniSpeechSatForCTC,sl as UniSpeechSatForSequenceClassification,ol as UniSpeechSatModel,ll as UniSpeechSatPreTrainedModel,ul as ViTFeatureExtractor,dl as ViTForImageClassification,cl as ViTImageProcessor,pl as ViTModel,hl as ViTPreTrainedModel,ml as VisionEncoderDecoderModel,fl as VitMatteForImageMatting,gl as VitMatteImageProcessor,_l as VitMattePreTrainedModel,wl as VitsModel,yl as VitsModelOutput,bl as VitsPreTrainedModel,vl as VitsTokenizer,xl as Wav2Vec2BertForCTC,Ml as Wav2Vec2BertForSequenceClassification,Tl as Wav2Vec2BertModel,kl as Wav2Vec2BertPreTrainedModel,$l as Wav2Vec2CTCTokenizer,Sl as Wav2Vec2FeatureExtractor,Cl as Wav2Vec2ForAudioFrameClassification,El as Wav2Vec2ForCTC,Pl as Wav2Vec2ForSequenceClassification,Al as Wav2Vec2Model,Fl as Wav2Vec2PreTrainedModel,zl as Wav2Vec2ProcessorWithLM,Il as WavLMForAudioFrameClassification,Ol as WavLMForCTC,Bl as WavLMForSequenceClassification,Ll as WavLMForXVector,Dl as WavLMModel,Rl as WavLMPreTrainedModel,Nl as WeSpeakerFeatureExtractor,Vl as WeSpeakerResNetModel,jl as WeSpeakerResNetPreTrainedModel,Gl as WhisperFeatureExtractor,ql as WhisperForConditionalGeneration,Ul as WhisperModel,Wl as WhisperPreTrainedModel,Hl as WhisperProcessor,Xl as WhisperTextStreamer,Kl as WhisperTokenizer,Ql as XLMForQuestionAnswering,Yl as XLMForSequenceClassification,Jl as XLMForTokenClassification,Zl as XLMModel,eu as XLMPreTrainedModel,tu as XLMRobertaForMaskedLM,nu as XLMRobertaForQuestionAnswering,ru as XLMRobertaForSequenceClassification,iu as XLMRobertaForTokenClassification,au as XLMRobertaModel,su as XLMRobertaPreTrainedModel,ou as XLMRobertaTokenizer,lu as XLMTokenizer,uu as XLMWithLMHeadModel,du as XVectorOutput,cu as YolosFeatureExtractor,pu as YolosForObjectDetection,hu as YolosModel,mu as YolosObjectDetectionOutput,fu as YolosPreTrainedModel,gu as ZeroShotAudioClassificationPipeline,_u as ZeroShotClassificationPipeline,wu as ZeroShotImageClassificationPipeline,yu as ZeroShotObjectDetectionPipeline,bu as bankers_round,vu as cat,xu as cos_sim,Mu as dot,Tu as dynamic_time_warping,ku as env,$u as full,Su as full_like,Cu as getKeyValueShapes,Eu as hamming,Pu as hanning,Au as interpolate,Fu as interpolate_4d,zu as interpolate_data,Iu as is_chinese_char,Ou as layer_norm,Bu as log_softmax,Lu as magnitude,Du as matmul,Ru as max,Nu as mean,Vu as mean_pooling,ju as medianFilter,Gu as mel_filter_bank,qu as min,Uu as ones,Wu as ones_like,Hu as permute,Xu as permute_data,Ku as pipeline,Qu as quantize_embeddings,Yu as read_audio,Ju as rfft,Zu as round,ed as softmax,td as spectrogram,nd as stack,rd as std_mean,id as topk,ad as window_function,sd as zeros,od as zeros_like};
229
+ \*****************************/i.r(a),i.d(a,{ASTFeatureExtractor:()=>d.ASTFeatureExtractor,ASTForAudioClassification:()=>l.ASTForAudioClassification,ASTModel:()=>l.ASTModel,ASTPreTrainedModel:()=>l.ASTPreTrainedModel,AlbertForMaskedLM:()=>l.AlbertForMaskedLM,AlbertForQuestionAnswering:()=>l.AlbertForQuestionAnswering,AlbertForSequenceClassification:()=>l.AlbertForSequenceClassification,AlbertModel:()=>l.AlbertModel,AlbertPreTrainedModel:()=>l.AlbertPreTrainedModel,AlbertTokenizer:()=>u.AlbertTokenizer,AudioClassificationPipeline:()=>o.AudioClassificationPipeline,AutoConfig:()=>c.AutoConfig,AutoModel:()=>l.AutoModel,AutoModelForAudioClassification:()=>l.AutoModelForAudioClassification,AutoModelForAudioFrameClassification:()=>l.AutoModelForAudioFrameClassification,AutoModelForCTC:()=>l.AutoModelForCTC,AutoModelForCausalLM:()=>l.AutoModelForCausalLM,AutoModelForDepthEstimation:()=>l.AutoModelForDepthEstimation,AutoModelForDocumentQuestionAnswering:()=>l.AutoModelForDocumentQuestionAnswering,AutoModelForImageClassification:()=>l.AutoModelForImageClassification,AutoModelForImageFeatureExtraction:()=>l.AutoModelForImageFeatureExtraction,AutoModelForImageMatting:()=>l.AutoModelForImageMatting,AutoModelForImageSegmentation:()=>l.AutoModelForImageSegmentation,AutoModelForImageToImage:()=>l.AutoModelForImageToImage,AutoModelForMaskGeneration:()=>l.AutoModelForMaskGeneration,AutoModelForMaskedLM:()=>l.AutoModelForMaskedLM,AutoModelForNormalEstimation:()=>l.AutoModelForNormalEstimation,AutoModelForObjectDetection:()=>l.AutoModelForObjectDetection,AutoModelForQuestionAnswering:()=>l.AutoModelForQuestionAnswering,AutoModelForSemanticSegmentation:()=>l.AutoModelForSemanticSegmentation,AutoModelForSeq2SeqLM:()=>l.AutoModelForSeq2SeqLM,AutoModelForSequenceClassification:()=>l.AutoModelForSequenceClassification,AutoModelForSpeechSeq2Seq:()=>l.AutoModelForSpeechSeq2Seq,AutoModelForTextToSpectrogram:()=>l.AutoModelForTextToSpectrogram,AutoModelForTextToWaveform:()=>l.AutoModelForTextToWaveform,AutoModelForTokenClassification:()=>l.AutoModelForTokenClassification,AutoModelForVision2Seq:()=>l.AutoModelForVision2Seq,AutoModelForXVector:()=>l.AutoModelForXVector,AutoModelForZeroShotObjectDetection:()=>l.AutoModelForZeroShotObjectDetection,AutoProcessor:()=>d.AutoProcessor,AutoTokenizer:()=>u.AutoTokenizer,AutomaticSpeechRecognitionPipeline:()=>o.AutomaticSpeechRecognitionPipeline,BartForConditionalGeneration:()=>l.BartForConditionalGeneration,BartForSequenceClassification:()=>l.BartForSequenceClassification,BartModel:()=>l.BartModel,BartPretrainedModel:()=>l.BartPretrainedModel,BartTokenizer:()=>u.BartTokenizer,BaseModelOutput:()=>l.BaseModelOutput,BaseStreamer:()=>g.BaseStreamer,BeitFeatureExtractor:()=>d.BeitFeatureExtractor,BeitForImageClassification:()=>l.BeitForImageClassification,BeitModel:()=>l.BeitModel,BeitPreTrainedModel:()=>l.BeitPreTrainedModel,BertForMaskedLM:()=>l.BertForMaskedLM,BertForQuestionAnswering:()=>l.BertForQuestionAnswering,BertForSequenceClassification:()=>l.BertForSequenceClassification,BertForTokenClassification:()=>l.BertForTokenClassification,BertModel:()=>l.BertModel,BertPreTrainedModel:()=>l.BertPreTrainedModel,BertTokenizer:()=>u.BertTokenizer,BitImageProcessor:()=>d.BitImageProcessor,BlenderbotForConditionalGeneration:()=>l.BlenderbotForConditionalGeneration,BlenderbotModel:()=>l.BlenderbotModel,BlenderbotPreTrainedModel:()=>l.BlenderbotPreTrainedModel,BlenderbotSmallForConditionalGeneration:()=>l.BlenderbotSmallForConditionalGeneration,BlenderbotSmallModel:()=>l.BlenderbotSmallModel,BlenderbotSmallPreTrainedModel:()=>l.BlenderbotSmallPreTrainedModel,BlenderbotSmallTokenizer:()=>u.BlenderbotSmallTokenizer,BlenderbotTokenizer:()=>u.BlenderbotTokenizer,BloomForCausalLM:()=>l.BloomForCausalLM,BloomModel:()=>l.BloomModel,BloomPreTrainedModel:()=>l.BloomPreTrainedModel,BloomTokenizer:()=>u.BloomTokenizer,CLIPFeatureExtractor:()=>d.CLIPFeatureExtractor,CLIPImageProcessor:()=>d.CLIPImageProcessor,CLIPModel:()=>l.CLIPModel,CLIPPreTrainedModel:()=>l.CLIPPreTrainedModel,CLIPSegForImageSegmentation:()=>l.CLIPSegForImageSegmentation,CLIPSegModel:()=>l.CLIPSegModel,CLIPSegPreTrainedModel:()=>l.CLIPSegPreTrainedModel,CLIPTextModelWithProjection:()=>l.CLIPTextModelWithProjection,CLIPTokenizer:()=>u.CLIPTokenizer,CLIPVisionModelWithProjection:()=>l.CLIPVisionModelWithProjection,CamembertForMaskedLM:()=>l.CamembertForMaskedLM,CamembertForQuestionAnswering:()=>l.CamembertForQuestionAnswering,CamembertForSequenceClassification:()=>l.CamembertForSequenceClassification,CamembertForTokenClassification:()=>l.CamembertForTokenClassification,CamembertModel:()=>l.CamembertModel,CamembertPreTrainedModel:()=>l.CamembertPreTrainedModel,CamembertTokenizer:()=>u.CamembertTokenizer,CausalLMOutput:()=>l.CausalLMOutput,CausalLMOutputWithPast:()=>l.CausalLMOutputWithPast,ChineseCLIPFeatureExtractor:()=>d.ChineseCLIPFeatureExtractor,ChineseCLIPModel:()=>l.ChineseCLIPModel,ChineseCLIPPreTrainedModel:()=>l.ChineseCLIPPreTrainedModel,ClapAudioModelWithProjection:()=>l.ClapAudioModelWithProjection,ClapFeatureExtractor:()=>d.ClapFeatureExtractor,ClapModel:()=>l.ClapModel,ClapPreTrainedModel:()=>l.ClapPreTrainedModel,ClapTextModelWithProjection:()=>l.ClapTextModelWithProjection,CodeGenForCausalLM:()=>l.CodeGenForCausalLM,CodeGenModel:()=>l.CodeGenModel,CodeGenPreTrainedModel:()=>l.CodeGenPreTrainedModel,CodeGenTokenizer:()=>u.CodeGenTokenizer,CodeLlamaTokenizer:()=>u.CodeLlamaTokenizer,CohereForCausalLM:()=>l.CohereForCausalLM,CohereModel:()=>l.CohereModel,CoherePreTrainedModel:()=>l.CoherePreTrainedModel,CohereTokenizer:()=>u.CohereTokenizer,ConvBertForMaskedLM:()=>l.ConvBertForMaskedLM,ConvBertForQuestionAnswering:()=>l.ConvBertForQuestionAnswering,ConvBertForSequenceClassification:()=>l.ConvBertForSequenceClassification,ConvBertForTokenClassification:()=>l.ConvBertForTokenClassification,ConvBertModel:()=>l.ConvBertModel,ConvBertPreTrainedModel:()=>l.ConvBertPreTrainedModel,ConvBertTokenizer:()=>u.ConvBertTokenizer,ConvNextFeatureExtractor:()=>d.ConvNextFeatureExtractor,ConvNextForImageClassification:()=>l.ConvNextForImageClassification,ConvNextImageProcessor:()=>d.ConvNextImageProcessor,ConvNextModel:()=>l.ConvNextModel,ConvNextPreTrainedModel:()=>l.ConvNextPreTrainedModel,ConvNextV2ForImageClassification:()=>l.ConvNextV2ForImageClassification,ConvNextV2Model:()=>l.ConvNextV2Model,ConvNextV2PreTrainedModel:()=>l.ConvNextV2PreTrainedModel,DPTFeatureExtractor:()=>d.DPTFeatureExtractor,DPTForDepthEstimation:()=>l.DPTForDepthEstimation,DPTImageProcessor:()=>d.DPTImageProcessor,DPTModel:()=>l.DPTModel,DPTPreTrainedModel:()=>l.DPTPreTrainedModel,DebertaForMaskedLM:()=>l.DebertaForMaskedLM,DebertaForQuestionAnswering:()=>l.DebertaForQuestionAnswering,DebertaForSequenceClassification:()=>l.DebertaForSequenceClassification,DebertaForTokenClassification:()=>l.DebertaForTokenClassification,DebertaModel:()=>l.DebertaModel,DebertaPreTrainedModel:()=>l.DebertaPreTrainedModel,DebertaTokenizer:()=>u.DebertaTokenizer,DebertaV2ForMaskedLM:()=>l.DebertaV2ForMaskedLM,DebertaV2ForQuestionAnswering:()=>l.DebertaV2ForQuestionAnswering,DebertaV2ForSequenceClassification:()=>l.DebertaV2ForSequenceClassification,DebertaV2ForTokenClassification:()=>l.DebertaV2ForTokenClassification,DebertaV2Model:()=>l.DebertaV2Model,DebertaV2PreTrainedModel:()=>l.DebertaV2PreTrainedModel,DebertaV2Tokenizer:()=>u.DebertaV2Tokenizer,DeiTFeatureExtractor:()=>d.DeiTFeatureExtractor,DeiTForImageClassification:()=>l.DeiTForImageClassification,DeiTModel:()=>l.DeiTModel,DeiTPreTrainedModel:()=>l.DeiTPreTrainedModel,DepthAnythingForDepthEstimation:()=>l.DepthAnythingForDepthEstimation,DepthAnythingPreTrainedModel:()=>l.DepthAnythingPreTrainedModel,DepthEstimationPipeline:()=>o.DepthEstimationPipeline,DetrFeatureExtractor:()=>d.DetrFeatureExtractor,DetrForObjectDetection:()=>l.DetrForObjectDetection,DetrForSegmentation:()=>l.DetrForSegmentation,DetrModel:()=>l.DetrModel,DetrObjectDetectionOutput:()=>l.DetrObjectDetectionOutput,DetrPreTrainedModel:()=>l.DetrPreTrainedModel,DetrSegmentationOutput:()=>l.DetrSegmentationOutput,Dinov2ForImageClassification:()=>l.Dinov2ForImageClassification,Dinov2Model:()=>l.Dinov2Model,Dinov2PreTrainedModel:()=>l.Dinov2PreTrainedModel,DistilBertForMaskedLM:()=>l.DistilBertForMaskedLM,DistilBertForQuestionAnswering:()=>l.DistilBertForQuestionAnswering,DistilBertForSequenceClassification:()=>l.DistilBertForSequenceClassification,DistilBertForTokenClassification:()=>l.DistilBertForTokenClassification,DistilBertModel:()=>l.DistilBertModel,DistilBertPreTrainedModel:()=>l.DistilBertPreTrainedModel,DistilBertTokenizer:()=>u.DistilBertTokenizer,DocumentQuestionAnsweringPipeline:()=>o.DocumentQuestionAnsweringPipeline,DonutFeatureExtractor:()=>d.DonutFeatureExtractor,DonutSwinModel:()=>l.DonutSwinModel,DonutSwinPreTrainedModel:()=>l.DonutSwinPreTrainedModel,EfficientNetForImageClassification:()=>l.EfficientNetForImageClassification,EfficientNetImageProcessor:()=>d.EfficientNetImageProcessor,EfficientNetModel:()=>l.EfficientNetModel,EfficientNetPreTrainedModel:()=>l.EfficientNetPreTrainedModel,ElectraForMaskedLM:()=>l.ElectraForMaskedLM,ElectraForQuestionAnswering:()=>l.ElectraForQuestionAnswering,ElectraForSequenceClassification:()=>l.ElectraForSequenceClassification,ElectraForTokenClassification:()=>l.ElectraForTokenClassification,ElectraModel:()=>l.ElectraModel,ElectraPreTrainedModel:()=>l.ElectraPreTrainedModel,ElectraTokenizer:()=>u.ElectraTokenizer,EosTokenCriteria:()=>_.EosTokenCriteria,EsmForMaskedLM:()=>l.EsmForMaskedLM,EsmForSequenceClassification:()=>l.EsmForSequenceClassification,EsmForTokenClassification:()=>l.EsmForTokenClassification,EsmModel:()=>l.EsmModel,EsmPreTrainedModel:()=>l.EsmPreTrainedModel,EsmTokenizer:()=>u.EsmTokenizer,FFT:()=>f.FFT,FalconForCausalLM:()=>l.FalconForCausalLM,FalconModel:()=>l.FalconModel,FalconPreTrainedModel:()=>l.FalconPreTrainedModel,FalconTokenizer:()=>u.FalconTokenizer,FastViTForImageClassification:()=>l.FastViTForImageClassification,FastViTModel:()=>l.FastViTModel,FastViTPreTrainedModel:()=>l.FastViTPreTrainedModel,FeatureExtractionPipeline:()=>o.FeatureExtractionPipeline,FeatureExtractor:()=>d.FeatureExtractor,FillMaskPipeline:()=>o.FillMaskPipeline,Florence2ForConditionalGeneration:()=>l.Florence2ForConditionalGeneration,Florence2PreTrainedModel:()=>l.Florence2PreTrainedModel,Florence2Processor:()=>d.Florence2Processor,GLPNFeatureExtractor:()=>d.GLPNFeatureExtractor,GLPNForDepthEstimation:()=>l.GLPNForDepthEstimation,GLPNModel:()=>l.GLPNModel,GLPNPreTrainedModel:()=>l.GLPNPreTrainedModel,GPT2LMHeadModel:()=>l.GPT2LMHeadModel,GPT2Model:()=>l.GPT2Model,GPT2PreTrainedModel:()=>l.GPT2PreTrainedModel,GPT2Tokenizer:()=>u.GPT2Tokenizer,GPTBigCodeForCausalLM:()=>l.GPTBigCodeForCausalLM,GPTBigCodeModel:()=>l.GPTBigCodeModel,GPTBigCodePreTrainedModel:()=>l.GPTBigCodePreTrainedModel,GPTJForCausalLM:()=>l.GPTJForCausalLM,GPTJModel:()=>l.GPTJModel,GPTJPreTrainedModel:()=>l.GPTJPreTrainedModel,GPTNeoForCausalLM:()=>l.GPTNeoForCausalLM,GPTNeoModel:()=>l.GPTNeoModel,GPTNeoPreTrainedModel:()=>l.GPTNeoPreTrainedModel,GPTNeoXForCausalLM:()=>l.GPTNeoXForCausalLM,GPTNeoXModel:()=>l.GPTNeoXModel,GPTNeoXPreTrainedModel:()=>l.GPTNeoXPreTrainedModel,GPTNeoXTokenizer:()=>u.GPTNeoXTokenizer,Gemma2ForCausalLM:()=>l.Gemma2ForCausalLM,Gemma2Model:()=>l.Gemma2Model,Gemma2PreTrainedModel:()=>l.Gemma2PreTrainedModel,GemmaForCausalLM:()=>l.GemmaForCausalLM,GemmaModel:()=>l.GemmaModel,GemmaPreTrainedModel:()=>l.GemmaPreTrainedModel,GemmaTokenizer:()=>u.GemmaTokenizer,Grok1Tokenizer:()=>u.Grok1Tokenizer,HerbertTokenizer:()=>u.HerbertTokenizer,HubertForCTC:()=>l.HubertForCTC,HubertForSequenceClassification:()=>l.HubertForSequenceClassification,HubertModel:()=>l.HubertModel,HubertPreTrainedModel:()=>l.HubertPreTrainedModel,ImageClassificationPipeline:()=>o.ImageClassificationPipeline,ImageFeatureExtractionPipeline:()=>o.ImageFeatureExtractionPipeline,ImageFeatureExtractor:()=>d.ImageFeatureExtractor,ImageMattingOutput:()=>l.ImageMattingOutput,ImageSegmentationPipeline:()=>o.ImageSegmentationPipeline,ImageToImagePipeline:()=>o.ImageToImagePipeline,ImageToTextPipeline:()=>o.ImageToTextPipeline,InterruptableStoppingCriteria:()=>_.InterruptableStoppingCriteria,JAISLMHeadModel:()=>l.JAISLMHeadModel,JAISModel:()=>l.JAISModel,JAISPreTrainedModel:()=>l.JAISPreTrainedModel,LlamaForCausalLM:()=>l.LlamaForCausalLM,LlamaModel:()=>l.LlamaModel,LlamaPreTrainedModel:()=>l.LlamaPreTrainedModel,LlamaTokenizer:()=>u.LlamaTokenizer,LlavaForConditionalGeneration:()=>l.LlavaForConditionalGeneration,LlavaPreTrainedModel:()=>l.LlavaPreTrainedModel,LongT5ForConditionalGeneration:()=>l.LongT5ForConditionalGeneration,LongT5Model:()=>l.LongT5Model,LongT5PreTrainedModel:()=>l.LongT5PreTrainedModel,M2M100ForConditionalGeneration:()=>l.M2M100ForConditionalGeneration,M2M100Model:()=>l.M2M100Model,M2M100PreTrainedModel:()=>l.M2M100PreTrainedModel,M2M100Tokenizer:()=>u.M2M100Tokenizer,MBart50Tokenizer:()=>u.MBart50Tokenizer,MBartForCausalLM:()=>l.MBartForCausalLM,MBartForConditionalGeneration:()=>l.MBartForConditionalGeneration,MBartForSequenceClassification:()=>l.MBartForSequenceClassification,MBartModel:()=>l.MBartModel,MBartPreTrainedModel:()=>l.MBartPreTrainedModel,MBartTokenizer:()=>u.MBartTokenizer,MPNetForMaskedLM:()=>l.MPNetForMaskedLM,MPNetForQuestionAnswering:()=>l.MPNetForQuestionAnswering,MPNetForSequenceClassification:()=>l.MPNetForSequenceClassification,MPNetForTokenClassification:()=>l.MPNetForTokenClassification,MPNetModel:()=>l.MPNetModel,MPNetPreTrainedModel:()=>l.MPNetPreTrainedModel,MPNetTokenizer:()=>u.MPNetTokenizer,MT5ForConditionalGeneration:()=>l.MT5ForConditionalGeneration,MT5Model:()=>l.MT5Model,MT5PreTrainedModel:()=>l.MT5PreTrainedModel,MarianMTModel:()=>l.MarianMTModel,MarianModel:()=>l.MarianModel,MarianPreTrainedModel:()=>l.MarianPreTrainedModel,MarianTokenizer:()=>u.MarianTokenizer,MaskedLMOutput:()=>l.MaskedLMOutput,MaxLengthCriteria:()=>_.MaxLengthCriteria,MistralForCausalLM:()=>l.MistralForCausalLM,MistralModel:()=>l.MistralModel,MistralPreTrainedModel:()=>l.MistralPreTrainedModel,MobileBertForMaskedLM:()=>l.MobileBertForMaskedLM,MobileBertForQuestionAnswering:()=>l.MobileBertForQuestionAnswering,MobileBertForSequenceClassification:()=>l.MobileBertForSequenceClassification,MobileBertModel:()=>l.MobileBertModel,MobileBertPreTrainedModel:()=>l.MobileBertPreTrainedModel,MobileBertTokenizer:()=>u.MobileBertTokenizer,MobileNetV1FeatureExtractor:()=>d.MobileNetV1FeatureExtractor,MobileNetV1ForImageClassification:()=>l.MobileNetV1ForImageClassification,MobileNetV1Model:()=>l.MobileNetV1Model,MobileNetV1PreTrainedModel:()=>l.MobileNetV1PreTrainedModel,MobileNetV2FeatureExtractor:()=>d.MobileNetV2FeatureExtractor,MobileNetV2ForImageClassification:()=>l.MobileNetV2ForImageClassification,MobileNetV2Model:()=>l.MobileNetV2Model,MobileNetV2PreTrainedModel:()=>l.MobileNetV2PreTrainedModel,MobileNetV3FeatureExtractor:()=>d.MobileNetV3FeatureExtractor,MobileNetV3ForImageClassification:()=>l.MobileNetV3ForImageClassification,MobileNetV3Model:()=>l.MobileNetV3Model,MobileNetV3PreTrainedModel:()=>l.MobileNetV3PreTrainedModel,MobileNetV4FeatureExtractor:()=>d.MobileNetV4FeatureExtractor,MobileNetV4ForImageClassification:()=>l.MobileNetV4ForImageClassification,MobileNetV4Model:()=>l.MobileNetV4Model,MobileNetV4PreTrainedModel:()=>l.MobileNetV4PreTrainedModel,MobileViTFeatureExtractor:()=>d.MobileViTFeatureExtractor,MobileViTForImageClassification:()=>l.MobileViTForImageClassification,MobileViTImageProcessor:()=>d.MobileViTImageProcessor,MobileViTModel:()=>l.MobileViTModel,MobileViTPreTrainedModel:()=>l.MobileViTPreTrainedModel,MobileViTV2ForImageClassification:()=>l.MobileViTV2ForImageClassification,MobileViTV2Model:()=>l.MobileViTV2Model,MobileViTV2PreTrainedModel:()=>l.MobileViTV2PreTrainedModel,ModelOutput:()=>l.ModelOutput,Moondream1ForConditionalGeneration:()=>l.Moondream1ForConditionalGeneration,MptForCausalLM:()=>l.MptForCausalLM,MptModel:()=>l.MptModel,MptPreTrainedModel:()=>l.MptPreTrainedModel,MusicgenForCausalLM:()=>l.MusicgenForCausalLM,MusicgenForConditionalGeneration:()=>l.MusicgenForConditionalGeneration,MusicgenModel:()=>l.MusicgenModel,MusicgenPreTrainedModel:()=>l.MusicgenPreTrainedModel,NllbTokenizer:()=>u.NllbTokenizer,NomicBertModel:()=>l.NomicBertModel,NomicBertPreTrainedModel:()=>l.NomicBertPreTrainedModel,NougatImageProcessor:()=>d.NougatImageProcessor,NougatTokenizer:()=>u.NougatTokenizer,OPTForCausalLM:()=>l.OPTForCausalLM,OPTModel:()=>l.OPTModel,OPTPreTrainedModel:()=>l.OPTPreTrainedModel,ObjectDetectionPipeline:()=>o.ObjectDetectionPipeline,OpenELMForCausalLM:()=>l.OpenELMForCausalLM,OpenELMModel:()=>l.OpenELMModel,OpenELMPreTrainedModel:()=>l.OpenELMPreTrainedModel,OwlViTFeatureExtractor:()=>d.OwlViTFeatureExtractor,OwlViTForObjectDetection:()=>l.OwlViTForObjectDetection,OwlViTModel:()=>l.OwlViTModel,OwlViTPreTrainedModel:()=>l.OwlViTPreTrainedModel,OwlViTProcessor:()=>d.OwlViTProcessor,Owlv2ForObjectDetection:()=>l.Owlv2ForObjectDetection,Owlv2ImageProcessor:()=>d.Owlv2ImageProcessor,Owlv2Model:()=>l.Owlv2Model,Owlv2PreTrainedModel:()=>l.Owlv2PreTrainedModel,Phi3ForCausalLM:()=>l.Phi3ForCausalLM,Phi3Model:()=>l.Phi3Model,Phi3PreTrainedModel:()=>l.Phi3PreTrainedModel,PhiForCausalLM:()=>l.PhiForCausalLM,PhiModel:()=>l.PhiModel,PhiPreTrainedModel:()=>l.PhiPreTrainedModel,Pipeline:()=>o.Pipeline,PreTrainedModel:()=>l.PreTrainedModel,PreTrainedTokenizer:()=>u.PreTrainedTokenizer,PretrainedConfig:()=>c.PretrainedConfig,PretrainedMixin:()=>l.PretrainedMixin,Processor:()=>d.Processor,PyAnnoteFeatureExtractor:()=>d.PyAnnoteFeatureExtractor,PyAnnoteForAudioFrameClassification:()=>l.PyAnnoteForAudioFrameClassification,PyAnnoteModel:()=>l.PyAnnoteModel,PyAnnotePreTrainedModel:()=>l.PyAnnotePreTrainedModel,PyAnnoteProcessor:()=>d.PyAnnoteProcessor,QuestionAnsweringModelOutput:()=>l.QuestionAnsweringModelOutput,QuestionAnsweringPipeline:()=>o.QuestionAnsweringPipeline,Qwen2ForCausalLM:()=>l.Qwen2ForCausalLM,Qwen2Model:()=>l.Qwen2Model,Qwen2PreTrainedModel:()=>l.Qwen2PreTrainedModel,Qwen2Tokenizer:()=>u.Qwen2Tokenizer,RTDetrForObjectDetection:()=>l.RTDetrForObjectDetection,RTDetrImageProcessor:()=>d.RTDetrImageProcessor,RTDetrModel:()=>l.RTDetrModel,RTDetrObjectDetectionOutput:()=>l.RTDetrObjectDetectionOutput,RTDetrPreTrainedModel:()=>l.RTDetrPreTrainedModel,RawImage:()=>h.RawImage,ResNetForImageClassification:()=>l.ResNetForImageClassification,ResNetModel:()=>l.ResNetModel,ResNetPreTrainedModel:()=>l.ResNetPreTrainedModel,RoFormerForMaskedLM:()=>l.RoFormerForMaskedLM,RoFormerForQuestionAnswering:()=>l.RoFormerForQuestionAnswering,RoFormerForSequenceClassification:()=>l.RoFormerForSequenceClassification,RoFormerForTokenClassification:()=>l.RoFormerForTokenClassification,RoFormerModel:()=>l.RoFormerModel,RoFormerPreTrainedModel:()=>l.RoFormerPreTrainedModel,RoFormerTokenizer:()=>u.RoFormerTokenizer,RobertaForMaskedLM:()=>l.RobertaForMaskedLM,RobertaForQuestionAnswering:()=>l.RobertaForQuestionAnswering,RobertaForSequenceClassification:()=>l.RobertaForSequenceClassification,RobertaForTokenClassification:()=>l.RobertaForTokenClassification,RobertaModel:()=>l.RobertaModel,RobertaPreTrainedModel:()=>l.RobertaPreTrainedModel,RobertaTokenizer:()=>u.RobertaTokenizer,SamImageProcessor:()=>d.SamImageProcessor,SamImageSegmentationOutput:()=>l.SamImageSegmentationOutput,SamModel:()=>l.SamModel,SamPreTrainedModel:()=>l.SamPreTrainedModel,SamProcessor:()=>d.SamProcessor,SapiensFeatureExtractor:()=>d.SapiensFeatureExtractor,SapiensForDepthEstimation:()=>l.SapiensForDepthEstimation,SapiensForNormalEstimation:()=>l.SapiensForNormalEstimation,SapiensForSemanticSegmentation:()=>l.SapiensForSemanticSegmentation,SapiensPreTrainedModel:()=>l.SapiensPreTrainedModel,SeamlessM4TFeatureExtractor:()=>d.SeamlessM4TFeatureExtractor,SegformerFeatureExtractor:()=>d.SegformerFeatureExtractor,SegformerForImageClassification:()=>l.SegformerForImageClassification,SegformerForSemanticSegmentation:()=>l.SegformerForSemanticSegmentation,SegformerModel:()=>l.SegformerModel,SegformerPreTrainedModel:()=>l.SegformerPreTrainedModel,Seq2SeqLMOutput:()=>l.Seq2SeqLMOutput,SequenceClassifierOutput:()=>l.SequenceClassifierOutput,SiglipImageProcessor:()=>d.SiglipImageProcessor,SiglipModel:()=>l.SiglipModel,SiglipPreTrainedModel:()=>l.SiglipPreTrainedModel,SiglipTextModel:()=>l.SiglipTextModel,SiglipTokenizer:()=>u.SiglipTokenizer,SiglipVisionModel:()=>l.SiglipVisionModel,SpeechT5FeatureExtractor:()=>d.SpeechT5FeatureExtractor,SpeechT5ForSpeechToText:()=>l.SpeechT5ForSpeechToText,SpeechT5ForTextToSpeech:()=>l.SpeechT5ForTextToSpeech,SpeechT5HifiGan:()=>l.SpeechT5HifiGan,SpeechT5Model:()=>l.SpeechT5Model,SpeechT5PreTrainedModel:()=>l.SpeechT5PreTrainedModel,SpeechT5Processor:()=>d.SpeechT5Processor,SpeechT5Tokenizer:()=>u.SpeechT5Tokenizer,SqueezeBertForMaskedLM:()=>l.SqueezeBertForMaskedLM,SqueezeBertForQuestionAnswering:()=>l.SqueezeBertForQuestionAnswering,SqueezeBertForSequenceClassification:()=>l.SqueezeBertForSequenceClassification,SqueezeBertModel:()=>l.SqueezeBertModel,SqueezeBertPreTrainedModel:()=>l.SqueezeBertPreTrainedModel,SqueezeBertTokenizer:()=>u.SqueezeBertTokenizer,StableLmForCausalLM:()=>l.StableLmForCausalLM,StableLmModel:()=>l.StableLmModel,StableLmPreTrainedModel:()=>l.StableLmPreTrainedModel,Starcoder2ForCausalLM:()=>l.Starcoder2ForCausalLM,Starcoder2Model:()=>l.Starcoder2Model,Starcoder2PreTrainedModel:()=>l.Starcoder2PreTrainedModel,StoppingCriteria:()=>_.StoppingCriteria,StoppingCriteriaList:()=>_.StoppingCriteriaList,SummarizationPipeline:()=>o.SummarizationPipeline,Swin2SRForImageSuperResolution:()=>l.Swin2SRForImageSuperResolution,Swin2SRImageProcessor:()=>d.Swin2SRImageProcessor,Swin2SRModel:()=>l.Swin2SRModel,Swin2SRPreTrainedModel:()=>l.Swin2SRPreTrainedModel,SwinForImageClassification:()=>l.SwinForImageClassification,SwinModel:()=>l.SwinModel,SwinPreTrainedModel:()=>l.SwinPreTrainedModel,T5ForConditionalGeneration:()=>l.T5ForConditionalGeneration,T5Model:()=>l.T5Model,T5PreTrainedModel:()=>l.T5PreTrainedModel,T5Tokenizer:()=>u.T5Tokenizer,TableTransformerForObjectDetection:()=>l.TableTransformerForObjectDetection,TableTransformerModel:()=>l.TableTransformerModel,TableTransformerObjectDetectionOutput:()=>l.TableTransformerObjectDetectionOutput,TableTransformerPreTrainedModel:()=>l.TableTransformerPreTrainedModel,Tensor:()=>m.Tensor,Text2TextGenerationPipeline:()=>o.Text2TextGenerationPipeline,TextClassificationPipeline:()=>o.TextClassificationPipeline,TextGenerationPipeline:()=>o.TextGenerationPipeline,TextStreamer:()=>g.TextStreamer,TextToAudioPipeline:()=>o.TextToAudioPipeline,TokenClassificationPipeline:()=>o.TokenClassificationPipeline,TokenClassifierOutput:()=>l.TokenClassifierOutput,TokenizerModel:()=>u.TokenizerModel,TrOCRForCausalLM:()=>l.TrOCRForCausalLM,TrOCRPreTrainedModel:()=>l.TrOCRPreTrainedModel,TranslationPipeline:()=>o.TranslationPipeline,UniSpeechForCTC:()=>l.UniSpeechForCTC,UniSpeechForSequenceClassification:()=>l.UniSpeechForSequenceClassification,UniSpeechModel:()=>l.UniSpeechModel,UniSpeechPreTrainedModel:()=>l.UniSpeechPreTrainedModel,UniSpeechSatForAudioFrameClassification:()=>l.UniSpeechSatForAudioFrameClassification,UniSpeechSatForCTC:()=>l.UniSpeechSatForCTC,UniSpeechSatForSequenceClassification:()=>l.UniSpeechSatForSequenceClassification,UniSpeechSatModel:()=>l.UniSpeechSatModel,UniSpeechSatPreTrainedModel:()=>l.UniSpeechSatPreTrainedModel,ViTFeatureExtractor:()=>d.ViTFeatureExtractor,ViTForImageClassification:()=>l.ViTForImageClassification,ViTImageProcessor:()=>d.ViTImageProcessor,ViTModel:()=>l.ViTModel,ViTPreTrainedModel:()=>l.ViTPreTrainedModel,VisionEncoderDecoderModel:()=>l.VisionEncoderDecoderModel,VitMatteForImageMatting:()=>l.VitMatteForImageMatting,VitMatteImageProcessor:()=>d.VitMatteImageProcessor,VitMattePreTrainedModel:()=>l.VitMattePreTrainedModel,VitsModel:()=>l.VitsModel,VitsModelOutput:()=>l.VitsModelOutput,VitsPreTrainedModel:()=>l.VitsPreTrainedModel,VitsTokenizer:()=>u.VitsTokenizer,Wav2Vec2BertForCTC:()=>l.Wav2Vec2BertForCTC,Wav2Vec2BertForSequenceClassification:()=>l.Wav2Vec2BertForSequenceClassification,Wav2Vec2BertModel:()=>l.Wav2Vec2BertModel,Wav2Vec2BertPreTrainedModel:()=>l.Wav2Vec2BertPreTrainedModel,Wav2Vec2CTCTokenizer:()=>u.Wav2Vec2CTCTokenizer,Wav2Vec2FeatureExtractor:()=>d.Wav2Vec2FeatureExtractor,Wav2Vec2ForAudioFrameClassification:()=>l.Wav2Vec2ForAudioFrameClassification,Wav2Vec2ForCTC:()=>l.Wav2Vec2ForCTC,Wav2Vec2ForSequenceClassification:()=>l.Wav2Vec2ForSequenceClassification,Wav2Vec2Model:()=>l.Wav2Vec2Model,Wav2Vec2PreTrainedModel:()=>l.Wav2Vec2PreTrainedModel,Wav2Vec2ProcessorWithLM:()=>d.Wav2Vec2ProcessorWithLM,WavLMForAudioFrameClassification:()=>l.WavLMForAudioFrameClassification,WavLMForCTC:()=>l.WavLMForCTC,WavLMForSequenceClassification:()=>l.WavLMForSequenceClassification,WavLMForXVector:()=>l.WavLMForXVector,WavLMModel:()=>l.WavLMModel,WavLMPreTrainedModel:()=>l.WavLMPreTrainedModel,WeSpeakerFeatureExtractor:()=>d.WeSpeakerFeatureExtractor,WeSpeakerResNetModel:()=>l.WeSpeakerResNetModel,WeSpeakerResNetPreTrainedModel:()=>l.WeSpeakerResNetPreTrainedModel,WhisperFeatureExtractor:()=>d.WhisperFeatureExtractor,WhisperForConditionalGeneration:()=>l.WhisperForConditionalGeneration,WhisperModel:()=>l.WhisperModel,WhisperPreTrainedModel:()=>l.WhisperPreTrainedModel,WhisperProcessor:()=>d.WhisperProcessor,WhisperTextStreamer:()=>g.WhisperTextStreamer,WhisperTokenizer:()=>u.WhisperTokenizer,XLMForQuestionAnswering:()=>l.XLMForQuestionAnswering,XLMForSequenceClassification:()=>l.XLMForSequenceClassification,XLMForTokenClassification:()=>l.XLMForTokenClassification,XLMModel:()=>l.XLMModel,XLMPreTrainedModel:()=>l.XLMPreTrainedModel,XLMRobertaForMaskedLM:()=>l.XLMRobertaForMaskedLM,XLMRobertaForQuestionAnswering:()=>l.XLMRobertaForQuestionAnswering,XLMRobertaForSequenceClassification:()=>l.XLMRobertaForSequenceClassification,XLMRobertaForTokenClassification:()=>l.XLMRobertaForTokenClassification,XLMRobertaModel:()=>l.XLMRobertaModel,XLMRobertaPreTrainedModel:()=>l.XLMRobertaPreTrainedModel,XLMRobertaTokenizer:()=>u.XLMRobertaTokenizer,XLMTokenizer:()=>u.XLMTokenizer,XLMWithLMHeadModel:()=>l.XLMWithLMHeadModel,XVectorOutput:()=>l.XVectorOutput,YolosFeatureExtractor:()=>d.YolosFeatureExtractor,YolosForObjectDetection:()=>l.YolosForObjectDetection,YolosModel:()=>l.YolosModel,YolosObjectDetectionOutput:()=>l.YolosObjectDetectionOutput,YolosPreTrainedModel:()=>l.YolosPreTrainedModel,ZeroShotAudioClassificationPipeline:()=>o.ZeroShotAudioClassificationPipeline,ZeroShotClassificationPipeline:()=>o.ZeroShotClassificationPipeline,ZeroShotImageClassificationPipeline:()=>o.ZeroShotImageClassificationPipeline,ZeroShotObjectDetectionPipeline:()=>o.ZeroShotObjectDetectionPipeline,bankers_round:()=>f.bankers_round,cat:()=>m.cat,cos_sim:()=>f.cos_sim,dot:()=>f.dot,dynamic_time_warping:()=>f.dynamic_time_warping,env:()=>s.env,full:()=>m.full,full_like:()=>m.full_like,getKeyValueShapes:()=>c.getKeyValueShapes,hamming:()=>p.hamming,hanning:()=>p.hanning,interpolate:()=>m.interpolate,interpolate_4d:()=>m.interpolate_4d,interpolate_data:()=>f.interpolate_data,is_chinese_char:()=>u.is_chinese_char,layer_norm:()=>m.layer_norm,log_softmax:()=>f.log_softmax,magnitude:()=>f.magnitude,matmul:()=>m.matmul,max:()=>f.max,mean:()=>m.mean,mean_pooling:()=>m.mean_pooling,medianFilter:()=>f.medianFilter,mel_filter_bank:()=>p.mel_filter_bank,min:()=>f.min,ones:()=>m.ones,ones_like:()=>m.ones_like,permute:()=>m.permute,permute_data:()=>f.permute_data,pipeline:()=>o.pipeline,quantize_embeddings:()=>m.quantize_embeddings,read_audio:()=>p.read_audio,rfft:()=>m.rfft,round:()=>f.round,softmax:()=>f.softmax,spectrogram:()=>p.spectrogram,stack:()=>m.stack,std_mean:()=>m.std_mean,topk:()=>m.topk,window_function:()=>p.window_function,zeros:()=>m.zeros,zeros_like:()=>m.zeros_like});var s=i(/*! ./env.js */"./src/env.js"),o=i(/*! ./pipelines.js */"./src/pipelines.js"),l=i(/*! ./models.js */"./src/models.js"),u=i(/*! ./tokenizers.js */"./src/tokenizers.js"),d=i(/*! ./processors.js */"./src/processors.js"),c=i(/*! ./configs.js */"./src/configs.js"),p=i(/*! ./utils/audio.js */"./src/utils/audio.js"),h=i(/*! ./utils/image.js */"./src/utils/image.js"),m=i(/*! ./utils/tensor.js */"./src/utils/tensor.js"),f=i(/*! ./utils/maths.js */"./src/utils/maths.js"),g=i(/*! ./generation/streamers.js */"./src/generation/streamers.js"),_=i(/*! ./generation/stopping_criteria.js */"./src/generation/stopping_criteria.js"),w=a.ASTFeatureExtractor,y=a.ASTForAudioClassification,b=a.ASTModel,v=a.ASTPreTrainedModel,x=a.AlbertForMaskedLM,M=a.AlbertForQuestionAnswering,T=a.AlbertForSequenceClassification,k=a.AlbertModel,$=a.AlbertPreTrainedModel,S=a.AlbertTokenizer,C=a.AudioClassificationPipeline,E=a.AutoConfig,P=a.AutoModel,A=a.AutoModelForAudioClassification,F=a.AutoModelForAudioFrameClassification,z=a.AutoModelForCTC,I=a.AutoModelForCausalLM,O=a.AutoModelForDepthEstimation,B=a.AutoModelForDocumentQuestionAnswering,L=a.AutoModelForImageClassification,D=a.AutoModelForImageFeatureExtraction,R=a.AutoModelForImageMatting,N=a.AutoModelForImageSegmentation,V=a.AutoModelForImageToImage,j=a.AutoModelForMaskGeneration,G=a.AutoModelForMaskedLM,q=a.AutoModelForNormalEstimation,U=a.AutoModelForObjectDetection,W=a.AutoModelForQuestionAnswering,H=a.AutoModelForSemanticSegmentation,X=a.AutoModelForSeq2SeqLM,K=a.AutoModelForSequenceClassification,Q=a.AutoModelForSpeechSeq2Seq,Y=a.AutoModelForTextToSpectrogram,J=a.AutoModelForTextToWaveform,Z=a.AutoModelForTokenClassification,ee=a.AutoModelForVision2Seq,te=a.AutoModelForXVector,ne=a.AutoModelForZeroShotObjectDetection,re=a.AutoProcessor,ie=a.AutoTokenizer,ae=a.AutomaticSpeechRecognitionPipeline,se=a.BartForConditionalGeneration,oe=a.BartForSequenceClassification,le=a.BartModel,ue=a.BartPretrainedModel,de=a.BartTokenizer,ce=a.BaseModelOutput,pe=a.BaseStreamer,he=a.BeitFeatureExtractor,me=a.BeitForImageClassification,fe=a.BeitModel,ge=a.BeitPreTrainedModel,_e=a.BertForMaskedLM,we=a.BertForQuestionAnswering,ye=a.BertForSequenceClassification,be=a.BertForTokenClassification,ve=a.BertModel,xe=a.BertPreTrainedModel,Me=a.BertTokenizer,Te=a.BitImageProcessor,ke=a.BlenderbotForConditionalGeneration,$e=a.BlenderbotModel,Se=a.BlenderbotPreTrainedModel,Ce=a.BlenderbotSmallForConditionalGeneration,Ee=a.BlenderbotSmallModel,Pe=a.BlenderbotSmallPreTrainedModel,Ae=a.BlenderbotSmallTokenizer,Fe=a.BlenderbotTokenizer,ze=a.BloomForCausalLM,Ie=a.BloomModel,Oe=a.BloomPreTrainedModel,Be=a.BloomTokenizer,Le=a.CLIPFeatureExtractor,De=a.CLIPImageProcessor,Re=a.CLIPModel,Ne=a.CLIPPreTrainedModel,Ve=a.CLIPSegForImageSegmentation,je=a.CLIPSegModel,Ge=a.CLIPSegPreTrainedModel,qe=a.CLIPTextModelWithProjection,Ue=a.CLIPTokenizer,We=a.CLIPVisionModelWithProjection,He=a.CamembertForMaskedLM,Xe=a.CamembertForQuestionAnswering,Ke=a.CamembertForSequenceClassification,Qe=a.CamembertForTokenClassification,Ye=a.CamembertModel,Je=a.CamembertPreTrainedModel,Ze=a.CamembertTokenizer,et=a.CausalLMOutput,tt=a.CausalLMOutputWithPast,nt=a.ChineseCLIPFeatureExtractor,rt=a.ChineseCLIPModel,it=a.ChineseCLIPPreTrainedModel,at=a.ClapAudioModelWithProjection,st=a.ClapFeatureExtractor,ot=a.ClapModel,lt=a.ClapPreTrainedModel,ut=a.ClapTextModelWithProjection,dt=a.CodeGenForCausalLM,ct=a.CodeGenModel,pt=a.CodeGenPreTrainedModel,ht=a.CodeGenTokenizer,mt=a.CodeLlamaTokenizer,ft=a.CohereForCausalLM,gt=a.CohereModel,_t=a.CoherePreTrainedModel,wt=a.CohereTokenizer,yt=a.ConvBertForMaskedLM,bt=a.ConvBertForQuestionAnswering,vt=a.ConvBertForSequenceClassification,xt=a.ConvBertForTokenClassification,Mt=a.ConvBertModel,Tt=a.ConvBertPreTrainedModel,kt=a.ConvBertTokenizer,$t=a.ConvNextFeatureExtractor,St=a.ConvNextForImageClassification,Ct=a.ConvNextImageProcessor,Et=a.ConvNextModel,Pt=a.ConvNextPreTrainedModel,At=a.ConvNextV2ForImageClassification,Ft=a.ConvNextV2Model,zt=a.ConvNextV2PreTrainedModel,It=a.DPTFeatureExtractor,Ot=a.DPTForDepthEstimation,Bt=a.DPTImageProcessor,Lt=a.DPTModel,Dt=a.DPTPreTrainedModel,Rt=a.DebertaForMaskedLM,Nt=a.DebertaForQuestionAnswering,Vt=a.DebertaForSequenceClassification,jt=a.DebertaForTokenClassification,Gt=a.DebertaModel,qt=a.DebertaPreTrainedModel,Ut=a.DebertaTokenizer,Wt=a.DebertaV2ForMaskedLM,Ht=a.DebertaV2ForQuestionAnswering,Xt=a.DebertaV2ForSequenceClassification,Kt=a.DebertaV2ForTokenClassification,Qt=a.DebertaV2Model,Yt=a.DebertaV2PreTrainedModel,Jt=a.DebertaV2Tokenizer,Zt=a.DeiTFeatureExtractor,en=a.DeiTForImageClassification,tn=a.DeiTModel,nn=a.DeiTPreTrainedModel,rn=a.DepthAnythingForDepthEstimation,an=a.DepthAnythingPreTrainedModel,sn=a.DepthEstimationPipeline,on=a.DetrFeatureExtractor,ln=a.DetrForObjectDetection,un=a.DetrForSegmentation,dn=a.DetrModel,cn=a.DetrObjectDetectionOutput,pn=a.DetrPreTrainedModel,hn=a.DetrSegmentationOutput,mn=a.Dinov2ForImageClassification,fn=a.Dinov2Model,gn=a.Dinov2PreTrainedModel,_n=a.DistilBertForMaskedLM,wn=a.DistilBertForQuestionAnswering,yn=a.DistilBertForSequenceClassification,bn=a.DistilBertForTokenClassification,vn=a.DistilBertModel,xn=a.DistilBertPreTrainedModel,Mn=a.DistilBertTokenizer,Tn=a.DocumentQuestionAnsweringPipeline,kn=a.DonutFeatureExtractor,$n=a.DonutSwinModel,Sn=a.DonutSwinPreTrainedModel,Cn=a.EfficientNetForImageClassification,En=a.EfficientNetImageProcessor,Pn=a.EfficientNetModel,An=a.EfficientNetPreTrainedModel,Fn=a.ElectraForMaskedLM,zn=a.ElectraForQuestionAnswering,In=a.ElectraForSequenceClassification,On=a.ElectraForTokenClassification,Bn=a.ElectraModel,Ln=a.ElectraPreTrainedModel,Dn=a.ElectraTokenizer,Rn=a.EosTokenCriteria,Nn=a.EsmForMaskedLM,Vn=a.EsmForSequenceClassification,jn=a.EsmForTokenClassification,Gn=a.EsmModel,qn=a.EsmPreTrainedModel,Un=a.EsmTokenizer,Wn=a.FFT,Hn=a.FalconForCausalLM,Xn=a.FalconModel,Kn=a.FalconPreTrainedModel,Qn=a.FalconTokenizer,Yn=a.FastViTForImageClassification,Jn=a.FastViTModel,Zn=a.FastViTPreTrainedModel,er=a.FeatureExtractionPipeline,tr=a.FeatureExtractor,nr=a.FillMaskPipeline,rr=a.Florence2ForConditionalGeneration,ir=a.Florence2PreTrainedModel,ar=a.Florence2Processor,sr=a.GLPNFeatureExtractor,or=a.GLPNForDepthEstimation,lr=a.GLPNModel,ur=a.GLPNPreTrainedModel,dr=a.GPT2LMHeadModel,cr=a.GPT2Model,pr=a.GPT2PreTrainedModel,hr=a.GPT2Tokenizer,mr=a.GPTBigCodeForCausalLM,fr=a.GPTBigCodeModel,gr=a.GPTBigCodePreTrainedModel,_r=a.GPTJForCausalLM,wr=a.GPTJModel,yr=a.GPTJPreTrainedModel,br=a.GPTNeoForCausalLM,vr=a.GPTNeoModel,xr=a.GPTNeoPreTrainedModel,Mr=a.GPTNeoXForCausalLM,Tr=a.GPTNeoXModel,kr=a.GPTNeoXPreTrainedModel,$r=a.GPTNeoXTokenizer,Sr=a.Gemma2ForCausalLM,Cr=a.Gemma2Model,Er=a.Gemma2PreTrainedModel,Pr=a.GemmaForCausalLM,Ar=a.GemmaModel,Fr=a.GemmaPreTrainedModel,zr=a.GemmaTokenizer,Ir=a.Grok1Tokenizer,Or=a.HerbertTokenizer,Br=a.HubertForCTC,Lr=a.HubertForSequenceClassification,Dr=a.HubertModel,Rr=a.HubertPreTrainedModel,Nr=a.ImageClassificationPipeline,Vr=a.ImageFeatureExtractionPipeline,jr=a.ImageFeatureExtractor,Gr=a.ImageMattingOutput,qr=a.ImageSegmentationPipeline,Ur=a.ImageToImagePipeline,Wr=a.ImageToTextPipeline,Hr=a.InterruptableStoppingCriteria,Xr=a.JAISLMHeadModel,Kr=a.JAISModel,Qr=a.JAISPreTrainedModel,Yr=a.LlamaForCausalLM,Jr=a.LlamaModel,Zr=a.LlamaPreTrainedModel,ei=a.LlamaTokenizer,ti=a.LlavaForConditionalGeneration,ni=a.LlavaPreTrainedModel,ri=a.LongT5ForConditionalGeneration,ii=a.LongT5Model,ai=a.LongT5PreTrainedModel,si=a.M2M100ForConditionalGeneration,oi=a.M2M100Model,li=a.M2M100PreTrainedModel,ui=a.M2M100Tokenizer,di=a.MBart50Tokenizer,ci=a.MBartForCausalLM,pi=a.MBartForConditionalGeneration,hi=a.MBartForSequenceClassification,mi=a.MBartModel,fi=a.MBartPreTrainedModel,gi=a.MBartTokenizer,_i=a.MPNetForMaskedLM,wi=a.MPNetForQuestionAnswering,yi=a.MPNetForSequenceClassification,bi=a.MPNetForTokenClassification,vi=a.MPNetModel,xi=a.MPNetPreTrainedModel,Mi=a.MPNetTokenizer,Ti=a.MT5ForConditionalGeneration,ki=a.MT5Model,$i=a.MT5PreTrainedModel,Si=a.MarianMTModel,Ci=a.MarianModel,Ei=a.MarianPreTrainedModel,Pi=a.MarianTokenizer,Ai=a.MaskedLMOutput,Fi=a.MaxLengthCriteria,zi=a.MistralForCausalLM,Ii=a.MistralModel,Oi=a.MistralPreTrainedModel,Bi=a.MobileBertForMaskedLM,Li=a.MobileBertForQuestionAnswering,Di=a.MobileBertForSequenceClassification,Ri=a.MobileBertModel,Ni=a.MobileBertPreTrainedModel,Vi=a.MobileBertTokenizer,ji=a.MobileNetV1FeatureExtractor,Gi=a.MobileNetV1ForImageClassification,qi=a.MobileNetV1Model,Ui=a.MobileNetV1PreTrainedModel,Wi=a.MobileNetV2FeatureExtractor,Hi=a.MobileNetV2ForImageClassification,Xi=a.MobileNetV2Model,Ki=a.MobileNetV2PreTrainedModel,Qi=a.MobileNetV3FeatureExtractor,Yi=a.MobileNetV3ForImageClassification,Ji=a.MobileNetV3Model,Zi=a.MobileNetV3PreTrainedModel,ea=a.MobileNetV4FeatureExtractor,ta=a.MobileNetV4ForImageClassification,na=a.MobileNetV4Model,ra=a.MobileNetV4PreTrainedModel,ia=a.MobileViTFeatureExtractor,aa=a.MobileViTForImageClassification,sa=a.MobileViTImageProcessor,oa=a.MobileViTModel,la=a.MobileViTPreTrainedModel,ua=a.MobileViTV2ForImageClassification,da=a.MobileViTV2Model,ca=a.MobileViTV2PreTrainedModel,pa=a.ModelOutput,ha=a.Moondream1ForConditionalGeneration,ma=a.MptForCausalLM,fa=a.MptModel,ga=a.MptPreTrainedModel,_a=a.MusicgenForCausalLM,wa=a.MusicgenForConditionalGeneration,ya=a.MusicgenModel,ba=a.MusicgenPreTrainedModel,va=a.NllbTokenizer,xa=a.NomicBertModel,Ma=a.NomicBertPreTrainedModel,Ta=a.NougatImageProcessor,ka=a.NougatTokenizer,$a=a.OPTForCausalLM,Sa=a.OPTModel,Ca=a.OPTPreTrainedModel,Ea=a.ObjectDetectionPipeline,Pa=a.OpenELMForCausalLM,Aa=a.OpenELMModel,Fa=a.OpenELMPreTrainedModel,za=a.OwlViTFeatureExtractor,Ia=a.OwlViTForObjectDetection,Oa=a.OwlViTModel,Ba=a.OwlViTPreTrainedModel,La=a.OwlViTProcessor,Da=a.Owlv2ForObjectDetection,Ra=a.Owlv2ImageProcessor,Na=a.Owlv2Model,Va=a.Owlv2PreTrainedModel,ja=a.Phi3ForCausalLM,Ga=a.Phi3Model,qa=a.Phi3PreTrainedModel,Ua=a.PhiForCausalLM,Wa=a.PhiModel,Ha=a.PhiPreTrainedModel,Xa=a.Pipeline,Ka=a.PreTrainedModel,Qa=a.PreTrainedTokenizer,Ya=a.PretrainedConfig,Ja=a.PretrainedMixin,Za=a.Processor,es=a.PyAnnoteFeatureExtractor,ts=a.PyAnnoteForAudioFrameClassification,ns=a.PyAnnoteModel,rs=a.PyAnnotePreTrainedModel,is=a.PyAnnoteProcessor,as=a.QuestionAnsweringModelOutput,ss=a.QuestionAnsweringPipeline,os=a.Qwen2ForCausalLM,ls=a.Qwen2Model,us=a.Qwen2PreTrainedModel,ds=a.Qwen2Tokenizer,cs=a.RTDetrForObjectDetection,ps=a.RTDetrImageProcessor,hs=a.RTDetrModel,ms=a.RTDetrObjectDetectionOutput,fs=a.RTDetrPreTrainedModel,gs=a.RawImage,_s=a.ResNetForImageClassification,ws=a.ResNetModel,ys=a.ResNetPreTrainedModel,bs=a.RoFormerForMaskedLM,vs=a.RoFormerForQuestionAnswering,xs=a.RoFormerForSequenceClassification,Ms=a.RoFormerForTokenClassification,Ts=a.RoFormerModel,ks=a.RoFormerPreTrainedModel,$s=a.RoFormerTokenizer,Ss=a.RobertaForMaskedLM,Cs=a.RobertaForQuestionAnswering,Es=a.RobertaForSequenceClassification,Ps=a.RobertaForTokenClassification,As=a.RobertaModel,Fs=a.RobertaPreTrainedModel,zs=a.RobertaTokenizer,Is=a.SamImageProcessor,Os=a.SamImageSegmentationOutput,Bs=a.SamModel,Ls=a.SamPreTrainedModel,Ds=a.SamProcessor,Rs=a.SapiensFeatureExtractor,Ns=a.SapiensForDepthEstimation,Vs=a.SapiensForNormalEstimation,js=a.SapiensForSemanticSegmentation,Gs=a.SapiensPreTrainedModel,qs=a.SeamlessM4TFeatureExtractor,Us=a.SegformerFeatureExtractor,Ws=a.SegformerForImageClassification,Hs=a.SegformerForSemanticSegmentation,Xs=a.SegformerModel,Ks=a.SegformerPreTrainedModel,Qs=a.Seq2SeqLMOutput,Ys=a.SequenceClassifierOutput,Js=a.SiglipImageProcessor,Zs=a.SiglipModel,eo=a.SiglipPreTrainedModel,to=a.SiglipTextModel,no=a.SiglipTokenizer,ro=a.SiglipVisionModel,io=a.SpeechT5FeatureExtractor,ao=a.SpeechT5ForSpeechToText,so=a.SpeechT5ForTextToSpeech,oo=a.SpeechT5HifiGan,lo=a.SpeechT5Model,uo=a.SpeechT5PreTrainedModel,co=a.SpeechT5Processor,po=a.SpeechT5Tokenizer,ho=a.SqueezeBertForMaskedLM,mo=a.SqueezeBertForQuestionAnswering,fo=a.SqueezeBertForSequenceClassification,go=a.SqueezeBertModel,_o=a.SqueezeBertPreTrainedModel,wo=a.SqueezeBertTokenizer,yo=a.StableLmForCausalLM,bo=a.StableLmModel,vo=a.StableLmPreTrainedModel,xo=a.Starcoder2ForCausalLM,Mo=a.Starcoder2Model,To=a.Starcoder2PreTrainedModel,ko=a.StoppingCriteria,$o=a.StoppingCriteriaList,So=a.SummarizationPipeline,Co=a.Swin2SRForImageSuperResolution,Eo=a.Swin2SRImageProcessor,Po=a.Swin2SRModel,Ao=a.Swin2SRPreTrainedModel,Fo=a.SwinForImageClassification,zo=a.SwinModel,Io=a.SwinPreTrainedModel,Oo=a.T5ForConditionalGeneration,Bo=a.T5Model,Lo=a.T5PreTrainedModel,Do=a.T5Tokenizer,Ro=a.TableTransformerForObjectDetection,No=a.TableTransformerModel,Vo=a.TableTransformerObjectDetectionOutput,jo=a.TableTransformerPreTrainedModel,Go=a.Tensor,qo=a.Text2TextGenerationPipeline,Uo=a.TextClassificationPipeline,Wo=a.TextGenerationPipeline,Ho=a.TextStreamer,Xo=a.TextToAudioPipeline,Ko=a.TokenClassificationPipeline,Qo=a.TokenClassifierOutput,Yo=a.TokenizerModel,Jo=a.TrOCRForCausalLM,Zo=a.TrOCRPreTrainedModel,el=a.TranslationPipeline,tl=a.UniSpeechForCTC,nl=a.UniSpeechForSequenceClassification,rl=a.UniSpeechModel,il=a.UniSpeechPreTrainedModel,al=a.UniSpeechSatForAudioFrameClassification,sl=a.UniSpeechSatForCTC,ol=a.UniSpeechSatForSequenceClassification,ll=a.UniSpeechSatModel,ul=a.UniSpeechSatPreTrainedModel,dl=a.ViTFeatureExtractor,cl=a.ViTForImageClassification,pl=a.ViTImageProcessor,hl=a.ViTModel,ml=a.ViTPreTrainedModel,fl=a.VisionEncoderDecoderModel,gl=a.VitMatteForImageMatting,_l=a.VitMatteImageProcessor,wl=a.VitMattePreTrainedModel,yl=a.VitsModel,bl=a.VitsModelOutput,vl=a.VitsPreTrainedModel,xl=a.VitsTokenizer,Ml=a.Wav2Vec2BertForCTC,Tl=a.Wav2Vec2BertForSequenceClassification,kl=a.Wav2Vec2BertModel,$l=a.Wav2Vec2BertPreTrainedModel,Sl=a.Wav2Vec2CTCTokenizer,Cl=a.Wav2Vec2FeatureExtractor,El=a.Wav2Vec2ForAudioFrameClassification,Pl=a.Wav2Vec2ForCTC,Al=a.Wav2Vec2ForSequenceClassification,Fl=a.Wav2Vec2Model,zl=a.Wav2Vec2PreTrainedModel,Il=a.Wav2Vec2ProcessorWithLM,Ol=a.WavLMForAudioFrameClassification,Bl=a.WavLMForCTC,Ll=a.WavLMForSequenceClassification,Dl=a.WavLMForXVector,Rl=a.WavLMModel,Nl=a.WavLMPreTrainedModel,Vl=a.WeSpeakerFeatureExtractor,jl=a.WeSpeakerResNetModel,Gl=a.WeSpeakerResNetPreTrainedModel,ql=a.WhisperFeatureExtractor,Ul=a.WhisperForConditionalGeneration,Wl=a.WhisperModel,Hl=a.WhisperPreTrainedModel,Xl=a.WhisperProcessor,Kl=a.WhisperTextStreamer,Ql=a.WhisperTokenizer,Yl=a.XLMForQuestionAnswering,Jl=a.XLMForSequenceClassification,Zl=a.XLMForTokenClassification,eu=a.XLMModel,tu=a.XLMPreTrainedModel,nu=a.XLMRobertaForMaskedLM,ru=a.XLMRobertaForQuestionAnswering,iu=a.XLMRobertaForSequenceClassification,au=a.XLMRobertaForTokenClassification,su=a.XLMRobertaModel,ou=a.XLMRobertaPreTrainedModel,lu=a.XLMRobertaTokenizer,uu=a.XLMTokenizer,du=a.XLMWithLMHeadModel,cu=a.XVectorOutput,pu=a.YolosFeatureExtractor,hu=a.YolosForObjectDetection,mu=a.YolosModel,fu=a.YolosObjectDetectionOutput,gu=a.YolosPreTrainedModel,_u=a.ZeroShotAudioClassificationPipeline,wu=a.ZeroShotClassificationPipeline,yu=a.ZeroShotImageClassificationPipeline,bu=a.ZeroShotObjectDetectionPipeline,vu=a.bankers_round,xu=a.cat,Mu=a.cos_sim,Tu=a.dot,ku=a.dynamic_time_warping,$u=a.env,Su=a.full,Cu=a.full_like,Eu=a.getKeyValueShapes,Pu=a.hamming,Au=a.hanning,Fu=a.interpolate,zu=a.interpolate_4d,Iu=a.interpolate_data,Ou=a.is_chinese_char,Bu=a.layer_norm,Lu=a.log_softmax,Du=a.magnitude,Ru=a.matmul,Nu=a.max,Vu=a.mean,ju=a.mean_pooling,Gu=a.medianFilter,qu=a.mel_filter_bank,Uu=a.min,Wu=a.ones,Hu=a.ones_like,Xu=a.permute,Ku=a.permute_data,Qu=a.pipeline,Yu=a.quantize_embeddings,Ju=a.read_audio,Zu=a.rfft,ed=a.round,td=a.softmax,nd=a.spectrogram,rd=a.stack,id=a.std_mean,ad=a.topk,sd=a.window_function,od=a.zeros,ld=a.zeros_like;export{w as ASTFeatureExtractor,y as ASTForAudioClassification,b as ASTModel,v as ASTPreTrainedModel,x as AlbertForMaskedLM,M as AlbertForQuestionAnswering,T as AlbertForSequenceClassification,k as AlbertModel,$ as AlbertPreTrainedModel,S as AlbertTokenizer,C as AudioClassificationPipeline,E as AutoConfig,P as AutoModel,A as AutoModelForAudioClassification,F as AutoModelForAudioFrameClassification,z as AutoModelForCTC,I as AutoModelForCausalLM,O as AutoModelForDepthEstimation,B as AutoModelForDocumentQuestionAnswering,L as AutoModelForImageClassification,D as AutoModelForImageFeatureExtraction,R as AutoModelForImageMatting,N as AutoModelForImageSegmentation,V as AutoModelForImageToImage,j as AutoModelForMaskGeneration,G as AutoModelForMaskedLM,q as AutoModelForNormalEstimation,U as AutoModelForObjectDetection,W as AutoModelForQuestionAnswering,H as AutoModelForSemanticSegmentation,X as AutoModelForSeq2SeqLM,K as AutoModelForSequenceClassification,Q as AutoModelForSpeechSeq2Seq,Y as AutoModelForTextToSpectrogram,J as AutoModelForTextToWaveform,Z as AutoModelForTokenClassification,ee as AutoModelForVision2Seq,te as AutoModelForXVector,ne as AutoModelForZeroShotObjectDetection,re as AutoProcessor,ie as AutoTokenizer,ae as AutomaticSpeechRecognitionPipeline,se as BartForConditionalGeneration,oe as BartForSequenceClassification,le as BartModel,ue as BartPretrainedModel,de as BartTokenizer,ce as BaseModelOutput,pe as BaseStreamer,he as BeitFeatureExtractor,me as BeitForImageClassification,fe as BeitModel,ge as BeitPreTrainedModel,_e as BertForMaskedLM,we as BertForQuestionAnswering,ye as BertForSequenceClassification,be as BertForTokenClassification,ve as BertModel,xe as BertPreTrainedModel,Me as BertTokenizer,Te as BitImageProcessor,ke as BlenderbotForConditionalGeneration,$e as BlenderbotModel,Se as BlenderbotPreTrainedModel,Ce as BlenderbotSmallForConditionalGeneration,Ee as BlenderbotSmallModel,Pe as BlenderbotSmallPreTrainedModel,Ae as BlenderbotSmallTokenizer,Fe as BlenderbotTokenizer,ze as BloomForCausalLM,Ie as BloomModel,Oe as BloomPreTrainedModel,Be as BloomTokenizer,Le as CLIPFeatureExtractor,De as CLIPImageProcessor,Re as CLIPModel,Ne as CLIPPreTrainedModel,Ve as CLIPSegForImageSegmentation,je as CLIPSegModel,Ge as CLIPSegPreTrainedModel,qe as CLIPTextModelWithProjection,Ue as CLIPTokenizer,We as CLIPVisionModelWithProjection,He as CamembertForMaskedLM,Xe as CamembertForQuestionAnswering,Ke as CamembertForSequenceClassification,Qe as CamembertForTokenClassification,Ye as CamembertModel,Je as CamembertPreTrainedModel,Ze as CamembertTokenizer,et as CausalLMOutput,tt as CausalLMOutputWithPast,nt as ChineseCLIPFeatureExtractor,rt as ChineseCLIPModel,it as ChineseCLIPPreTrainedModel,at as ClapAudioModelWithProjection,st as ClapFeatureExtractor,ot as ClapModel,lt as ClapPreTrainedModel,ut as ClapTextModelWithProjection,dt as CodeGenForCausalLM,ct as CodeGenModel,pt as CodeGenPreTrainedModel,ht as CodeGenTokenizer,mt as CodeLlamaTokenizer,ft as CohereForCausalLM,gt as CohereModel,_t as CoherePreTrainedModel,wt as CohereTokenizer,yt as ConvBertForMaskedLM,bt as ConvBertForQuestionAnswering,vt as ConvBertForSequenceClassification,xt as ConvBertForTokenClassification,Mt as ConvBertModel,Tt as ConvBertPreTrainedModel,kt as ConvBertTokenizer,$t as ConvNextFeatureExtractor,St as ConvNextForImageClassification,Ct as ConvNextImageProcessor,Et as ConvNextModel,Pt as ConvNextPreTrainedModel,At as ConvNextV2ForImageClassification,Ft as ConvNextV2Model,zt as ConvNextV2PreTrainedModel,It as DPTFeatureExtractor,Ot as DPTForDepthEstimation,Bt as DPTImageProcessor,Lt as DPTModel,Dt as DPTPreTrainedModel,Rt as DebertaForMaskedLM,Nt as DebertaForQuestionAnswering,Vt as DebertaForSequenceClassification,jt as DebertaForTokenClassification,Gt as DebertaModel,qt as DebertaPreTrainedModel,Ut as DebertaTokenizer,Wt as DebertaV2ForMaskedLM,Ht as DebertaV2ForQuestionAnswering,Xt as DebertaV2ForSequenceClassification,Kt as DebertaV2ForTokenClassification,Qt as DebertaV2Model,Yt as DebertaV2PreTrainedModel,Jt as DebertaV2Tokenizer,Zt as DeiTFeatureExtractor,en as DeiTForImageClassification,tn as DeiTModel,nn as DeiTPreTrainedModel,rn as DepthAnythingForDepthEstimation,an as DepthAnythingPreTrainedModel,sn as DepthEstimationPipeline,on as DetrFeatureExtractor,ln as DetrForObjectDetection,un as DetrForSegmentation,dn as DetrModel,cn as DetrObjectDetectionOutput,pn as DetrPreTrainedModel,hn as DetrSegmentationOutput,mn as Dinov2ForImageClassification,fn as Dinov2Model,gn as Dinov2PreTrainedModel,_n as DistilBertForMaskedLM,wn as DistilBertForQuestionAnswering,yn as DistilBertForSequenceClassification,bn as DistilBertForTokenClassification,vn as DistilBertModel,xn as DistilBertPreTrainedModel,Mn as DistilBertTokenizer,Tn as DocumentQuestionAnsweringPipeline,kn as DonutFeatureExtractor,$n as DonutSwinModel,Sn as DonutSwinPreTrainedModel,Cn as EfficientNetForImageClassification,En as EfficientNetImageProcessor,Pn as EfficientNetModel,An as EfficientNetPreTrainedModel,Fn as ElectraForMaskedLM,zn as ElectraForQuestionAnswering,In as ElectraForSequenceClassification,On as ElectraForTokenClassification,Bn as ElectraModel,Ln as ElectraPreTrainedModel,Dn as ElectraTokenizer,Rn as EosTokenCriteria,Nn as EsmForMaskedLM,Vn as EsmForSequenceClassification,jn as EsmForTokenClassification,Gn as EsmModel,qn as EsmPreTrainedModel,Un as EsmTokenizer,Wn as FFT,Hn as FalconForCausalLM,Xn as FalconModel,Kn as FalconPreTrainedModel,Qn as FalconTokenizer,Yn as FastViTForImageClassification,Jn as FastViTModel,Zn as FastViTPreTrainedModel,er as FeatureExtractionPipeline,tr as FeatureExtractor,nr as FillMaskPipeline,rr as Florence2ForConditionalGeneration,ir as Florence2PreTrainedModel,ar as Florence2Processor,sr as GLPNFeatureExtractor,or as GLPNForDepthEstimation,lr as GLPNModel,ur as GLPNPreTrainedModel,dr as GPT2LMHeadModel,cr as GPT2Model,pr as GPT2PreTrainedModel,hr as GPT2Tokenizer,mr as GPTBigCodeForCausalLM,fr as GPTBigCodeModel,gr as GPTBigCodePreTrainedModel,_r as GPTJForCausalLM,wr as GPTJModel,yr as GPTJPreTrainedModel,br as GPTNeoForCausalLM,vr as GPTNeoModel,xr as GPTNeoPreTrainedModel,Mr as GPTNeoXForCausalLM,Tr as GPTNeoXModel,kr as GPTNeoXPreTrainedModel,$r as GPTNeoXTokenizer,Sr as Gemma2ForCausalLM,Cr as Gemma2Model,Er as Gemma2PreTrainedModel,Pr as GemmaForCausalLM,Ar as GemmaModel,Fr as GemmaPreTrainedModel,zr as GemmaTokenizer,Ir as Grok1Tokenizer,Or as HerbertTokenizer,Br as HubertForCTC,Lr as HubertForSequenceClassification,Dr as HubertModel,Rr as HubertPreTrainedModel,Nr as ImageClassificationPipeline,Vr as ImageFeatureExtractionPipeline,jr as ImageFeatureExtractor,Gr as ImageMattingOutput,qr as ImageSegmentationPipeline,Ur as ImageToImagePipeline,Wr as ImageToTextPipeline,Hr as InterruptableStoppingCriteria,Xr as JAISLMHeadModel,Kr as JAISModel,Qr as JAISPreTrainedModel,Yr as LlamaForCausalLM,Jr as LlamaModel,Zr as LlamaPreTrainedModel,ei as LlamaTokenizer,ti as LlavaForConditionalGeneration,ni as LlavaPreTrainedModel,ri as LongT5ForConditionalGeneration,ii as LongT5Model,ai as LongT5PreTrainedModel,si as M2M100ForConditionalGeneration,oi as M2M100Model,li as M2M100PreTrainedModel,ui as M2M100Tokenizer,di as MBart50Tokenizer,ci as MBartForCausalLM,pi as MBartForConditionalGeneration,hi as MBartForSequenceClassification,mi as MBartModel,fi as MBartPreTrainedModel,gi as MBartTokenizer,_i as MPNetForMaskedLM,wi as MPNetForQuestionAnswering,yi as MPNetForSequenceClassification,bi as MPNetForTokenClassification,vi as MPNetModel,xi as MPNetPreTrainedModel,Mi as MPNetTokenizer,Ti as MT5ForConditionalGeneration,ki as MT5Model,$i as MT5PreTrainedModel,Si as MarianMTModel,Ci as MarianModel,Ei as MarianPreTrainedModel,Pi as MarianTokenizer,Ai as MaskedLMOutput,Fi as MaxLengthCriteria,zi as MistralForCausalLM,Ii as MistralModel,Oi as MistralPreTrainedModel,Bi as MobileBertForMaskedLM,Li as MobileBertForQuestionAnswering,Di as MobileBertForSequenceClassification,Ri as MobileBertModel,Ni as MobileBertPreTrainedModel,Vi as MobileBertTokenizer,ji as MobileNetV1FeatureExtractor,Gi as MobileNetV1ForImageClassification,qi as MobileNetV1Model,Ui as MobileNetV1PreTrainedModel,Wi as MobileNetV2FeatureExtractor,Hi as MobileNetV2ForImageClassification,Xi as MobileNetV2Model,Ki as MobileNetV2PreTrainedModel,Qi as MobileNetV3FeatureExtractor,Yi as MobileNetV3ForImageClassification,Ji as MobileNetV3Model,Zi as MobileNetV3PreTrainedModel,ea as MobileNetV4FeatureExtractor,ta as MobileNetV4ForImageClassification,na as MobileNetV4Model,ra as MobileNetV4PreTrainedModel,ia as MobileViTFeatureExtractor,aa as MobileViTForImageClassification,sa as MobileViTImageProcessor,oa as MobileViTModel,la as MobileViTPreTrainedModel,ua as MobileViTV2ForImageClassification,da as MobileViTV2Model,ca as MobileViTV2PreTrainedModel,pa as ModelOutput,ha as Moondream1ForConditionalGeneration,ma as MptForCausalLM,fa as MptModel,ga as MptPreTrainedModel,_a as MusicgenForCausalLM,wa as MusicgenForConditionalGeneration,ya as MusicgenModel,ba as MusicgenPreTrainedModel,va as NllbTokenizer,xa as NomicBertModel,Ma as NomicBertPreTrainedModel,Ta as NougatImageProcessor,ka as NougatTokenizer,$a as OPTForCausalLM,Sa as OPTModel,Ca as OPTPreTrainedModel,Ea as ObjectDetectionPipeline,Pa as OpenELMForCausalLM,Aa as OpenELMModel,Fa as OpenELMPreTrainedModel,za as OwlViTFeatureExtractor,Ia as OwlViTForObjectDetection,Oa as OwlViTModel,Ba as OwlViTPreTrainedModel,La as OwlViTProcessor,Da as Owlv2ForObjectDetection,Ra as Owlv2ImageProcessor,Na as Owlv2Model,Va as Owlv2PreTrainedModel,ja as Phi3ForCausalLM,Ga as Phi3Model,qa as Phi3PreTrainedModel,Ua as PhiForCausalLM,Wa as PhiModel,Ha as PhiPreTrainedModel,Xa as Pipeline,Ka as PreTrainedModel,Qa as PreTrainedTokenizer,Ya as PretrainedConfig,Ja as PretrainedMixin,Za as Processor,es as PyAnnoteFeatureExtractor,ts as PyAnnoteForAudioFrameClassification,ns as PyAnnoteModel,rs as PyAnnotePreTrainedModel,is as PyAnnoteProcessor,as as QuestionAnsweringModelOutput,ss as QuestionAnsweringPipeline,os as Qwen2ForCausalLM,ls as Qwen2Model,us as Qwen2PreTrainedModel,ds as Qwen2Tokenizer,cs as RTDetrForObjectDetection,ps as RTDetrImageProcessor,hs as RTDetrModel,ms as RTDetrObjectDetectionOutput,fs as RTDetrPreTrainedModel,gs as RawImage,_s as ResNetForImageClassification,ws as ResNetModel,ys as ResNetPreTrainedModel,bs as RoFormerForMaskedLM,vs as RoFormerForQuestionAnswering,xs as RoFormerForSequenceClassification,Ms as RoFormerForTokenClassification,Ts as RoFormerModel,ks as RoFormerPreTrainedModel,$s as RoFormerTokenizer,Ss as RobertaForMaskedLM,Cs as RobertaForQuestionAnswering,Es as RobertaForSequenceClassification,Ps as RobertaForTokenClassification,As as RobertaModel,Fs as RobertaPreTrainedModel,zs as RobertaTokenizer,Is as SamImageProcessor,Os as SamImageSegmentationOutput,Bs as SamModel,Ls as SamPreTrainedModel,Ds as SamProcessor,Rs as SapiensFeatureExtractor,Ns as SapiensForDepthEstimation,Vs as SapiensForNormalEstimation,js as SapiensForSemanticSegmentation,Gs as SapiensPreTrainedModel,qs as SeamlessM4TFeatureExtractor,Us as SegformerFeatureExtractor,Ws as SegformerForImageClassification,Hs as SegformerForSemanticSegmentation,Xs as SegformerModel,Ks as SegformerPreTrainedModel,Qs as Seq2SeqLMOutput,Ys as SequenceClassifierOutput,Js as SiglipImageProcessor,Zs as SiglipModel,eo as SiglipPreTrainedModel,to as SiglipTextModel,no as SiglipTokenizer,ro as SiglipVisionModel,io as SpeechT5FeatureExtractor,ao as SpeechT5ForSpeechToText,so as SpeechT5ForTextToSpeech,oo as SpeechT5HifiGan,lo as SpeechT5Model,uo as SpeechT5PreTrainedModel,co as SpeechT5Processor,po as SpeechT5Tokenizer,ho as SqueezeBertForMaskedLM,mo as SqueezeBertForQuestionAnswering,fo as SqueezeBertForSequenceClassification,go as SqueezeBertModel,_o as SqueezeBertPreTrainedModel,wo as SqueezeBertTokenizer,yo as StableLmForCausalLM,bo as StableLmModel,vo as StableLmPreTrainedModel,xo as Starcoder2ForCausalLM,Mo as Starcoder2Model,To as Starcoder2PreTrainedModel,ko as StoppingCriteria,$o as StoppingCriteriaList,So as SummarizationPipeline,Co as Swin2SRForImageSuperResolution,Eo as Swin2SRImageProcessor,Po as Swin2SRModel,Ao as Swin2SRPreTrainedModel,Fo as SwinForImageClassification,zo as SwinModel,Io as SwinPreTrainedModel,Oo as T5ForConditionalGeneration,Bo as T5Model,Lo as T5PreTrainedModel,Do as T5Tokenizer,Ro as TableTransformerForObjectDetection,No as TableTransformerModel,Vo as TableTransformerObjectDetectionOutput,jo as TableTransformerPreTrainedModel,Go as Tensor,qo as Text2TextGenerationPipeline,Uo as TextClassificationPipeline,Wo as TextGenerationPipeline,Ho as TextStreamer,Xo as TextToAudioPipeline,Ko as TokenClassificationPipeline,Qo as TokenClassifierOutput,Yo as TokenizerModel,Jo as TrOCRForCausalLM,Zo as TrOCRPreTrainedModel,el as TranslationPipeline,tl as UniSpeechForCTC,nl as UniSpeechForSequenceClassification,rl as UniSpeechModel,il as UniSpeechPreTrainedModel,al as UniSpeechSatForAudioFrameClassification,sl as UniSpeechSatForCTC,ol as UniSpeechSatForSequenceClassification,ll as UniSpeechSatModel,ul as UniSpeechSatPreTrainedModel,dl as ViTFeatureExtractor,cl as ViTForImageClassification,pl as ViTImageProcessor,hl as ViTModel,ml as ViTPreTrainedModel,fl as VisionEncoderDecoderModel,gl as VitMatteForImageMatting,_l as VitMatteImageProcessor,wl as VitMattePreTrainedModel,yl as VitsModel,bl as VitsModelOutput,vl as VitsPreTrainedModel,xl as VitsTokenizer,Ml as Wav2Vec2BertForCTC,Tl as Wav2Vec2BertForSequenceClassification,kl as Wav2Vec2BertModel,$l as Wav2Vec2BertPreTrainedModel,Sl as Wav2Vec2CTCTokenizer,Cl as Wav2Vec2FeatureExtractor,El as Wav2Vec2ForAudioFrameClassification,Pl as Wav2Vec2ForCTC,Al as Wav2Vec2ForSequenceClassification,Fl as Wav2Vec2Model,zl as Wav2Vec2PreTrainedModel,Il as Wav2Vec2ProcessorWithLM,Ol as WavLMForAudioFrameClassification,Bl as WavLMForCTC,Ll as WavLMForSequenceClassification,Dl as WavLMForXVector,Rl as WavLMModel,Nl as WavLMPreTrainedModel,Vl as WeSpeakerFeatureExtractor,jl as WeSpeakerResNetModel,Gl as WeSpeakerResNetPreTrainedModel,ql as WhisperFeatureExtractor,Ul as WhisperForConditionalGeneration,Wl as WhisperModel,Hl as WhisperPreTrainedModel,Xl as WhisperProcessor,Kl as WhisperTextStreamer,Ql as WhisperTokenizer,Yl as XLMForQuestionAnswering,Jl as XLMForSequenceClassification,Zl as XLMForTokenClassification,eu as XLMModel,tu as XLMPreTrainedModel,nu as XLMRobertaForMaskedLM,ru as XLMRobertaForQuestionAnswering,iu as XLMRobertaForSequenceClassification,au as XLMRobertaForTokenClassification,su as XLMRobertaModel,ou as XLMRobertaPreTrainedModel,lu as XLMRobertaTokenizer,uu as XLMTokenizer,du as XLMWithLMHeadModel,cu as XVectorOutput,pu as YolosFeatureExtractor,hu as YolosForObjectDetection,mu as YolosModel,fu as YolosObjectDetectionOutput,gu as YolosPreTrainedModel,_u as ZeroShotAudioClassificationPipeline,wu as ZeroShotClassificationPipeline,yu as ZeroShotImageClassificationPipeline,bu as ZeroShotObjectDetectionPipeline,vu as bankers_round,xu as cat,Mu as cos_sim,Tu as dot,ku as dynamic_time_warping,$u as env,Su as full,Cu as full_like,Eu as getKeyValueShapes,Pu as hamming,Au as hanning,Fu as interpolate,zu as interpolate_4d,Iu as interpolate_data,Ou as is_chinese_char,Bu as layer_norm,Lu as log_softmax,Du as magnitude,Ru as matmul,Nu as max,Vu as mean,ju as mean_pooling,Gu as medianFilter,qu as mel_filter_bank,Uu as min,Wu as ones,Hu as ones_like,Xu as permute,Ku as permute_data,Qu as pipeline,Yu as quantize_embeddings,Ju as read_audio,Zu as rfft,ed as round,td as softmax,nd as spectrogram,rd as stack,id as std_mean,ad as topk,sd as window_function,od as zeros,ld as zeros_like};
230
230
  //# sourceMappingURL=transformers.min.js.map