import{S as ys,i as bs,s as vs,e as n,k as p,w as h,t as r,M as ws,c as a,d as t,m as u,a as s,x as f,h as i,b as d,G as o,g as c,y as g,q as _,o as y,B as b,v as Ps}from"../../chunks/vendor-hf-doc-builder.js";import{T as _s}from"../../chunks/Tip-hf-doc-builder.js";import{D as B}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ho}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as ge}from"../../chunks/IconCopyLink-hf-doc-builder.js";function Ms(He){let m,E,v,M,k;return{c(){m=n("p"),E=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),v=n("code"),M=r("Module"),k=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(w){m=a(w,"P",{});var J=s(m);E=i(J,"Although the recipe for forward pass needs to be defined within this function, one should call the "),v=a(J,"CODE",{});var C=s(v);M=i(C,"Module"),C.forEach(t),k=i(J,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),J.forEach(t)},m(w,J){c(w,m,J),o(m,E),o(m,v),o(v,M),o(m,k)},d(w){w&&t(m)}}}function Ts(He){let m,E,v,M,k,w,J,C,W,te,U,T,R,I;return{c(){m=n("p"),E=r("Most generation-controlling parameters are set in "),v=n("code"),M=r("generation_config"),k=r(` which, if not passed, will be set to the
model\u2019s default generation configuration. You can override any `),w=n("code"),J=r("generation_config"),C=r(` by passing the corresponding
parameters to generate(), e.g. `),W=n("code"),te=r(".generate(inputs, num_beams=4, do_sample=True)"),U=r(`. For an overview of generation
strategies and code examples, check out the `),T=n("a"),R=r("following guide"),I=r("."),this.h()},l(V){m=a(V,"P",{});var P=s(m);E=i(P,"Most generation-controlling parameters are set in "),v=a(P,"CODE",{});var Ye=s(v);M=i(Ye,"generation_config"),Ye.forEach(t),k=i(P,` which, if not passed, will be set to the
model\u2019s default generation configuration. You can override any `),w=a(P,"CODE",{});var _e=s(w);J=i(_e,"generation_config"),_e.forEach(t),C=i(P,` by passing the corresponding
parameters to generate(), e.g. `),W=a(P,"CODE",{});var G=s(W);te=i(G,".generate(inputs, num_beams=4, do_sample=True)"),G.forEach(t),U=i(P,`. For an overview of generation
strategies and code examples, check out the `),T=a(P,"A",{href:!0});var Ae=s(T);R=i(Ae,"following guide"),Ae.forEach(t),I=i(P,"."),P.forEach(t),this.h()},h(){d(T,"href","./generation_strategies")},m(V,P){c(V,m,P),o(m,E),o(m,v),o(v,M),o(m,k),o(m,w),o(w,J),o(m,C),o(m,W),o(W,te),o(m,U),o(m,T),o(T,R),o(m,I)},d(V){V&&t(m)}}}function js(He){let m,E,v,M,k,w,J,C,W,te,U,T,R,I,V,P,Ye,_e,G,Ae,ye,Rt,Vt,Yo,De,Nt,Ao,ne,qt,be,xt,Qt,Do,Oe,St,Oo,Le,vo,Ht,Lo,Ke,Yt,Ko,eo,wo,At,et,ve,ot,ae,Dt,Po,Ot,Lt,tt,z,Kt,we,en,on,Pe,tn,nn,nt,N,se,Mo,Me,an,To,sn,at,oo,jo,rn,st,Te,rt,to,Jo,ln,it,je,lt,no,ko,dn,dt,Je,ct,ao,q,cn,Uo,pn,un,Eo,mn,hn,pt,ke,ut,x,re,Co,Ue,fn,Io,gn,mt,$,Ee,_n,Q,yn,so,bn,vn,Ce,wn,Pn,Mn,S,Tn,ro,jn,Jn,io,kn,Un,ht,H,ie,Go,Ie,En,$o,Cn,ft,Y,Ge,In,le,$e,Gn,zo,$n,gt,A,de,Zo,ze,zn,Fo,Zn,_t,j,Ze,Fn,D,Xn,Xo,Bn,Wn,lo,Rn,Vn,Nn,Fe,qn,Xe,xn,Qn,Sn,Z,Be,Hn,O,Yn,co,An,Dn,Bo,On,Ln,Kn,ce,ea,F,We,oa,Wo,ta,na,pe,yt,L,ue,Ro,Re,aa,Vo,sa,bt,K,Ve,ra,me,Ne,ia,No,la,vt,ee,he,qo,qe,da,xo,ca,wt,oe,xe,pa,fe,Qe,ua,Qo,ma,Pt;return w=new ge({}),I=new ge({}),ve=new Ho({props:{code:"cGlwJTIwaW5zdGFsbCUyMHByZXR0eS1taWRpJTNEJTNEMC4yLjklMjBlc3NlbnRpYSUzRCUzRDIuMWI2LmRldjEwMzQlMjBsaWJyb3NhJTIwc2NpcHk=",highlighted:'pip install pretty-midi==<span class="hljs-number">0.2</span><span class="hljs-number">.9</span> essentia==<span class="hljs-number">2.1b6</span>.dev1034 librosa scipy'}}),Me=new ge({}),Te=new Ho({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFBvcDJQaWFub0ZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUyQyUyMFBvcDJQaWFub1Byb2Nlc3NvciUwQSUwQW1vZGVsJTIwJTNEJTIwUG9wMlBpYW5vRm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uLmZyb21fcHJldHJhaW5lZCglMjJzd2VldGNvY29hJTJGcG9wMnBpYW5vJTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMFBvcDJQaWFub1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyc3dlZXRjb2NvYSUyRnBvcDJwaWFubyUyMiklMEFkcyUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJzd2VldGNvY29hJTJGcG9wMnBpYW5vX2NpJTIyJTJDJTIwc3BsaXQlM0QlMjJ0ZXN0JTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3NvciglMEElMjAlMjAlMjAlMjBhdWRpbyUzRGRzJTVCJTIyYXVkaW8lMjIlNUQlNUIwJTVEJTVCJTIyYXJyYXklMjIlNUQlMkMlMjBzYW1wbGluZ19yYXRlJTNEZHMlNUIlMjJhdWRpbyUyMiU1RCU1QjAlNUQlNUIlMjJzYW1wbGluZ19yYXRlJTIyJTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUwQSklMEFtb2RlbF9vdXRwdXQlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZShpbnB1dF9mZWF0dXJlcyUzRGlucHV0cyU1QiUyMmlucHV0X2ZlYXR1cmVzJTIyJTVEJTJDJTIwY29tcG9zZXIlM0QlMjJjb21wb3NlcjElMjIpJTBBdG9rZW5pemVyX291dHB1dCUyMCUzRCUyMHByb2Nlc3Nvci5iYXRjaF9kZWNvZGUoJTBBJTIwJTIwJTIwJTIwdG9rZW5faWRzJTNEbW9kZWxfb3V0cHV0JTJDJTIwZmVhdHVyZV9leHRyYWN0b3Jfb3V0cHV0JTNEaW5wdXRzJTBBKSU1QiUyMnByZXR0eV9taWRpX29iamVjdHMlMjIlNUQlNUIwJTVEJTBBdG9rZW5pemVyX291dHB1dC53cml0ZSglMjIuJTJGT3V0cHV0cyUyRm1pZGlfb3V0cHV0Lm1pZCUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Pop2PianoForConditionalGeneration, Pop2PianoProcessor

<span class="hljs-meta">&gt;&gt;&gt; </span>model = Pop2PianoForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;sweetcocoa/pop2piano&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = Pop2PianoProcessor.from_pretrained(<span class="hljs-string">&quot;sweetcocoa/pop2piano&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;sweetcocoa/pop2piano_ci&quot;</span>, split=<span class="hljs-string">&quot;test&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(
<span class="hljs-meta">... </span>    audio=ds[<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-number">0</span>][<span class="hljs-string">&quot;array&quot;</span>], sampling_rate=ds[<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-number">0</span>][<span class="hljs-string">&quot;sampling_rate&quot;</span>], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model_output = model.generate(input_features=inputs[<span class="hljs-string">&quot;input_features&quot;</span>], composer=<span class="hljs-string">&quot;composer1&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer_output = processor.batch_decode(
<span class="hljs-meta">... </span>    token_ids=model_output, feature_extractor_output=inputs
<span class="hljs-meta">... </span>)[<span class="hljs-string">&quot;pretty_midi_objects&quot;</span>][<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer_output.write(<span class="hljs-string">&quot;./Outputs/midi_output.mid&quot;</span>)`}}),je=new Ho({props:{code:"aW1wb3J0JTIwbGlicm9zYSUwQWZyb20lMjB0cmFuc2Zvcm1lcnMlMjBpbXBvcnQlMjBQb3AyUGlhbm9Gb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMkMlMjBQb3AyUGlhbm9Qcm9jZXNzb3IlMEElMEFhdWRpbyUyQyUyMHNyJTIwJTNEJTIwbGlicm9zYS5sb2FkKCUyMiUzQ3lvdXJfYXVkaW9fZmlsZV9oZXJlJTNFJTIyJTJDJTIwc3IlM0Q0NDEwMCklMjAlMjAlMjMlMjBmZWVsJTIwZnJlZSUyMHRvJTIwY2hhbmdlJTIwdGhlJTIwc3IlMjB0byUyMGElMjBzdWl0YWJsZSUyMHZhbHVlLiUwQW1vZGVsJTIwJTNEJTIwUG9wMlBpYW5vRm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uLmZyb21fcHJldHJhaW5lZCglMjJzd2VldGNvY29hJTJGcG9wMnBpYW5vJTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMFBvcDJQaWFub1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyc3dlZXRjb2NvYSUyRnBvcDJwaWFubyUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoYXVkaW8lM0RhdWRpbyUyQyUyMHNhbXBsaW5nX3JhdGUlM0RzciUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBbW9kZWxfb3V0cHV0JTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoaW5wdXRfZmVhdHVyZXMlM0RpbnB1dHMlNUIlMjJpbnB1dF9mZWF0dXJlcyUyMiU1RCUyQyUyMGNvbXBvc2VyJTNEJTIyY29tcG9zZXIxJTIyKSUwQXRva2VuaXplcl9vdXRwdXQlMjAlM0QlMjBwcm9jZXNzb3IuYmF0Y2hfZGVjb2RlKCUwQSUyMCUyMCUyMCUyMHRva2VuX2lkcyUzRG1vZGVsX291dHB1dCUyQyUyMGZlYXR1cmVfZXh0cmFjdG9yX291dHB1dCUzRGlucHV0cyUwQSklNUIlMjJwcmV0dHlfbWlkaV9vYmplY3RzJTIyJTVEJTVCMCU1RCUwQXRva2VuaXplcl9vdXRwdXQud3JpdGUoJTIyLiUyRk91dHB1dHMlMkZtaWRpX291dHB1dC5taWQlMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> librosa
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Pop2PianoForConditionalGeneration, Pop2PianoProcessor

<span class="hljs-meta">&gt;&gt;&gt; </span>audio, sr = librosa.load(<span class="hljs-string">&quot;&lt;your_audio_file_here&gt;&quot;</span>, sr=<span class="hljs-number">44100</span>)  <span class="hljs-comment"># feel free to change the sr to a suitable value.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Pop2PianoForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;sweetcocoa/pop2piano&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = Pop2PianoProcessor.from_pretrained(<span class="hljs-string">&quot;sweetcocoa/pop2piano&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(audio=audio, sampling_rate=sr, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model_output = model.generate(input_features=inputs[<span class="hljs-string">&quot;input_features&quot;</span>], composer=<span class="hljs-string">&quot;composer1&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer_output = processor.batch_decode(
<span class="hljs-meta">... </span>    token_ids=model_output, feature_extractor_output=inputs
<span class="hljs-meta">... </span>)[<span class="hljs-string">&quot;pretty_midi_objects&quot;</span>][<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer_output.write(<span class="hljs-string">&quot;./Outputs/midi_output.mid&quot;</span>)`}}),Je=new Ho({props:{code:"aW1wb3J0JTIwbGlicm9zYSUwQWZyb20lMjB0cmFuc2Zvcm1lcnMlMjBpbXBvcnQlMjBQb3AyUGlhbm9Gb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMkMlMjBQb3AyUGlhbm9Qcm9jZXNzb3IlMEElMEElMjMlMjBmZWVsJTIwZnJlZSUyMHRvJTIwY2hhbmdlJTIwdGhlJTIwc3IlMjB0byUyMGElMjBzdWl0YWJsZSUyMHZhbHVlLiUwQWF1ZGlvMSUyQyUyMHNyMSUyMCUzRCUyMGxpYnJvc2EubG9hZCglMjIlM0N5b3VyX2ZpcnN0X2F1ZGlvX2ZpbGVfaGVyZSUzRSUyMiUyQyUyMHNyJTNENDQxMDApJTIwJTIwJTBBYXVkaW8yJTJDJTIwc3IyJTIwJTNEJTIwbGlicm9zYS5sb2FkKCUyMiUzQ3lvdXJfc2Vjb25kX2F1ZGlvX2ZpbGVfaGVyZSUzRSUyMiUyQyUyMHNyJTNENDQxMDApJTBBbW9kZWwlMjAlM0QlMjBQb3AyUGlhbm9Gb3JDb25kaXRpb25hbEdlbmVyYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMnN3ZWV0Y29jb2ElMkZwb3AycGlhbm8lMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwUG9wMlBpYW5vUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJzd2VldGNvY29hJTJGcG9wMnBpYW5vJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3NvcihhdWRpbyUzRCU1QmF1ZGlvMSUyQyUyMGF1ZGlvMiU1RCUyQyUyMHNhbXBsaW5nX3JhdGUlM0QlNUJzcjElMkMlMjBzcjIlNUQlMkMlMjByZXR1cm5fYXR0ZW50aW9uX21hc2slM0RUcnVlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMjMlMjBTaW5jZSUyMHdlJTIwbm93JTIwZ2VuZXJhdGluZyUyMGluJTIwYmF0Y2goMiUyMGF1ZGlvcyklMjB3ZSUyMG11c3QlMjBwYXNzJTIwdGhlJTIwYXR0ZW50aW9uX21hc2slMEFtb2RlbF9vdXRwdXQlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSglMEElMjAlMjAlMjAlMjBpbnB1dF9mZWF0dXJlcyUzRGlucHV0cyU1QiUyMmlucHV0X2ZlYXR1cmVzJTIyJTVEJTJDJTBBJTIwJTIwJTIwJTIwYXR0ZW50aW9uX21hc2slM0RpbnB1dHMlNUIlMjJhdHRlbnRpb25fbWFzayUyMiU1RCUyQyUwQSUyMCUyMCUyMCUyMGNvbXBvc2VyJTNEJTIyY29tcG9zZXIxJTIyJTJDJTBBKSUwQXRva2VuaXplcl9vdXRwdXQlMjAlM0QlMjBwcm9jZXNzb3IuYmF0Y2hfZGVjb2RlKCUwQSUyMCUyMCUyMCUyMHRva2VuX2lkcyUzRG1vZGVsX291dHB1dCUyQyUyMGZlYXR1cmVfZXh0cmFjdG9yX291dHB1dCUzRGlucHV0cyUwQSklNUIlMjJwcmV0dHlfbWlkaV9vYmplY3RzJTIyJTVEJTBBJTBBJTIzJTIwU2luY2UlMjB3ZSUyMG5vdyUyMGhhdmUlMjAyJTIwZ2VuZXJhdGVkJTIwTUlESSUyMGZpbGVzJTBBdG9rZW5pemVyX291dHB1dCU1QjAlNUQud3JpdGUoJTIyLiUyRk91dHB1dHMlMkZtaWRpX291dHB1dDEubWlkJTIyKSUwQXRva2VuaXplcl9vdXRwdXQlNUIxJTVELndyaXRlKCUyMi4lMkZPdXRwdXRzJTJGbWlkaV9vdXRwdXQyLm1pZCUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> librosa
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Pop2PianoForConditionalGeneration, Pop2PianoProcessor

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># feel free to change the sr to a suitable value.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>audio1, sr1 = librosa.load(<span class="hljs-string">&quot;&lt;your_first_audio_file_here&gt;&quot;</span>, sr=<span class="hljs-number">44100</span>)  
<span class="hljs-meta">&gt;&gt;&gt; </span>audio2, sr2 = librosa.load(<span class="hljs-string">&quot;&lt;your_second_audio_file_here&gt;&quot;</span>, sr=<span class="hljs-number">44100</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Pop2PianoForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;sweetcocoa/pop2piano&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = Pop2PianoProcessor.from_pretrained(<span class="hljs-string">&quot;sweetcocoa/pop2piano&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(audio=[audio1, audio2], sampling_rate=[sr1, sr2], return_attention_mask=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Since we now generating in batch(2 audios) we must pass the attention_mask</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model_output = model.generate(
<span class="hljs-meta">... </span>    input_features=inputs[<span class="hljs-string">&quot;input_features&quot;</span>],
<span class="hljs-meta">... </span>    attention_mask=inputs[<span class="hljs-string">&quot;attention_mask&quot;</span>],
<span class="hljs-meta">... </span>    composer=<span class="hljs-string">&quot;composer1&quot;</span>,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer_output = processor.batch_decode(
<span class="hljs-meta">... </span>    token_ids=model_output, feature_extractor_output=inputs
<span class="hljs-meta">... </span>)[<span class="hljs-string">&quot;pretty_midi_objects&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Since we now have 2 generated MIDI files</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer_output[<span class="hljs-number">0</span>].write(<span class="hljs-string">&quot;./Outputs/midi_output1.mid&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer_output[<span class="hljs-number">1</span>].write(<span class="hljs-string">&quot;./Outputs/midi_output2.mid&quot;</span>)`}}),ke=new Ho({props:{code:"aW1wb3J0JTIwbGlicm9zYSUwQWZyb20lMjB0cmFuc2Zvcm1lcnMlMjBpbXBvcnQlMjBQb3AyUGlhbm9Gb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMkMlMjBQb3AyUGlhbm9GZWF0dXJlRXh0cmFjdG9yJTJDJTIwUG9wMlBpYW5vVG9rZW5pemVyJTBBJTBBJTIzJTIwZmVlbCUyMGZyZWUlMjB0byUyMGNoYW5nZSUyMHRoZSUyMHNyJTIwdG8lMjBhJTIwc3VpdGFibGUlMjB2YWx1ZS4lMEFhdWRpbzElMkMlMjBzcjElMjAlM0QlMjBsaWJyb3NhLmxvYWQoJTIyJTNDeW91cl9maXJzdF9hdWRpb19maWxlX2hlcmUlM0UlMjIlMkMlMjBzciUzRDQ0MTAwKSUyMCUyMCUwQWF1ZGlvMiUyQyUyMHNyMiUyMCUzRCUyMGxpYnJvc2EubG9hZCglMjIlM0N5b3VyX3NlY29uZF9hdWRpb19maWxlX2hlcmUlM0UlMjIlMkMlMjBzciUzRDQ0MTAwKSUwQW1vZGVsJTIwJTNEJTIwUG9wMlBpYW5vRm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uLmZyb21fcHJldHJhaW5lZCglMjJzd2VldGNvY29hJTJGcG9wMnBpYW5vJTIyKSUwQWZlYXR1cmVfZXh0cmFjdG9yJTIwJTNEJTIwUG9wMlBpYW5vRmVhdHVyZUV4dHJhY3Rvci5mcm9tX3ByZXRyYWluZWQoJTIyc3dlZXRjb2NvYSUyRnBvcDJwaWFubyUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBQb3AyUGlhbm9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMnN3ZWV0Y29jb2ElMkZwb3AycGlhbm8lMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwZmVhdHVyZV9leHRyYWN0b3IoJTBBJTIwJTIwJTIwJTIwYXVkaW8lM0QlNUJhdWRpbzElMkMlMjBhdWRpbzIlNUQlMkMlMjAlMEElMjAlMjAlMjAlMjBzYW1wbGluZ19yYXRlJTNEJTVCc3IxJTJDJTIwc3IyJTVEJTJDJTIwJTBBJTIwJTIwJTIwJTIwcmV0dXJuX2F0dGVudGlvbl9tYXNrJTNEVHJ1ZSUyQyUyMCUwQSUyMCUyMCUyMCUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIlMkMlMEEpJTBBJTIzJTIwU2luY2UlMjB3ZSUyMG5vdyUyMGdlbmVyYXRpbmclMjBpbiUyMGJhdGNoKDIlMjBhdWRpb3MpJTIwd2UlMjBtdXN0JTIwcGFzcyUyMHRoZSUyMGF0dGVudGlvbl9tYXNrJTBBbW9kZWxfb3V0cHV0JTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoJTBBJTIwJTIwJTIwJTIwaW5wdXRfZmVhdHVyZXMlM0RpbnB1dHMlNUIlMjJpbnB1dF9mZWF0dXJlcyUyMiU1RCUyQyUwQSUyMCUyMCUyMCUyMGF0dGVudGlvbl9tYXNrJTNEaW5wdXRzJTVCJTIyYXR0ZW50aW9uX21hc2slMjIlNUQlMkMlMEElMjAlMjAlMjAlMjBjb21wb3NlciUzRCUyMmNvbXBvc2VyMSUyMiUyQyUwQSklMEF0b2tlbml6ZXJfb3V0cHV0JTIwJTNEJTIwdG9rZW5pemVyLmJhdGNoX2RlY29kZSglMEElMjAlMjAlMjAlMjB0b2tlbl9pZHMlM0Rtb2RlbF9vdXRwdXQlMkMlMjBmZWF0dXJlX2V4dHJhY3Rvcl9vdXRwdXQlM0RpbnB1dHMlMEEpJTVCJTIycHJldHR5X21pZGlfb2JqZWN0cyUyMiU1RCUwQSUwQSUyMyUyMFNpbmNlJTIwd2UlMjBub3clMjBoYXZlJTIwMiUyMGdlbmVyYXRlZCUyME1JREklMjBmaWxlcyUwQXRva2VuaXplcl9vdXRwdXQlNUIwJTVELndyaXRlKCUyMi4lMkZPdXRwdXRzJTJGbWlkaV9vdXRwdXQxLm1pZCUyMiklMEF0b2tlbml6ZXJfb3V0cHV0JTVCMSU1RC53cml0ZSglMjIuJTJGT3V0cHV0cyUyRm1pZGlfb3V0cHV0Mi5taWQlMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> librosa
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Pop2PianoForConditionalGeneration, Pop2PianoFeatureExtractor, Pop2PianoTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># feel free to change the sr to a suitable value.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>audio1, sr1 = librosa.load(<span class="hljs-string">&quot;&lt;your_first_audio_file_here&gt;&quot;</span>, sr=<span class="hljs-number">44100</span>)  
<span class="hljs-meta">&gt;&gt;&gt; </span>audio2, sr2 = librosa.load(<span class="hljs-string">&quot;&lt;your_second_audio_file_here&gt;&quot;</span>, sr=<span class="hljs-number">44100</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = Pop2PianoForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;sweetcocoa/pop2piano&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = Pop2PianoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;sweetcocoa/pop2piano&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = Pop2PianoTokenizer.from_pretrained(<span class="hljs-string">&quot;sweetcocoa/pop2piano&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(
<span class="hljs-meta">... </span>    audio=[audio1, audio2], 
<span class="hljs-meta">... </span>    sampling_rate=[sr1, sr2], 
<span class="hljs-meta">... </span>    return_attention_mask=<span class="hljs-literal">True</span>, 
<span class="hljs-meta">... </span>    return_tensors=<span class="hljs-string">&quot;pt&quot;</span>,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Since we now generating in batch(2 audios) we must pass the attention_mask</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model_output = model.generate(
<span class="hljs-meta">... </span>    input_features=inputs[<span class="hljs-string">&quot;input_features&quot;</span>],
<span class="hljs-meta">... </span>    attention_mask=inputs[<span class="hljs-string">&quot;attention_mask&quot;</span>],
<span class="hljs-meta">... </span>    composer=<span class="hljs-string">&quot;composer1&quot;</span>,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer_output = tokenizer.batch_decode(
<span class="hljs-meta">... </span>    token_ids=model_output, feature_extractor_output=inputs
<span class="hljs-meta">... </span>)[<span class="hljs-string">&quot;pretty_midi_objects&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Since we now have 2 generated MIDI files</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer_output[<span class="hljs-number">0</span>].write(<span class="hljs-string">&quot;./Outputs/midi_output1.mid&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer_output[<span class="hljs-number">1</span>].write(<span class="hljs-string">&quot;./Outputs/midi_output2.mid&quot;</span>)`}}),Ue=new ge({}),Ee=new B({props:{name:"class transformers.Pop2PianoConfig",anchor:"transformers.Pop2PianoConfig",parameters:[{name:"vocab_size",val:" = 2400"},{name:"composer_vocab_size",val:" = 21"},{name:"d_model",val:" = 512"},{name:"d_kv",val:" = 64"},{name:"d_ff",val:" = 2048"},{name:"num_layers",val:" = 6"},{name:"num_decoder_layers",val:" = None"},{name:"num_heads",val:" = 8"},{name:"relative_attention_num_buckets",val:" = 32"},{name:"relative_attention_max_distance",val:" = 128"},{name:"dropout_rate",val:" = 0.1"},{name:"layer_norm_epsilon",val:" = 1e-06"},{name:"initializer_factor",val:" = 1.0"},{name:"feed_forward_proj",val:" = 'gated-gelu'"},{name:"is_encoder_decoder",val:" = True"},{name:"use_cache",val:" = True"},{name:"pad_token_id",val:" = 0"},{name:"eos_token_id",val:" = 1"},{name:"dense_act_fn",val:" = 'relu'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Pop2PianoConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2400) &#x2014;
Vocabulary size of the <code>Pop2PianoForConditionalGeneration</code> model. Defines the number of different tokens
that can be represented by the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/pop2piano#transformers.Pop2PianoForConditionalGeneration">Pop2PianoForConditionalGeneration</a>.`,name:"vocab_size"},{anchor:"transformers.Pop2PianoConfig.composer_vocab_size",description:`<strong>composer_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 21) &#x2014;
Denotes the number of composers.`,name:"composer_vocab_size"},{anchor:"transformers.Pop2PianoConfig.d_model",description:`<strong>d_model</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Size of the encoder layers and the pooler layer.`,name:"d_model"},{anchor:"transformers.Pop2PianoConfig.d_kv",description:`<strong>d_kv</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
Size of the key, query, value projections per attention head. The <code>inner_dim</code> of the projection layer will
be defined as <code>num_heads * d_kv</code>.`,name:"d_kv"},{anchor:"transformers.Pop2PianoConfig.d_ff",description:`<strong>d_ff</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
Size of the intermediate feed forward layer in each <code>Pop2PianoBlock</code>.`,name:"d_ff"},{anchor:"transformers.Pop2PianoConfig.num_layers",description:`<strong>num_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 6) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_layers"},{anchor:"transformers.Pop2PianoConfig.num_decoder_layers",description:`<strong>num_decoder_layers</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of hidden layers in the Transformer decoder. Will use the same value as <code>num_layers</code> if not set.`,name:"num_decoder_layers"},{anchor:"transformers.Pop2PianoConfig.num_heads",description:`<strong>num_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_heads"},{anchor:"transformers.Pop2PianoConfig.relative_attention_num_buckets",description:`<strong>relative_attention_num_buckets</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
The number of buckets to use for each attention layer.`,name:"relative_attention_num_buckets"},{anchor:"transformers.Pop2PianoConfig.relative_attention_max_distance",description:`<strong>relative_attention_max_distance</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
The maximum distance of the longer sequences for the bucket separation.`,name:"relative_attention_max_distance"},{anchor:"transformers.Pop2PianoConfig.dropout_rate",description:`<strong>dropout_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The ratio for all dropout layers.`,name:"dropout_rate"},{anchor:"transformers.Pop2PianoConfig.layer_norm_epsilon",description:`<strong>layer_norm_epsilon</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-6) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_epsilon"},{anchor:"transformers.Pop2PianoConfig.initializer_factor",description:`<strong>initializer_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
A factor for initializing all weight matrices (should be kept to 1.0, used internally for initialization
testing).`,name:"initializer_factor"},{anchor:"transformers.Pop2PianoConfig.feed_forward_proj",description:`<strong>feed_forward_proj</strong> (<code>string</code>, <em>optional</em>, defaults to <code>&quot;gated-gelu&quot;</code>) &#x2014;
Type of feed forward layer to be used. Should be one of <code>&quot;relu&quot;</code> or <code>&quot;gated-gelu&quot;</code>.`,name:"feed_forward_proj"},{anchor:"transformers.Pop2PianoConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models).`,name:"use_cache"},{anchor:"transformers.Pop2PianoConfig.dense_act_fn",description:`<strong>dense_act_fn</strong> (<code>string</code>, <em>optional</em>, defaults to <code>&quot;relu&quot;</code>) &#x2014;
Type of Activation Function to be used in <code>Pop2PianoDenseActDense</code> and in <code>Pop2PianoDenseGatedActDense</code>.`,name:"dense_act_fn"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/pop2piano/configuration_pop2piano.py#L29"}}),Ie=new ge({}),Ge=new B({props:{name:"class transformers.Pop2PianoFeatureExtractor",anchor:"transformers.Pop2PianoFeatureExtractor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/dummy_essentia_and_librosa_and_pretty_midi_and_scipy_and_torch_objects.py#L5"}}),$e=new B({props:{name:"__call__",anchor:"transformers.Pop2PianoFeatureExtractor.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}]}}),ze=new ge({}),Ze=new B({props:{name:"class transformers.Pop2PianoForConditionalGeneration",anchor:"transformers.Pop2PianoForConditionalGeneration",parameters:[{name:"config",val:": Pop2PianoConfig"}],parametersDescription:[{anchor:"transformers.Pop2PianoForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/pop2piano#transformers.Pop2PianoConfig">Pop2PianoConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/pop2piano/modeling_pop2piano.py#L1020"}}),Be=new B({props:{name:"forward",anchor:"transformers.Pop2PianoForConditionalGeneration.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.BoolTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.Tensor]]] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.Tensor]]] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"input_features",val:": typing.Optional[torch.FloatTensor] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.Pop2PianoForConditionalGeneration.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Pop2Piano is a model with relative position embeddings
so you should be able to pad the inputs on both the right and the left. Indices can be obtained using
<a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for detail.
<a href="../glossary#input-ids">What are input IDs?</a> To know more on how to prepare <code>input_ids</code> for pretraining
take a look a <a href="./Pop2Piano#training">Pop2Pianp Training</a>.`,name:"input_ids"},{anchor:"transformers.Pop2PianoForConditionalGeneration.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.Pop2PianoForConditionalGeneration.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary. Indices can be obtained using
<a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.
<a href="../glossary#decoder-input-ids">What are decoder input IDs?</a> Pop2Piano uses the <code>pad_token_id</code> as the
starting token for <code>decoder_input_ids</code> generation. If <code>past_key_values</code> is used, optionally only the last
<code>decoder_input_ids</code> have to be input (see <code>past_key_values</code>). To know more on how to prepare`,name:"decoder_input_ids"},{anchor:"transformers.Pop2PianoForConditionalGeneration.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.BoolTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.`,name:"decoder_attention_mask"},{anchor:"transformers.Pop2PianoForConditionalGeneration.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.Pop2PianoForConditionalGeneration.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.Pop2PianoForConditionalGeneration.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules in the decoder. Mask values selected in
<code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.Pop2PianoForConditionalGeneration.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <code>optional</code>: <em>hidden_states</em>, <code>optional</code>: <em>attentions</em>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code> is a sequence of hidden states at
the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.Pop2PianoForConditionalGeneration.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.Pop2PianoForConditionalGeneration.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.Pop2PianoForConditionalGeneration.forward.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Does the same task as <code>inputs_embeds</code>. If <code>inputs_embeds</code> is not present but <code>input_features</code> is present
then <code>input_features</code> will be considered as <code>inputs_embeds</code>.`,name:"input_features"},{anchor:"transformers.Pop2PianoForConditionalGeneration.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix. If
<code>decoder_input_ids</code> and <code>decoder_inputs_embeds</code> are both unset, <code>decoder_inputs_embeds</code> takes the value of
<code>inputs_embeds</code>.`,name:"decoder_inputs_embeds"},{anchor:"transformers.Pop2PianoForConditionalGeneration.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.Pop2PianoForConditionalGeneration.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.Pop2PianoForConditionalGeneration.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.Pop2PianoForConditionalGeneration.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.Pop2PianoForConditionalGeneration.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[-100, 0, ..., config.vocab_size - 1]</code>. All labels set to <code>-100</code> are ignored (masked), the loss is only computed for
labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/pop2piano/modeling_pop2piano.py#L1119",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/pop2piano#transformers.Pop2PianoConfig"
>Pop2PianoConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ce=new _s({props:{$$slots:{default:[Ms]},$$scope:{ctx:He}}}),We=new B({props:{name:"generate",anchor:"transformers.Pop2PianoForConditionalGeneration.generate",parameters:[{name:"input_features",val:""},{name:"attention_mask",val:" = None"},{name:"composer",val:" = 'composer1'"},{name:"generation_config",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.Pop2PianoForConditionalGeneration.generate.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
This is the featurized version of audio generated by <code>Pop2PianoFeatureExtractor</code>.
attention_mask &#x2014;
For batched generation <code>input_features</code> are padded to have the same shape across all examples.
<code>attention_mask</code> helps to determine which areas were padded and which were not.<ul>
<li>1 for tokens that are <strong>not padded</strong>,</li>
<li>0 for tokens that are <strong>padded</strong>.</li>
</ul>`,name:"input_features"},{anchor:"transformers.Pop2PianoForConditionalGeneration.generate.composer",description:`<strong>composer</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;composer1&quot;</code>) &#x2014;
This value is passed to <code>Pop2PianoConcatEmbeddingToMel</code> to generate different embeddings for each
<code>&quot;composer&quot;</code>. Please make sure that the composet value is present in <code>composer_to_feature_token</code> in
<code>generation_config</code>. For an example please see
<a href="https://huggingface.co/sweetcocoa/pop2piano/blob/main/generation_config.json" rel="nofollow">https://huggingface.co/sweetcocoa/pop2piano/blob/main/generation_config.json</a> .`,name:"composer"},{anchor:"transformers.Pop2PianoForConditionalGeneration.generate.generation_config",description:`<strong>generation_config</strong> (<code>~generation.GenerationConfig</code>, <em>optional</em>) &#x2014;
The generation configuration to be used as base parametrization for the generation call. <code>**kwargs</code>
passed to generate matching the attributes of <code>generation_config</code> will override them. If
<code>generation_config</code> is not provided, the default will be used, which had the following loading
priority: 1) from the <code>generation_config.json</code> model file, if it exists; 2) from the model
configuration. Please note that unspecified parameters will inherit <a href="/docs/transformers/main/en/main_classes/text_generation#transformers.GenerationConfig">GenerationConfig</a>&#x2019;s
default values, whose documentation should be checked to parameterize generation.
kwargs &#x2014;
Ad hoc parametrization of <code>generate_config</code> and/or additional model-specific kwargs that will be
forwarded to the <code>forward</code> function of the model. If the model is an encoder-decoder model, encoder
specific kwargs should not be prefixed and decoder specific kwargs should be prefixed with <em>decoder_</em>.`,name:"generation_config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/pop2piano/modeling_pop2piano.py#L1227",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput"
>ModelOutput</a> (if <code>return_dict_in_generate=True</code>
or when <code>config.return_dict_in_generate=True</code>) or a <code>torch.FloatTensor</code>.
Since Pop2Piano is an encoder-decoder model (<code>model.config.is_encoder_decoder=True</code>), the possible
<a
  href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput"
>ModelOutput</a> types are:</p>
<ul>
<li><a
  href="/docs/transformers/main/en/internal/generation_utils#transformers.generation.GreedySearchEncoderDecoderOutput"
>GreedySearchEncoderDecoderOutput</a>,</li>
<li><a
  href="/docs/transformers/main/en/internal/generation_utils#transformers.generation.SampleEncoderDecoderOutput"
>SampleEncoderDecoderOutput</a>,</li>
<li><a
  href="/docs/transformers/main/en/internal/generation_utils#transformers.generation.BeamSearchEncoderDecoderOutput"
>BeamSearchEncoderDecoderOutput</a>,</li>
<li><a
  href="/docs/transformers/main/en/internal/generation_utils#transformers.generation.BeamSampleEncoderDecoderOutput"
>BeamSampleEncoderDecoderOutput</a></li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput"
>ModelOutput</a> or <code>torch.LongTensor</code></p>
`}}),pe=new _s({props:{warning:!0,$$slots:{default:[Ts]},$$scope:{ctx:He}}}),Re=new ge({}),Ve=new B({props:{name:"class transformers.Pop2PianoTokenizer",anchor:"transformers.Pop2PianoTokenizer",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/dummy_essentia_and_librosa_and_pretty_midi_and_scipy_and_torch_objects.py#L12"}}),Ne=new B({props:{name:"__call__",anchor:"transformers.Pop2PianoTokenizer.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}]}}),qe=new ge({}),xe=new B({props:{name:"class transformers.Pop2PianoProcessor",anchor:"transformers.Pop2PianoProcessor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/utils/dummy_essentia_and_librosa_and_pretty_midi_and_scipy_and_torch_objects.py#L19"}}),Qe=new B({props:{name:"__call__",anchor:"transformers.Pop2PianoProcessor.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}]}}),{c(){m=n("meta"),E=p(),v=n("h1"),M=n("a"),k=n("span"),h(w.$$.fragment),J=p(),C=n("span"),W=r("Pop2Piano"),te=p(),U=n("h2"),T=n("a"),R=n("span"),h(I.$$.fragment),V=p(),P=n("span"),Ye=r("Overview"),_e=p(),G=n("p"),Ae=r("The Pop2Piano model was proposed in "),ye=n("a"),Rt=r("Pop2Piano : Pop Audio-based Piano Cover Generation"),Vt=r(" by Jongho Choi and Kyogu Lee."),Yo=p(),De=n("p"),Nt=r(`Piano covers of pop music are widely enjoyed, but generating them from music is not a trivial task. It requires great
expertise with playing piano as well as knowing different characteristics and melodies of a song. With Pop2Piano you
can directly generate a cover from a song\u2019s audio waveform. It is the first model to directly generate a piano cover
from pop audio without melody and chord extraction modules.`),Ao=p(),ne=n("p"),qt=r("Pop2Piano is an encoder-decoder Transformer model based on "),be=n("a"),xt=r("T5"),Qt=r(`. The input audio
is transformed to its waveform and passed to the encoder, which transforms it to a latent representation. The decoder
uses these latent representations to generate token ids in an autoregressive way. Each token id corresponds to one of four
different token types: time, velocity, note and \u2018special\u2019. The token ids are then decoded to their equivalent MIDI file.`),Do=p(),Oe=n("p"),St=r("The abstract from the paper is the following:"),Oo=p(),Le=n("p"),vo=n("em"),Ht=r(`Piano covers of pop music are enjoyed by many people. However, the
task of automatically generating piano covers of pop music is still
understudied. This is partly due to the lack of synchronized
{Pop, Piano Cover} data pairs, which made it challenging to apply
the latest data-intensive deep learning-based methods. To leverage
the power of the data-driven approach, we make a large amount of
paired and synchronized {Pop, Piano Cover} data using an automated
pipeline. In this paper, we present Pop2Piano, a Transformer network
that generates piano covers given waveforms of pop music. To the best
of our knowledge, this is the first model to generate a piano cover
directly from pop audio without using melody and chord extraction
modules. We show that Pop2Piano, trained with our dataset, is capable
of producing plausible piano covers.`),Lo=p(),Ke=n("p"),Yt=r("Tips:"),Ko=p(),eo=n("ol"),wo=n("li"),At=r("To use Pop2Piano, you will need to install the \u{1F917} Transformers library, as well as the following third party modules:"),et=p(),h(ve.$$.fragment),ot=p(),ae=n("p"),Dt=r(`Please note that you may need to restart your runtime after installation.
2. Pop2Piano is an Encoder-Decoder based model like T5.
3. Pop2Piano can be used to generate midi-audio files for a given audio sequence.
4. Choosing different composers in `),Po=n("code"),Ot=r("Pop2PianoForConditionalGeneration.generate()"),Lt=r(` can lead to variety of different results.
5. Setting the sampling rate to 44.1 kHz when loading the audio file can give good performance.
6. Though Pop2Piano was mainly trained on Korean Pop music, it also does pretty well on other Western Pop or Hip Hop songs.`),tt=p(),z=n("p"),Kt=r("This model was contributed by "),we=n("a"),en=r("Susnato Dhar"),on=r(`.
The original code can be found `),Pe=n("a"),tn=r("here"),nn=r("."),nt=p(),N=n("h2"),se=n("a"),Mo=n("span"),h(Me.$$.fragment),an=p(),To=n("span"),sn=r("Examples"),at=p(),oo=n("ul"),jo=n("li"),rn=r("Example using HuggingFace Dataset:"),st=p(),h(Te.$$.fragment),rt=p(),to=n("ul"),Jo=n("li"),ln=r("Example using your own audio file:"),it=p(),h(je.$$.fragment),lt=p(),no=n("ul"),ko=n("li"),dn=r("Example of processing multiple audio files in batch:"),dt=p(),h(Je.$$.fragment),ct=p(),ao=n("ul"),q=n("li"),cn=r("Example of processing multiple audio files in batch (Using "),Uo=n("code"),pn=r("Pop2PianoFeatureExtractor"),un=r(" and "),Eo=n("code"),mn=r("Pop2PianoTokenizer"),hn=r("):"),pt=p(),h(ke.$$.fragment),ut=p(),x=n("h2"),re=n("a"),Co=n("span"),h(Ue.$$.fragment),fn=p(),Io=n("span"),gn=r("Pop2PianoConfig"),mt=p(),$=n("div"),h(Ee.$$.fragment),_n=p(),Q=n("p"),yn=r("This is the configuration class to store the configuration of a "),so=n("a"),bn=r("Pop2PianoForConditionalGeneration"),vn=r(`. It is used
to instantiate a Pop2PianoForConditionalGeneration model according to the specified arguments, defining the model
architecture. Instantiating a configuration with the defaults will yield a similar configuration to that of the
Pop2Piano `),Ce=n("a"),wn=r("sweetcocoa/pop2piano"),Pn=r(" architecture."),Mn=p(),S=n("p"),Tn=r("Configuration objects inherit from "),ro=n("a"),jn=r("PretrainedConfig"),Jn=r(` and can be used to control the model outputs. Read the
documentation from `),io=n("a"),kn=r("PretrainedConfig"),Un=r(" for more information."),ht=p(),H=n("h2"),ie=n("a"),Go=n("span"),h(Ie.$$.fragment),En=p(),$o=n("span"),Cn=r("Pop2PianoFeatureExtractor"),ft=p(),Y=n("div"),h(Ge.$$.fragment),In=p(),le=n("div"),h($e.$$.fragment),Gn=p(),zo=n("p"),$n=r("Call self as a function."),gt=p(),A=n("h2"),de=n("a"),Zo=n("span"),h(ze.$$.fragment),zn=p(),Fo=n("span"),Zn=r("Pop2PianoForConditionalGeneration"),_t=p(),j=n("div"),h(Ze.$$.fragment),Fn=p(),D=n("p"),Xn=r("Pop2Piano Model with a "),Xo=n("code"),Bn=r("language modeling"),Wn=r(` head on top.
This model inherits from `),lo=n("a"),Rn=r("PreTrainedModel"),Vn=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Nn=p(),Fe=n("p"),qn=r("This model is also a PyTorch "),Xe=n("a"),xn=r("torch.nn.Module"),Qn=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Sn=p(),Z=n("div"),h(Be.$$.fragment),Hn=p(),O=n("p"),Yn=r("The "),co=n("a"),An=r("Pop2PianoForConditionalGeneration"),Dn=r(" forward method, overrides the "),Bo=n("code"),On=r("__call__"),Ln=r(" special method."),Kn=p(),h(ce.$$.fragment),ea=p(),F=n("div"),h(We.$$.fragment),oa=p(),Wo=n("p"),ta=r("Generates token ids for midi outputs."),na=p(),h(pe.$$.fragment),yt=p(),L=n("h2"),ue=n("a"),Ro=n("span"),h(Re.$$.fragment),aa=p(),Vo=n("span"),sa=r("Pop2PianoTokenizer"),bt=p(),K=n("div"),h(Ve.$$.fragment),ra=p(),me=n("div"),h(Ne.$$.fragment),ia=p(),No=n("p"),la=r("Call self as a function."),vt=p(),ee=n("h2"),he=n("a"),qo=n("span"),h(qe.$$.fragment),da=p(),xo=n("span"),ca=r("Pop2PianoProcessor"),wt=p(),oe=n("div"),h(xe.$$.fragment),pa=p(),fe=n("div"),h(Qe.$$.fragment),ua=p(),Qo=n("p"),ma=r("Call self as a function."),this.h()},l(e){const l=ws('[data-svelte="svelte-1phssyn"]',document.head);m=a(l,"META",{name:!0,content:!0}),l.forEach(t),E=u(e),v=a(e,"H1",{class:!0});var Se=s(v);M=a(Se,"A",{id:!0,class:!0,href:!0});var So=s(M);k=a(So,"SPAN",{});var ha=s(k);f(w.$$.fragment,ha),ha.forEach(t),So.forEach(t),J=u(Se),C=a(Se,"SPAN",{});var fa=s(C);W=i(fa,"Pop2Piano"),fa.forEach(t),Se.forEach(t),te=u(e),U=a(e,"H2",{class:!0});var Mt=s(U);T=a(Mt,"A",{id:!0,class:!0,href:!0});var ga=s(T);R=a(ga,"SPAN",{});var _a=s(R);f(I.$$.fragment,_a),_a.forEach(t),ga.forEach(t),V=u(Mt),P=a(Mt,"SPAN",{});var ya=s(P);Ye=i(ya,"Overview"),ya.forEach(t),Mt.forEach(t),_e=u(e),G=a(e,"P",{});var Tt=s(G);Ae=i(Tt,"The Pop2Piano model was proposed in "),ye=a(Tt,"A",{href:!0,rel:!0});var ba=s(ye);Rt=i(ba,"Pop2Piano : Pop Audio-based Piano Cover Generation"),ba.forEach(t),Vt=i(Tt," by Jongho Choi and Kyogu Lee."),Tt.forEach(t),Yo=u(e),De=a(e,"P",{});var va=s(De);Nt=i(va,`Piano covers of pop music are widely enjoyed, but generating them from music is not a trivial task. It requires great
expertise with playing piano as well as knowing different characteristics and melodies of a song. With Pop2Piano you
can directly generate a cover from a song\u2019s audio waveform. It is the first model to directly generate a piano cover
from pop audio without melody and chord extraction modules.`),va.forEach(t),Ao=u(e),ne=a(e,"P",{});var jt=s(ne);qt=i(jt,"Pop2Piano is an encoder-decoder Transformer model based on "),be=a(jt,"A",{href:!0,rel:!0});var wa=s(be);xt=i(wa,"T5"),wa.forEach(t),Qt=i(jt,`. The input audio
is transformed to its waveform and passed to the encoder, which transforms it to a latent representation. The decoder
uses these latent representations to generate token ids in an autoregressive way. Each token id corresponds to one of four
different token types: time, velocity, note and \u2018special\u2019. The token ids are then decoded to their equivalent MIDI file.`),jt.forEach(t),Do=u(e),Oe=a(e,"P",{});var Pa=s(Oe);St=i(Pa,"The abstract from the paper is the following:"),Pa.forEach(t),Oo=u(e),Le=a(e,"P",{});var Ma=s(Le);vo=a(Ma,"EM",{});var Ta=s(vo);Ht=i(Ta,`Piano covers of pop music are enjoyed by many people. However, the
task of automatically generating piano covers of pop music is still
understudied. This is partly due to the lack of synchronized
{Pop, Piano Cover} data pairs, which made it challenging to apply
the latest data-intensive deep learning-based methods. To leverage
the power of the data-driven approach, we make a large amount of
paired and synchronized {Pop, Piano Cover} data using an automated
pipeline. In this paper, we present Pop2Piano, a Transformer network
that generates piano covers given waveforms of pop music. To the best
of our knowledge, this is the first model to generate a piano cover
directly from pop audio without using melody and chord extraction
modules. We show that Pop2Piano, trained with our dataset, is capable
of producing plausible piano covers.`),Ta.forEach(t),Ma.forEach(t),Lo=u(e),Ke=a(e,"P",{});var ja=s(Ke);Yt=i(ja,"Tips:"),ja.forEach(t),Ko=u(e),eo=a(e,"OL",{});var Ja=s(eo);wo=a(Ja,"LI",{});var ka=s(wo);At=i(ka,"To use Pop2Piano, you will need to install the \u{1F917} Transformers library, as well as the following third party modules:"),ka.forEach(t),Ja.forEach(t),et=u(e),f(ve.$$.fragment,e),ot=u(e),ae=a(e,"P",{});var Jt=s(ae);Dt=i(Jt,`Please note that you may need to restart your runtime after installation.
2. Pop2Piano is an Encoder-Decoder based model like T5.
3. Pop2Piano can be used to generate midi-audio files for a given audio sequence.
4. Choosing different composers in `),Po=a(Jt,"CODE",{});var Ua=s(Po);Ot=i(Ua,"Pop2PianoForConditionalGeneration.generate()"),Ua.forEach(t),Lt=i(Jt,` can lead to variety of different results.
5. Setting the sampling rate to 44.1 kHz when loading the audio file can give good performance.
6. Though Pop2Piano was mainly trained on Korean Pop music, it also does pretty well on other Western Pop or Hip Hop songs.`),Jt.forEach(t),tt=u(e),z=a(e,"P",{});var po=s(z);Kt=i(po,"This model was contributed by "),we=a(po,"A",{href:!0,rel:!0});var Ea=s(we);en=i(Ea,"Susnato Dhar"),Ea.forEach(t),on=i(po,`.
The original code can be found `),Pe=a(po,"A",{href:!0,rel:!0});var Ca=s(Pe);tn=i(Ca,"here"),Ca.forEach(t),nn=i(po,"."),po.forEach(t),nt=u(e),N=a(e,"H2",{class:!0});var kt=s(N);se=a(kt,"A",{id:!0,class:!0,href:!0});var Ia=s(se);Mo=a(Ia,"SPAN",{});var Ga=s(Mo);f(Me.$$.fragment,Ga),Ga.forEach(t),Ia.forEach(t),an=u(kt),To=a(kt,"SPAN",{});var $a=s(To);sn=i($a,"Examples"),$a.forEach(t),kt.forEach(t),at=u(e),oo=a(e,"UL",{});var za=s(oo);jo=a(za,"LI",{});var Za=s(jo);rn=i(Za,"Example using HuggingFace Dataset:"),Za.forEach(t),za.forEach(t),st=u(e),f(Te.$$.fragment,e),rt=u(e),to=a(e,"UL",{});var Fa=s(to);Jo=a(Fa,"LI",{});var Xa=s(Jo);ln=i(Xa,"Example using your own audio file:"),Xa.forEach(t),Fa.forEach(t),it=u(e),f(je.$$.fragment,e),lt=u(e),no=a(e,"UL",{});var Ba=s(no);ko=a(Ba,"LI",{});var Wa=s(ko);dn=i(Wa,"Example of processing multiple audio files in batch:"),Wa.forEach(t),Ba.forEach(t),dt=u(e),f(Je.$$.fragment,e),ct=u(e),ao=a(e,"UL",{});var Ra=s(ao);q=a(Ra,"LI",{});var uo=s(q);cn=i(uo,"Example of processing multiple audio files in batch (Using "),Uo=a(uo,"CODE",{});var Va=s(Uo);pn=i(Va,"Pop2PianoFeatureExtractor"),Va.forEach(t),un=i(uo," and "),Eo=a(uo,"CODE",{});var Na=s(Eo);mn=i(Na,"Pop2PianoTokenizer"),Na.forEach(t),hn=i(uo,"):"),uo.forEach(t),Ra.forEach(t),pt=u(e),f(ke.$$.fragment,e),ut=u(e),x=a(e,"H2",{class:!0});var Ut=s(x);re=a(Ut,"A",{id:!0,class:!0,href:!0});var qa=s(re);Co=a(qa,"SPAN",{});var xa=s(Co);f(Ue.$$.fragment,xa),xa.forEach(t),qa.forEach(t),fn=u(Ut),Io=a(Ut,"SPAN",{});var Qa=s(Io);gn=i(Qa,"Pop2PianoConfig"),Qa.forEach(t),Ut.forEach(t),mt=u(e),$=a(e,"DIV",{class:!0});var mo=s($);f(Ee.$$.fragment,mo),_n=u(mo),Q=a(mo,"P",{});var ho=s(Q);yn=i(ho,"This is the configuration class to store the configuration of a "),so=a(ho,"A",{href:!0});var Sa=s(so);bn=i(Sa,"Pop2PianoForConditionalGeneration"),Sa.forEach(t),vn=i(ho,`. It is used
to instantiate a Pop2PianoForConditionalGeneration model according to the specified arguments, defining the model
architecture. Instantiating a configuration with the defaults will yield a similar configuration to that of the
Pop2Piano `),Ce=a(ho,"A",{href:!0,rel:!0});var Ha=s(Ce);wn=i(Ha,"sweetcocoa/pop2piano"),Ha.forEach(t),Pn=i(ho," architecture."),ho.forEach(t),Mn=u(mo),S=a(mo,"P",{});var fo=s(S);Tn=i(fo,"Configuration objects inherit from "),ro=a(fo,"A",{href:!0});var Ya=s(ro);jn=i(Ya,"PretrainedConfig"),Ya.forEach(t),Jn=i(fo,` and can be used to control the model outputs. Read the
documentation from `),io=a(fo,"A",{href:!0});var Aa=s(io);kn=i(Aa,"PretrainedConfig"),Aa.forEach(t),Un=i(fo," for more information."),fo.forEach(t),mo.forEach(t),ht=u(e),H=a(e,"H2",{class:!0});var Et=s(H);ie=a(Et,"A",{id:!0,class:!0,href:!0});var Da=s(ie);Go=a(Da,"SPAN",{});var Oa=s(Go);f(Ie.$$.fragment,Oa),Oa.forEach(t),Da.forEach(t),En=u(Et),$o=a(Et,"SPAN",{});var La=s($o);Cn=i(La,"Pop2PianoFeatureExtractor"),La.forEach(t),Et.forEach(t),ft=u(e),Y=a(e,"DIV",{class:!0});var Ct=s(Y);f(Ge.$$.fragment,Ct),In=u(Ct),le=a(Ct,"DIV",{class:!0});var It=s(le);f($e.$$.fragment,It),Gn=u(It),zo=a(It,"P",{});var Ka=s(zo);$n=i(Ka,"Call self as a function."),Ka.forEach(t),It.forEach(t),Ct.forEach(t),gt=u(e),A=a(e,"H2",{class:!0});var Gt=s(A);de=a(Gt,"A",{id:!0,class:!0,href:!0});var es=s(de);Zo=a(es,"SPAN",{});var os=s(Zo);f(ze.$$.fragment,os),os.forEach(t),es.forEach(t),zn=u(Gt),Fo=a(Gt,"SPAN",{});var ts=s(Fo);Zn=i(ts,"Pop2PianoForConditionalGeneration"),ts.forEach(t),Gt.forEach(t),_t=u(e),j=a(e,"DIV",{class:!0});var X=s(j);f(Ze.$$.fragment,X),Fn=u(X),D=a(X,"P",{});var go=s(D);Xn=i(go,"Pop2Piano Model with a "),Xo=a(go,"CODE",{});var ns=s(Xo);Bn=i(ns,"language modeling"),ns.forEach(t),Wn=i(go,` head on top.
This model inherits from `),lo=a(go,"A",{href:!0});var as=s(lo);Rn=i(as,"PreTrainedModel"),as.forEach(t),Vn=i(go,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),go.forEach(t),Nn=u(X),Fe=a(X,"P",{});var $t=s(Fe);qn=i($t,"This model is also a PyTorch "),Xe=a($t,"A",{href:!0,rel:!0});var ss=s(Xe);xn=i(ss,"torch.nn.Module"),ss.forEach(t),Qn=i($t,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),$t.forEach(t),Sn=u(X),Z=a(X,"DIV",{class:!0});var _o=s(Z);f(Be.$$.fragment,_o),Hn=u(_o),O=a(_o,"P",{});var yo=s(O);Yn=i(yo,"The "),co=a(yo,"A",{href:!0});var rs=s(co);An=i(rs,"Pop2PianoForConditionalGeneration"),rs.forEach(t),Dn=i(yo," forward method, overrides the "),Bo=a(yo,"CODE",{});var is=s(Bo);On=i(is,"__call__"),is.forEach(t),Ln=i(yo," special method."),yo.forEach(t),Kn=u(_o),f(ce.$$.fragment,_o),_o.forEach(t),ea=u(X),F=a(X,"DIV",{class:!0});var bo=s(F);f(We.$$.fragment,bo),oa=u(bo),Wo=a(bo,"P",{});var ls=s(Wo);ta=i(ls,"Generates token ids for midi outputs."),ls.forEach(t),na=u(bo),f(pe.$$.fragment,bo),bo.forEach(t),X.forEach(t),yt=u(e),L=a(e,"H2",{class:!0});var zt=s(L);ue=a(zt,"A",{id:!0,class:!0,href:!0});var ds=s(ue);Ro=a(ds,"SPAN",{});var cs=s(Ro);f(Re.$$.fragment,cs),cs.forEach(t),ds.forEach(t),aa=u(zt),Vo=a(zt,"SPAN",{});var ps=s(Vo);sa=i(ps,"Pop2PianoTokenizer"),ps.forEach(t),zt.forEach(t),bt=u(e),K=a(e,"DIV",{class:!0});var Zt=s(K);f(Ve.$$.fragment,Zt),ra=u(Zt),me=a(Zt,"DIV",{class:!0});var Ft=s(me);f(Ne.$$.fragment,Ft),ia=u(Ft),No=a(Ft,"P",{});var us=s(No);la=i(us,"Call self as a function."),us.forEach(t),Ft.forEach(t),Zt.forEach(t),vt=u(e),ee=a(e,"H2",{class:!0});var Xt=s(ee);he=a(Xt,"A",{id:!0,class:!0,href:!0});var ms=s(he);qo=a(ms,"SPAN",{});var hs=s(qo);f(qe.$$.fragment,hs),hs.forEach(t),ms.forEach(t),da=u(Xt),xo=a(Xt,"SPAN",{});var fs=s(xo);ca=i(fs,"Pop2PianoProcessor"),fs.forEach(t),Xt.forEach(t),wt=u(e),oe=a(e,"DIV",{class:!0});var Bt=s(oe);f(xe.$$.fragment,Bt),pa=u(Bt),fe=a(Bt,"DIV",{class:!0});var Wt=s(fe);f(Qe.$$.fragment,Wt),ua=u(Wt),Qo=a(Wt,"P",{});var gs=s(Qo);ma=i(gs,"Call self as a function."),gs.forEach(t),Wt.forEach(t),Bt.forEach(t),this.h()},h(){d(m,"name","hf:doc:metadata"),d(m,"content",JSON.stringify(Js)),d(M,"id","pop2piano"),d(M,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(M,"href","#pop2piano"),d(v,"class","relative group"),d(T,"id","overview"),d(T,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(T,"href","#overview"),d(U,"class","relative group"),d(ye,"href","https://arxiv.org/abs/2211.00895"),d(ye,"rel","nofollow"),d(be,"href","https://arxiv.org/pdf/1910.10683.pdf"),d(be,"rel","nofollow"),d(we,"href","https://huggingface.co/susnato"),d(we,"rel","nofollow"),d(Pe,"href","https://github.com/sweetcocoa/pop2piano"),d(Pe,"rel","nofollow"),d(se,"id","examples"),d(se,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(se,"href","#examples"),d(N,"class","relative group"),d(re,"id","transformers.Pop2PianoConfig"),d(re,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(re,"href","#transformers.Pop2PianoConfig"),d(x,"class","relative group"),d(so,"href","/docs/transformers/main/en/model_doc/pop2piano#transformers.Pop2PianoForConditionalGeneration"),d(Ce,"href","https://huggingface.co/sweetcocoa/pop2piano"),d(Ce,"rel","nofollow"),d(ro,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d(io,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ie,"id","transformers.Pop2PianoFeatureExtractor"),d(ie,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(ie,"href","#transformers.Pop2PianoFeatureExtractor"),d(H,"class","relative group"),d(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(de,"id","transformers.Pop2PianoForConditionalGeneration"),d(de,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(de,"href","#transformers.Pop2PianoForConditionalGeneration"),d(A,"class","relative group"),d(lo,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),d(Xe,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Xe,"rel","nofollow"),d(co,"href","/docs/transformers/main/en/model_doc/pop2piano#transformers.Pop2PianoForConditionalGeneration"),d(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ue,"id","transformers.Pop2PianoTokenizer"),d(ue,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(ue,"href","#transformers.Pop2PianoTokenizer"),d(L,"class","relative group"),d(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(he,"id","transformers.Pop2PianoProcessor"),d(he,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(he,"href","#transformers.Pop2PianoProcessor"),d(ee,"class","relative group"),d(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,l){o(document.head,m),c(e,E,l),c(e,v,l),o(v,M),o(M,k),g(w,k,null),o(v,J),o(v,C),o(C,W),c(e,te,l),c(e,U,l),o(U,T),o(T,R),g(I,R,null),o(U,V),o(U,P),o(P,Ye),c(e,_e,l),c(e,G,l),o(G,Ae),o(G,ye),o(ye,Rt),o(G,Vt),c(e,Yo,l),c(e,De,l),o(De,Nt),c(e,Ao,l),c(e,ne,l),o(ne,qt),o(ne,be),o(be,xt),o(ne,Qt),c(e,Do,l),c(e,Oe,l),o(Oe,St),c(e,Oo,l),c(e,Le,l),o(Le,vo),o(vo,Ht),c(e,Lo,l),c(e,Ke,l),o(Ke,Yt),c(e,Ko,l),c(e,eo,l),o(eo,wo),o(wo,At),c(e,et,l),g(ve,e,l),c(e,ot,l),c(e,ae,l),o(ae,Dt),o(ae,Po),o(Po,Ot),o(ae,Lt),c(e,tt,l),c(e,z,l),o(z,Kt),o(z,we),o(we,en),o(z,on),o(z,Pe),o(Pe,tn),o(z,nn),c(e,nt,l),c(e,N,l),o(N,se),o(se,Mo),g(Me,Mo,null),o(N,an),o(N,To),o(To,sn),c(e,at,l),c(e,oo,l),o(oo,jo),o(jo,rn),c(e,st,l),g(Te,e,l),c(e,rt,l),c(e,to,l),o(to,Jo),o(Jo,ln),c(e,it,l),g(je,e,l),c(e,lt,l),c(e,no,l),o(no,ko),o(ko,dn),c(e,dt,l),g(Je,e,l),c(e,ct,l),c(e,ao,l),o(ao,q),o(q,cn),o(q,Uo),o(Uo,pn),o(q,un),o(q,Eo),o(Eo,mn),o(q,hn),c(e,pt,l),g(ke,e,l),c(e,ut,l),c(e,x,l),o(x,re),o(re,Co),g(Ue,Co,null),o(x,fn),o(x,Io),o(Io,gn),c(e,mt,l),c(e,$,l),g(Ee,$,null),o($,_n),o($,Q),o(Q,yn),o(Q,so),o(so,bn),o(Q,vn),o(Q,Ce),o(Ce,wn),o(Q,Pn),o($,Mn),o($,S),o(S,Tn),o(S,ro),o(ro,jn),o(S,Jn),o(S,io),o(io,kn),o(S,Un),c(e,ht,l),c(e,H,l),o(H,ie),o(ie,Go),g(Ie,Go,null),o(H,En),o(H,$o),o($o,Cn),c(e,ft,l),c(e,Y,l),g(Ge,Y,null),o(Y,In),o(Y,le),g($e,le,null),o(le,Gn),o(le,zo),o(zo,$n),c(e,gt,l),c(e,A,l),o(A,de),o(de,Zo),g(ze,Zo,null),o(A,zn),o(A,Fo),o(Fo,Zn),c(e,_t,l),c(e,j,l),g(Ze,j,null),o(j,Fn),o(j,D),o(D,Xn),o(D,Xo),o(Xo,Bn),o(D,Wn),o(D,lo),o(lo,Rn),o(D,Vn),o(j,Nn),o(j,Fe),o(Fe,qn),o(Fe,Xe),o(Xe,xn),o(Fe,Qn),o(j,Sn),o(j,Z),g(Be,Z,null),o(Z,Hn),o(Z,O),o(O,Yn),o(O,co),o(co,An),o(O,Dn),o(O,Bo),o(Bo,On),o(O,Ln),o(Z,Kn),g(ce,Z,null),o(j,ea),o(j,F),g(We,F,null),o(F,oa),o(F,Wo),o(Wo,ta),o(F,na),g(pe,F,null),c(e,yt,l),c(e,L,l),o(L,ue),o(ue,Ro),g(Re,Ro,null),o(L,aa),o(L,Vo),o(Vo,sa),c(e,bt,l),c(e,K,l),g(Ve,K,null),o(K,ra),o(K,me),g(Ne,me,null),o(me,ia),o(me,No),o(No,la),c(e,vt,l),c(e,ee,l),o(ee,he),o(he,qo),g(qe,qo,null),o(ee,da),o(ee,xo),o(xo,ca),c(e,wt,l),c(e,oe,l),g(xe,oe,null),o(oe,pa),o(oe,fe),g(Qe,fe,null),o(fe,ua),o(fe,Qo),o(Qo,ma),Pt=!0},p(e,[l]){const Se={};l&2&&(Se.$$scope={dirty:l,ctx:e}),ce.$set(Se);const So={};l&2&&(So.$$scope={dirty:l,ctx:e}),pe.$set(So)},i(e){Pt||(_(w.$$.fragment,e),_(I.$$.fragment,e),_(ve.$$.fragment,e),_(Me.$$.fragment,e),_(Te.$$.fragment,e),_(je.$$.fragment,e),_(Je.$$.fragment,e),_(ke.$$.fragment,e),_(Ue.$$.fragment,e),_(Ee.$$.fragment,e),_(Ie.$$.fragment,e),_(Ge.$$.fragment,e),_($e.$$.fragment,e),_(ze.$$.fragment,e),_(Ze.$$.fragment,e),_(Be.$$.fragment,e),_(ce.$$.fragment,e),_(We.$$.fragment,e),_(pe.$$.fragment,e),_(Re.$$.fragment,e),_(Ve.$$.fragment,e),_(Ne.$$.fragment,e),_(qe.$$.fragment,e),_(xe.$$.fragment,e),_(Qe.$$.fragment,e),Pt=!0)},o(e){y(w.$$.fragment,e),y(I.$$.fragment,e),y(ve.$$.fragment,e),y(Me.$$.fragment,e),y(Te.$$.fragment,e),y(je.$$.fragment,e),y(Je.$$.fragment,e),y(ke.$$.fragment,e),y(Ue.$$.fragment,e),y(Ee.$$.fragment,e),y(Ie.$$.fragment,e),y(Ge.$$.fragment,e),y($e.$$.fragment,e),y(ze.$$.fragment,e),y(Ze.$$.fragment,e),y(Be.$$.fragment,e),y(ce.$$.fragment,e),y(We.$$.fragment,e),y(pe.$$.fragment,e),y(Re.$$.fragment,e),y(Ve.$$.fragment,e),y(Ne.$$.fragment,e),y(qe.$$.fragment,e),y(xe.$$.fragment,e),y(Qe.$$.fragment,e),Pt=!1},d(e){t(m),e&&t(E),e&&t(v),b(w),e&&t(te),e&&t(U),b(I),e&&t(_e),e&&t(G),e&&t(Yo),e&&t(De),e&&t(Ao),e&&t(ne),e&&t(Do),e&&t(Oe),e&&t(Oo),e&&t(Le),e&&t(Lo),e&&t(Ke),e&&t(Ko),e&&t(eo),e&&t(et),b(ve,e),e&&t(ot),e&&t(ae),e&&t(tt),e&&t(z),e&&t(nt),e&&t(N),b(Me),e&&t(at),e&&t(oo),e&&t(st),b(Te,e),e&&t(rt),e&&t(to),e&&t(it),b(je,e),e&&t(lt),e&&t(no),e&&t(dt),b(Je,e),e&&t(ct),e&&t(ao),e&&t(pt),b(ke,e),e&&t(ut),e&&t(x),b(Ue),e&&t(mt),e&&t($),b(Ee),e&&t(ht),e&&t(H),b(Ie),e&&t(ft),e&&t(Y),b(Ge),b($e),e&&t(gt),e&&t(A),b(ze),e&&t(_t),e&&t(j),b(Ze),b(Be),b(ce),b(We),b(pe),e&&t(yt),e&&t(L),b(Re),e&&t(bt),e&&t(K),b(Ve),b(Ne),e&&t(vt),e&&t(ee),b(qe),e&&t(wt),e&&t(oe),b(xe),b(Qe)}}}const Js={local:"pop2piano",sections:[{local:"overview",title:"Overview"},{local:"examples",title:"Examples"},{local:"transformers.Pop2PianoConfig",title:"Pop2PianoConfig"},{local:"transformers.Pop2PianoFeatureExtractor",title:"Pop2PianoFeatureExtractor"},{local:"transformers.Pop2PianoForConditionalGeneration",title:"Pop2PianoForConditionalGeneration"},{local:"transformers.Pop2PianoTokenizer",title:"Pop2PianoTokenizer"},{local:"transformers.Pop2PianoProcessor",title:"Pop2PianoProcessor"}],title:"Pop2Piano"};function ks(He){return Ps(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class $s extends ys{constructor(m){super();bs(this,m,ks,js,vs,{})}}export{$s as default,Js as metadata};
