import{s as kr,o as yr,n as Kt}from"../chunks/scheduler.9bc65507.js";import{S as wr,i as Jr,g as n,s as r,u as g,A as $r,h as s,f as o,c as a,j as u,v as b,y as p,k as m,o as t,a as c,w as _,d as v,t as x,x as k}from"../chunks/index.78c82d43.js";import{T as Mr}from"../chunks/Tip.87d55b76.js";import{D as T}from"../chunks/Docstring.f3d04bd2.js";import{C as ho}from"../chunks/CodeBlock.48618ec2.js";import{I as B}from"../chunks/IconCopyLink.bedaa44d.js";import{E as uo}from"../chunks/ExampleCodeBlock.872b014d.js";function Cr(E){let d,J="Example:",h,f,y;return f=new ho({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEp1a2Vib3hNb2RlbCUyQyUyMEp1a2Vib3hDb25maWclMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwSnVrZWJveCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwSnVrZWJveENvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwZnJvbSUyMHRoZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMEp1a2Vib3hNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> JukeboxModel, JukeboxConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Jukebox configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = JukeboxConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = JukeboxModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){d=n("p"),d.textContent=J,h=r(),g(f.$$.fragment)},l(i){d=s(i,"P",{"data-svelte-h":!0}),p(d)!=="svelte-11lpom8"&&(d.textContent=J),h=a(i),b(f.$$.fragment,i)},m(i,C){c(i,d,C),c(i,h,C),_(f,i,C),y=!0},p:Kt,i(i){y||(v(f.$$.fragment,i),y=!0)},o(i){x(f.$$.fragment,i),y=!1},d(i){i&&(o(d),o(h)),k(f,i)}}}function jr(E){let d,J;return d=new ho({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEp1a2Vib3hUb2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBKdWtlYm94VG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZqdWtlYm94LTFiLWx5cmljcyUyMiklMEF0b2tlbml6ZXIoJTIyQWxhbiUyMEphY2tzb24lMjIlMkMlMjAlMjJDb3VudHJ5JTIwUm9jayUyMiUyQyUyMCUyMm9sZCUyMHRvd24lMjByb2FkJTIyKSU1QiUyMmlucHV0X2lkcyUyMiU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> JukeboxTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = JukeboxTokenizer.from_pretrained(<span class="hljs-string">&quot;openai/jukebox-1b-lyrics&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer(<span class="hljs-string">&quot;Alan Jackson&quot;</span>, <span class="hljs-string">&quot;Country Rock&quot;</span>, <span class="hljs-string">&quot;old town road&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
[tensor([[   <span class="hljs-number">0</span>,    <span class="hljs-number">0</span>,    <span class="hljs-number">0</span>, <span class="hljs-number">6785</span>,  <span class="hljs-number">546</span>,   <span class="hljs-number">41</span>,   <span class="hljs-number">38</span>,   <span class="hljs-number">30</span>,   <span class="hljs-number">76</span>,   <span class="hljs-number">46</span>,   <span class="hljs-number">41</span>,   <span class="hljs-number">49</span>,
           <span class="hljs-number">40</span>,   <span class="hljs-number">76</span>,   <span class="hljs-number">44</span>,   <span class="hljs-number">41</span>,   <span class="hljs-number">27</span>,   <span class="hljs-number">30</span>]]), tensor([[  <span class="hljs-number">0</span>,   <span class="hljs-number">0</span>,   <span class="hljs-number">0</span>, <span class="hljs-number">145</span>,   <span class="hljs-number">0</span>]]), tensor([[  <span class="hljs-number">0</span>,   <span class="hljs-number">0</span>,   <span class="hljs-number">0</span>, <span class="hljs-number">145</span>,   <span class="hljs-number">0</span>]])]`}}),{c(){g(d.$$.fragment)},l(h){b(d.$$.fragment,h)},m(h,f){_(d,h,f),J=!0},p:Kt,i(h){J||(v(d.$$.fragment,h),J=!0)},o(h){x(d.$$.fragment,h),J=!1},d(h){k(d,h)}}}function Tr(E){let d,J="If nothing is provided, the genres and the artist will either be selected randomly or set to None";return{c(){d=n("p"),d.textContent=J},l(h){d=s(h,"P",{"data-svelte-h":!0}),p(d)!=="svelte-jodoey"&&(d.textContent=J)},m(h,f){c(h,d,f)},p:Kt,d(h){h&&o(d)}}}function Vr(E){let d,J="Example:",h,f,y;return f=new ho({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBKdWtlYm94TW9kZWwlMkMlMjBzZXRfc2VlZCUwQSUwQW1vZGVsJTIwJTNEJTIwSnVrZWJveE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZqdWtlYm94LTFiLWx5cmljcyUyMiUyQyUyMG1pbl9kdXJhdGlvbiUzRDApLmV2YWwoKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5haSUyRmp1a2Vib3gtMWItbHlyaWNzJTIyKSUwQSUwQWx5cmljcyUyMCUzRCUyMCUyMkhleSUyQyUyMGFyZSUyMHlvdSUyMGF3YWtlJTNGJTIwQ2FuJTIweW91JTIwdGFsayUyMHRvJTIwbWUlM0YlMjIlMEFhcnRpc3QlMjAlM0QlMjAlMjJaYWMlMjBCcm93biUyMEJhbmQlMjIlMEFnZW5yZSUyMCUzRCUyMCUyMkNvdW50cnklMjIlMEFtZXRhcyUyMCUzRCUyMHRva2VuaXplcihhcnRpc3QlM0RhcnRpc3QlMkMlMjBnZW5yZXMlM0RnZW5yZSUyQyUyMGx5cmljcyUzRGx5cmljcyklMEFzZXRfc2VlZCgwKSUwQW11c2ljX3Rva2VucyUyMCUzRCUyMG1vZGVsLmFuY2VzdHJhbF9zYW1wbGUobWV0YXMuaW5wdXRfaWRzJTJDJTIwc2FtcGxlX2xlbmd0aCUzRDQwMCklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbW9kZWwuZGVjb2RlKG11c2ljX3Rva2VucyklNUIlM0ElMkMlMjAlM0ExMCU1RC5zcXVlZXplKC0xKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, JukeboxModel, set_seed

<span class="hljs-meta">&gt;&gt;&gt; </span>model = JukeboxModel.from_pretrained(<span class="hljs-string">&quot;openai/jukebox-1b-lyrics&quot;</span>, min_duration=<span class="hljs-number">0</span>).<span class="hljs-built_in">eval</span>()
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;openai/jukebox-1b-lyrics&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>lyrics = <span class="hljs-string">&quot;Hey, are you awake? Can you talk to me?&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>artist = <span class="hljs-string">&quot;Zac Brown Band&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>genre = <span class="hljs-string">&quot;Country&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>metas = tokenizer(artist=artist, genres=genre, lyrics=lyrics)
<span class="hljs-meta">&gt;&gt;&gt; </span>set_seed(<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>music_tokens = model.ancestral_sample(metas.input_ids, sample_length=<span class="hljs-number">400</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    model.decode(music_tokens)[:, :<span class="hljs-number">10</span>].squeeze(-<span class="hljs-number">1</span>)
tensor([[-<span class="hljs-number">0.0219</span>, -<span class="hljs-number">0.0679</span>, -<span class="hljs-number">0.1050</span>, -<span class="hljs-number">0.1203</span>, -<span class="hljs-number">0.1271</span>, -<span class="hljs-number">0.0936</span>, -<span class="hljs-number">0.0396</span>, -<span class="hljs-number">0.0405</span>,
    -<span class="hljs-number">0.0818</span>, -<span class="hljs-number">0.0697</span>]])`}}),{c(){d=n("p"),d.textContent=J,h=r(),g(f.$$.fragment)},l(i){d=s(i,"P",{"data-svelte-h":!0}),p(d)!=="svelte-11lpom8"&&(d.textContent=J),h=a(i),b(f.$$.fragment,i)},m(i,C){c(i,d,C),c(i,h,C),_(f,i,C),y=!0},p:Kt,i(i){y||(v(f.$$.fragment,i),y=!0)},o(i){x(f.$$.fragment,i),y=!1},d(i){i&&(o(d),o(h)),k(f,i)}}}function Pr(E){let d,J="Example:",h,f,y;return f=new ho({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBKdWtlYm94TW9kZWwlMkMlMjBzZXRfc2VlZCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBbWV0YXMlMjAlM0QlMjBkaWN0KGFydGlzdCUzRCUyMlphYyUyMEJyb3duJTIwQmFuZCUyMiUyQyUyMGdlbnJlcyUzRCUyMkNvdW50cnklMjIlMkMlMjBseXJpY3MlM0QlMjJJJTIwbWV0JTIwYSUyMHRyYXZlbGxlciUyMGZyb20lMjBhbiUyMGFudGlxdWUlMjBsYW5kJTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5haSUyRmp1a2Vib3gtMWItbHlyaWNzJTIyKSUwQW1vZGVsJTIwJTNEJTIwSnVrZWJveE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZqdWtlYm94LTFiLWx5cmljcyUyMiUyQyUyMG1pbl9kdXJhdGlvbiUzRDApLmV2YWwoKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRva2VuaXplcigqKm1ldGFzKSU1QiUyMmlucHV0X2lkcyUyMiU1RCUwQXNldF9zZWVkKDApJTBBenMlMjAlM0QlMjAlNUJ0b3JjaC56ZXJvcygxJTJDJTIwMCUyQyUyMGR0eXBlJTNEdG9yY2gubG9uZyklMjBmb3IlMjBfJTIwaW4lMjByYW5nZSgzKSU1RCUwQXpzJTIwJTNEJTIwbW9kZWwuX3NhbXBsZSh6cyUyQyUyMGxhYmVscyUyQyUyMCU1QjAlNUQlMkMlMjBzYW1wbGVfbGVuZ3RoJTNENDAlMjAqJTIwbW9kZWwucHJpb3JzJTVCMCU1RC5yYXdfdG9fdG9rZW5zJTJDJTIwc2F2ZV9yZXN1bHRzJTNERmFsc2UpJTBBenMlNUIwJTVE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, JukeboxModel, set_seed
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>metas = <span class="hljs-built_in">dict</span>(artist=<span class="hljs-string">&quot;Zac Brown Band&quot;</span>, genres=<span class="hljs-string">&quot;Country&quot;</span>, lyrics=<span class="hljs-string">&quot;I met a traveller from an antique land&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;openai/jukebox-1b-lyrics&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = JukeboxModel.from_pretrained(<span class="hljs-string">&quot;openai/jukebox-1b-lyrics&quot;</span>, min_duration=<span class="hljs-number">0</span>).<span class="hljs-built_in">eval</span>()

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tokenizer(**metas)[<span class="hljs-string">&quot;input_ids&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>set_seed(<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>zs = [torch.zeros(<span class="hljs-number">1</span>, <span class="hljs-number">0</span>, dtype=torch.long) <span class="hljs-keyword">for</span> _ <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(<span class="hljs-number">3</span>)]
<span class="hljs-meta">&gt;&gt;&gt; </span>zs = model._sample(zs, labels, [<span class="hljs-number">0</span>], sample_length=<span class="hljs-number">40</span> * model.priors[<span class="hljs-number">0</span>].raw_to_tokens, save_results=<span class="hljs-literal">False</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>zs[<span class="hljs-number">0</span>]
tensor([[<span class="hljs-number">1853</span>, <span class="hljs-number">1369</span>, <span class="hljs-number">1150</span>, <span class="hljs-number">1869</span>, <span class="hljs-number">1379</span>, <span class="hljs-number">1789</span>,  <span class="hljs-number">519</span>,  <span class="hljs-number">710</span>, <span class="hljs-number">1306</span>, <span class="hljs-number">1100</span>, <span class="hljs-number">1229</span>,  <span class="hljs-number">519</span>,
      <span class="hljs-number">353</span>, <span class="hljs-number">1306</span>, <span class="hljs-number">1379</span>, <span class="hljs-number">1053</span>,  <span class="hljs-number">519</span>,  <span class="hljs-number">653</span>, <span class="hljs-number">1631</span>, <span class="hljs-number">1467</span>, <span class="hljs-number">1229</span>, <span class="hljs-number">1229</span>,   <span class="hljs-number">10</span>, <span class="hljs-number">1647</span>,
     <span class="hljs-number">1254</span>, <span class="hljs-number">1229</span>, <span class="hljs-number">1306</span>, <span class="hljs-number">1528</span>, <span class="hljs-number">1789</span>,  <span class="hljs-number">216</span>, <span class="hljs-number">1631</span>, <span class="hljs-number">1434</span>,  <span class="hljs-number">653</span>,  <span class="hljs-number">475</span>, <span class="hljs-number">1150</span>, <span class="hljs-number">1528</span>,
     <span class="hljs-number">1804</span>,  <span class="hljs-number">541</span>, <span class="hljs-number">1804</span>, <span class="hljs-number">1434</span>]])`}}),{c(){d=n("p"),d.textContent=J,h=r(),g(f.$$.fragment)},l(i){d=s(i,"P",{"data-svelte-h":!0}),p(d)!=="svelte-11lpom8"&&(d.textContent=J),h=a(i),b(f.$$.fragment,i)},m(i,C){c(i,d,C),c(i,h,C),_(f,i,C),y=!0},p:Kt,i(i){y||(v(f.$$.fragment,i),y=!0)},o(i){x(f.$$.fragment,i),y=!1},d(i){i&&(o(d),o(h)),k(f,i)}}}function Er(E){let d,J="Example:",h,f,y;return f=new ho({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEp1a2Vib3hWUVZBRSUyQyUyMHNldF9zZWVkJTBBaW1wb3J0JTIwdG9yY2glMEElMEFtb2RlbCUyMCUzRCUyMEp1a2Vib3hWUVZBRS5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmFpJTJGanVrZWJveC0xYi1seXJpY3MlMjIpLmV2YWwoKSUwQXNldF9zZWVkKDApJTBBenMlMjAlM0QlMjAlNUJ0b3JjaC5yYW5kaW50KDEwMCUyQyUyMCg0JTJDJTIwMSkpJTVEJTBBbW9kZWwuZGVjb2RlKHpzKS5zaGFwZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> JukeboxVQVAE, set_seed
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>model = JukeboxVQVAE.from_pretrained(<span class="hljs-string">&quot;openai/jukebox-1b-lyrics&quot;</span>).<span class="hljs-built_in">eval</span>()
<span class="hljs-meta">&gt;&gt;&gt; </span>set_seed(<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>zs = [torch.randint(<span class="hljs-number">100</span>, (<span class="hljs-number">4</span>, <span class="hljs-number">1</span>))]
<span class="hljs-meta">&gt;&gt;&gt; </span>model.decode(zs).shape
torch.Size([<span class="hljs-number">4</span>, <span class="hljs-number">8</span>, <span class="hljs-number">1</span>])`}}),{c(){d=n("p"),d.textContent=J,h=r(),g(f.$$.fragment)},l(i){d=s(i,"P",{"data-svelte-h":!0}),p(d)!=="svelte-11lpom8"&&(d.textContent=J),h=a(i),b(f.$$.fragment,i)},m(i,C){c(i,d,C),c(i,h,C),_(f,i,C),y=!0},p:Kt,i(i){y||(v(f.$$.fragment,i),y=!0)},o(i){x(f.$$.fragment,i),y=!1},d(i){i&&(o(d),o(h)),k(f,i)}}}function Ar(E){let d,J,h,f,y,i,C,ke,on,rt,ds="Jukebox",fo,q,X,Ot,ye,nn,at,ms="Overview",go,we,ps=`The Jukebox model was proposed in <a href="https://arxiv.org/pdf/2005.00341.pdf" rel="nofollow">Jukebox: A generative model for music</a>
by Prafulla Dhariwal, Heewoo Jun, Christine Payne, Jong Wook Kim, Alec Radford,
Ilya Sutskever. It introduces a generative music model which can produce minute long samples that can be conditioned on
an artist, genres and lyrics.`,bo,Je,us="The abstract from the paper is the following:",_o,$e,hs="<em>We introduce Jukebox, a model that generates music with singing in the raw audio domain. We tackle the long context of raw audio using a multiscale VQ-VAE to compress it to discrete codes, and modeling those using autoregressive Transformers. We show that the combined model at scale can generate high-fidelity and diverse songs with coherence up to multiple minutes. We can condition on artist and genre to steer the musical and vocal style, and on unaligned lyrics to make the singing more controllable. We are releasing thousands of non cherry-picked samples, along with model weights and code.</em>",vo,Me,fs=`As shown on the following figure, Jukebox is made of 3 <code>priors</code> which are decoder only models. They follow the architecture described in <a href="https://arxiv.org/abs/1904.10509" rel="nofollow">Generating Long Sequences with Sparse Transformers</a>, modified to support longer context length.
First, a autoencoder is used to encode the text lyrics. Next, the first (also called <code>top_prior</code>) prior attends to the last hidden states extracted from the lyrics encoder. The priors are linked to the previous priors respectively via an <code>AudioConditionner</code> module. The<code>AudioConditioner</code> upsamples the outputs of the previous prior to raw tokens at a certain audio frame per second resolution.
The metadata such as <em>artist, genre and timing</em> are passed to each prior, in the form of a start token and positionnal embedding for the timing data.  The hidden states are mapped to the closest codebook vector from the VQVAE in order to convert them to raw audio.`,xo,Ce,gs='<img src="https://gist.githubusercontent.com/ArthurZucker/92c1acaae62ebf1b6a951710bdd8b6af/raw/c9c517bf4eff61393f6c7dec9366ef02bdd059a3/jukebox.svg" alt="JukeboxModel"/>',ko,je,bs="Tips:",yo,Te,_s="<li>This model only supports inference. This is for a few reasons, mostly because it requires a crazy amount of memory to train. Feel free to open a PR and add what’s missing to have a full integration with the hugging face traineer!</li> <li>This model is very slow, and takes 8h to generate a minute long audio using the 5b top prior on a V100 GPU. In order automaticallay handle the device on which the model should execute, use <code>accelerate</code>.</li> <li>Contrary to the paper, the order of the priors goes from <code>0</code> to <code>1</code> as it felt more intuitive : we sample starting from <code>0</code>.</li> <li>Primed sampling (conditionning the sampling on raw audio) requires more memory than ancestral sampling and should be used with <code>fp16</code> set to <code>True</code>.</li>",wo,Ve,vs=`This model was contributed by <a href="https://huggingface.co/ArthurZ" rel="nofollow">Arthur Zucker</a>.
The original code can be found <a href="https://github.com/openai/jukebox" rel="nofollow">here</a>.`,Jo,Z,Y,eo,Pe,sn,it,xs="JukeboxConfig",$o,P,Ee,rn,lt,ks='This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.33.3/en/model_doc/jukebox#transformers.JukeboxModel">JukeboxModel</a>.',an,ct,ys=`Configuration objects inherit from <a href="/docs/transformers/v4.33.3/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/v4.33.3/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information. Instantiating a configuration with the defaults will
yield a similar configuration to that of
<a href="https://huggingface.co/openai/jukebox-1b-lyrics" rel="nofollow">openai/jukebox-1b-lyrics</a> architecture.`,ln,dt,ws=`The downsampling and stride are used to determine downsampling of the input sequence. For example, downsampling =
(5,3), and strides = (2, 2) will downsample the audio by 2^5 = 32 to get the first level of codes, and 2**8 = 256
to get the second level codes. This is mostly true for training the top level prior and the upsamplers.`,cn,K,dn,O,Ae,mn,mt,Js=`Instantiate a <a href="/docs/transformers/v4.33.3/en/model_doc/jukebox#transformers.JukeboxConfig">JukeboxConfig</a> (or a derived class) from clip text model configuration and clip vision model
configuration.`,Mo,N,ee,to,Ue,pn,pt,$s="JukeboxPriorConfig",Co,Q,Le,un,ut,Ms=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.33.3/en/model_doc/jukebox#transformers.JukeboxPrior">JukeboxPrior</a>. It is used to instantiate a
<code>JukeboxPrior</code> according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the top level prior from the
[openai/jukebox-1b-lyrics](<a href="https://huggingface.co/openai/jukebox" rel="nofollow">https://huggingface.co/openai/jukebox</a>
-1b-lyrics) architecture.`,hn,ht,Cs=`Configuration objects inherit from <a href="/docs/transformers/v4.33.3/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/v4.33.3/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,jo,D,te,oo,ze,fn,ft,js="JukeboxVQVAEConfig",To,W,Qe,gn,gt,Ts=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.33.3/en/model_doc/jukebox#transformers.JukeboxVQVAE">JukeboxVQVAE</a>. It is used to instantiate a
<code>JukeboxVQVAE</code> according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a similar configuration to that of the VQVAE from
<a href="https://huggingface.co/openai/jukebox-1b-lyrics" rel="nofollow">openai/jukebox-1b-lyrics</a> architecture.`,bn,bt,Vs=`Configuration objects inherit from <a href="/docs/transformers/v4.33.3/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/v4.33.3/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Vo,S,oe,no,We,_n,_t,Ps="JukeboxTokenizer",Po,w,Ie,vn,vt,Es="Constructs a Jukebox tokenizer. Jukebox can be conditioned on 3 different inputs :",xn,xt,As=`<li>Artists, unique ids are associated to each artist from the provided dictionary.</li> <li>Genres, unique ids are associated to each genre from the provided dictionary.</li> <li>Lyrics, character based tokenization. Must be initialized with the list of characters that are inside the
vocabulary.</li>`,kn,kt,Us=`This tokenizer does not require training. It should be able to process a different number of inputs:
as the conditioning of the model can be done on the three different queries. If None is provided, defaults values will be used.:`,yn,yt,Ls="Depending on the number of genres on which the model should be conditioned (<code>n_genres</code>).",wn,ne,Jn,wt,zs=`You can get around that behavior by passing <code>add_prefix_space=True</code> when instantiating this tokenizer or when you
call it on some text, but since the model was not pretrained this way, it might yield a decrease in performance.`,$n,se,Mn,Jt,Qs=`This tokenizer inherits from <a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a> which contains most of the main methods. Users should refer to:
this superclass for more information regarding those methods.`,Cn,$t,Ws="However the code does not allow that and only supports composing from various genres.",jn,re,He,Tn,Mt,Is="Saves the tokenizer’s vocabulary dictionary to the provided save_directory.",Eo,R,ae,so,qe,Vn,Ct,Hs="JukeboxModel",Ao,$,Ze,Pn,jt,qs=`The bare JUKEBOX Model used for music generation. 4 sampling techniques are supported : <code>primed_sample</code>, <code>upsample</code>,
<code>continue_sample</code> and <code>ancestral_sample</code>. It does not have a <code>forward</code> method as the training is not end to end. If
you want to fine-tune the model, it is recommended to use the <code>JukeboxPrior</code> class and train each prior
individually.`,En,Tt,Zs=`This model inherits from <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. 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.)`,An,Vt,Ns=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Un,I,Ne,Ln,Pt,Ds="Generates music tokens based on the provided <code>labels. Will start at the desired prior level and automatically upsample the sequence. If you want to create the audio, you should call </code>model.decode(tokens)`, which will use\nthe VQ-VAE decoder to convert the music tokens to raw audio.",zn,ie,Qn,le,De,Wn,Et,Ss=`Generate a raw audio conditioned on the provided <code>raw_audio</code> which is used as conditioning at each of the
generation levels. The audio is encoded to music tokens using the 3 levels of the VQ-VAE. These tokens are
used: as conditioning for each level, which means that no ancestral sampling is required.`,In,ce,Se,Hn,At,Rs="Generates a continuation of the previously generated tokens.",qn,de,Re,Zn,Ut,Gs="Upsamples a sequence of music tokens using the prior at level <code>level</code>.",Nn,L,Ge,Dn,Lt,Fs=`Core sampling function used to generate music tokens. Iterates over the provided list of levels, while saving
the generated raw audio at each step.`,Sn,zt,Bs="Returns: torch.Tensor",Rn,me,Uo,G,pe,ro,Fe,Gn,Qt,Xs="JukeboxPrior",Lo,U,Be,Fn,Wt,Ys=`The JukeboxPrior class, which is a wrapper around the various conditioning and the transformer. JukeboxPrior can be
seen as language models trained on music. They model the next <code>music token</code> prediction task. If a (lyric) <code>encoderù is defined, it also models the </code>next character\` prediction on the lyrics. Can be conditionned on timing, artist,
genre, lyrics and codes from lower-levels Priors.`,Bn,ue,Xe,Xn,It,Ks="Ancestral/Prime sampling a window of tokens using the provided conditioning and metadatas.",Yn,he,Ye,Kn,Ht,Os=`Encode the hidden states using the <code>vqvae</code> encoder, and then predicts the next token in the <code>forward_tokens</code>
function. The loss is the sum of the <code>encoder</code> loss and the <code>decoder</code> loss.`,zo,F,fe,ao,Ke,On,qt,er="JukeboxVQVAE",Qo,j,Oe,es,Zt,tr=`The Hierarchical VQ-VAE model used in Jukebox. This model follows the Hierarchical VQVAE paper from <a href="https://arxiv.org/abs/2002.08111" rel="nofollow">Will Williams, Sam
Ringer, Tom Ash, John Hughes, David MacLeod, Jamie Dougherty</a>.`,ts,Nt,or=`This model inherits from <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. 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.)`,os,Dt,nr=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,ns,H,et,ss,St,sr=`Forward pass of the VQ-VAE, encodes the <code>raw_audio</code> to latent states, which are then decoded for each level.
The commit loss, which ensure that the encoder’s computed embeddings are close to the codebook vectors, is
computed.`,rs,ge,as,be,tt,is,Rt,rr="Transforms the <code>input_audio</code> to a discrete representation made out of <code>music_tokens</code>.",ls,_e,ot,cs,Gt,ar="Transforms the input <code>music_tokens</code> to their <code>raw_audio</code> representation.",Wo,io,Io;return ke=new B({}),ye=new B({}),Pe=new B({}),Ee=new T({props:{name:"class transformers.JukeboxConfig",anchor:"transformers.JukeboxConfig",parameters:[{name:"vqvae_config",val:" = None"},{name:"prior_config_list",val:" = None"},{name:"nb_priors",val:" = 3"},{name:"sampling_rate",val:" = 44100"},{name:"timing_dims",val:" = 64"},{name:"min_duration",val:" = 0"},{name:"max_duration",val:" = 600.0"},{name:"max_nb_genres",val:" = 5"},{name:"metadata_conditioning",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.JukeboxConfig.vqvae_config",description:`<strong>vqvae_config</strong> (<code>JukeboxVQVAEConfig</code>, <em>optional</em>) &#x2014;
Configuration for the <code>JukeboxVQVAE</code> model.`,name:"vqvae_config"},{anchor:"transformers.JukeboxConfig.prior_config_list",description:`<strong>prior_config_list</strong> (<code>List[JukeboxPriorConfig]</code>, <em>optional</em>) &#x2014;
List of the configs for each of the <code>JukeboxPrior</code> of the model. The original architecture uses 3 priors.`,name:"prior_config_list"},{anchor:"transformers.JukeboxConfig.nb_priors",description:`<strong>nb_priors</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Number of prior models that will sequentially sample tokens. Each prior is conditional auto regressive
(decoder) model, apart from the top prior, which can include a lyric encoder. The available models were
trained using a top prior and 2 upsampler priors.`,name:"nb_priors"},{anchor:"transformers.JukeboxConfig.sampling_rate",description:`<strong>sampling_rate</strong> (<code>int</code>, <em>optional</em>, defaults to 44100) &#x2014;
Sampling rate of the raw audio.`,name:"sampling_rate"},{anchor:"transformers.JukeboxConfig.timing_dims",description:`<strong>timing_dims</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
Dimensions of the JukeboxRangeEmbedding layer which is equivalent to traditional positional embedding
layer. The timing embedding layer converts the absolute and relative position in the currently sampled
audio to a tensor of length <code>timing_dims</code> that will be added to the music tokens.`,name:"timing_dims"},{anchor:"transformers.JukeboxConfig.min_duration",description:`<strong>min_duration</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Minimum duration of the audios to generate`,name:"min_duration"},{anchor:"transformers.JukeboxConfig.max_duration",description:`<strong>max_duration</strong> (<code>float</code>, <em>optional</em>, defaults to 600.0) &#x2014;
Maximum duration of the audios to generate`,name:"max_duration"},{anchor:"transformers.JukeboxConfig.max_nb_genres",description:`<strong>max_nb_genres</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
Maximum number of genres that can be used to condition a single sample.`,name:"max_nb_genres"},{anchor:"transformers.JukeboxConfig.metadata_conditioning",description:`<strong>metadata_conditioning</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to use metadata conditioning, corresponding to the artist, the genre and the min/maximum
duration.`,name:"metadata_conditioning"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/jukebox/configuration_jukebox.py#L495"}}),K=new uo({props:{anchor:"transformers.JukeboxConfig.example",$$slots:{default:[Cr]},$$scope:{ctx:E}}}),Ae=new T({props:{name:"from_configs",anchor:"transformers.JukeboxConfig.from_configs",parameters:[{name:"prior_configs",val:": typing.List[transformers.models.jukebox.configuration_jukebox.JukeboxPriorConfig]"},{name:"vqvae_config",val:": JukeboxVQVAEConfig"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/jukebox/configuration_jukebox.py#L598",returnDescription:`
<p>An instance of a configuration object</p>
`,returnType:`
<p><a
  href="/docs/transformers/v4.33.3/en/model_doc/jukebox#transformers.JukeboxConfig"
>JukeboxConfig</a></p>
`}}),Ue=new B({}),Le=new T({props:{name:"class transformers.JukeboxPriorConfig",anchor:"transformers.JukeboxPriorConfig",parameters:[{name:"act_fn",val:" = 'quick_gelu'"},{name:"level",val:" = 0"},{name:"alignment_head",val:" = 2"},{name:"alignment_layer",val:" = 68"},{name:"attention_multiplier",val:" = 0.25"},{name:"attention_pattern",val:" = 'enc_dec_with_lyrics'"},{name:"attn_dropout",val:" = 0"},{name:"attn_res_scale",val:" = False"},{name:"blocks",val:" = 64"},{name:"conv_res_scale",val:" = None"},{name:"num_layers",val:" = 72"},{name:"emb_dropout",val:" = 0"},{name:"encoder_config",val:" = None"},{name:"encoder_loss_fraction",val:" = 0.4"},{name:"hidden_size",val:" = 2048"},{name:"init_scale",val:" = 0.2"},{name:"is_encoder_decoder",val:" = True"},{name:"lyric_vocab_size",val:" = 80"},{name:"mask",val:" = False"},{name:"max_duration",val:" = 600"},{name:"max_nb_genres",val:" = 1"},{name:"merged_decoder",val:" = True"},{name:"metadata_conditioning",val:" = True"},{name:"metadata_dims",val:" = [604, 7898]"},{name:"min_duration",val:" = 0"},{name:"mlp_multiplier",val:" = 1.0"},{name:"music_vocab_size",val:" = 2048"},{name:"n_ctx",val:" = 6144"},{name:"n_heads",val:" = 2"},{name:"nb_relevant_lyric_tokens",val:" = 384"},{name:"res_conv_depth",val:" = 3"},{name:"res_conv_width",val:" = 128"},{name:"res_convolution_multiplier",val:" = 1"},{name:"res_dilation_cycle",val:" = None"},{name:"res_dilation_growth_rate",val:" = 1"},{name:"res_downs_t",val:" = [3, 2, 2]"},{name:"res_strides_t",val:" = [2, 2, 2]"},{name:"resid_dropout",val:" = 0"},{name:"sampling_rate",val:" = 44100"},{name:"spread",val:" = None"},{name:"timing_dims",val:" = 64"},{name:"zero_out",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.JukeboxPriorConfig.act_fn",description:`<strong>act_fn</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;quick_gelu&quot;</code>) &#x2014;
Activation function.`,name:"act_fn"},{anchor:"transformers.JukeboxPriorConfig.alignment_head",description:`<strong>alignment_head</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Head that is responsible of the alignment between lyrics and music. Only used to compute the lyric to audio
alignment`,name:"alignment_head"},{anchor:"transformers.JukeboxPriorConfig.alignment_layer",description:`<strong>alignment_layer</strong> (<code>int</code>, <em>optional</em>, defaults to 68) &#x2014;
Index of the layer that is responsible of the alignment between lyrics and music. Only used to compute the
lyric to audio alignment`,name:"alignment_layer"},{anchor:"transformers.JukeboxPriorConfig.attention_multiplier",description:`<strong>attention_multiplier</strong> (<code>float</code>, <em>optional</em>, defaults to 0.25) &#x2014;
Multiplier coefficient used to define the hidden dimension of the attention layers. 0.25 means that
0.25*width of the model will be used.`,name:"attention_multiplier"},{anchor:"transformers.JukeboxPriorConfig.attention_pattern",description:`<strong>attention_pattern</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;enc_dec_with_lyrics&quot;</code>) &#x2014;
Which attention pattern to use for the decoder/`,name:"attention_pattern"},{anchor:"transformers.JukeboxPriorConfig.attn_dropout",description:`<strong>attn_dropout</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Dropout probability for the post-attention layer dropout in the decoder.`,name:"attn_dropout"},{anchor:"transformers.JukeboxPriorConfig.attn_res_scale",description:`<strong>attn_res_scale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to scale the residuals in the attention conditioner block.`,name:"attn_res_scale"},{anchor:"transformers.JukeboxPriorConfig.blocks",description:`<strong>blocks</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
Number of blocks used in the <code>block_attn</code>. A sequence of length seq_len is factored as <code>[blocks, seq_len // blocks]</code> in the <code>JukeboxAttention</code> layer.`,name:"blocks"},{anchor:"transformers.JukeboxPriorConfig.conv_res_scale",description:`<strong>conv_res_scale</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Whether or not to scale the residuals in the conditioner block. Since the top level prior does not have a
conditioner, the default value is to None and should not be modified.`,name:"conv_res_scale"},{anchor:"transformers.JukeboxPriorConfig.num_layers",description:`<strong>num_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 72) &#x2014;
Number of layers of the transformer architecture.`,name:"num_layers"},{anchor:"transformers.JukeboxPriorConfig.emb_dropout",description:`<strong>emb_dropout</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Embedding dropout used in the lyric decoder.`,name:"emb_dropout"},{anchor:"transformers.JukeboxPriorConfig.encoder_config",description:`<strong>encoder_config</strong> (<code>JukeboxPriorConfig</code>, <em>optional</em>)  &#x2014;
Configuration of the encoder which models the prior on the lyrics.`,name:"encoder_config"},{anchor:"transformers.JukeboxPriorConfig.encoder_loss_fraction",description:`<strong>encoder_loss_fraction</strong> (<code>float</code>, <em>optional</em>, defaults to 0.4) &#x2014;
Multiplication factor used in front of the lyric encoder loss.`,name:"encoder_loss_fraction"},{anchor:"transformers.JukeboxPriorConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
Hidden dimension of the attention layers.`,name:"hidden_size"},{anchor:"transformers.JukeboxPriorConfig.init_scale",description:`<strong>init_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 0.2) &#x2014;
Initialization scales for the prior modules.`,name:"init_scale"},{anchor:"transformers.JukeboxPriorConfig.is_encoder_decoder",description:`<strong>is_encoder_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the prior is an encoder-decoder model. In case it is not, and <code>nb_relevant_lyric_tokens</code> is
greater than 0, the <code>encoder</code> args should be specified for the lyric encoding.`,name:"is_encoder_decoder"},{anchor:"transformers.JukeboxPriorConfig.mask",description:`<strong>mask</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to mask the previous positions in the attention.`,name:"mask"},{anchor:"transformers.JukeboxPriorConfig.max_duration",description:`<strong>max_duration</strong> (<code>int</code>, <em>optional</em>, defaults to 600) &#x2014;
Maximum supported duration of the generated song in seconds.`,name:"max_duration"},{anchor:"transformers.JukeboxPriorConfig.max_nb_genres",description:`<strong>max_nb_genres</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Maximum number of genres that can be used to condition the model.`,name:"max_nb_genres"},{anchor:"transformers.JukeboxPriorConfig.merged_decoder",description:`<strong>merged_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the decoder and the encoder inputs are merged. This is used for the separated
encoder-decoder architecture`,name:"merged_decoder"},{anchor:"transformers.JukeboxPriorConfig.metadata_conditioning",description:`<strong>metadata_conditioning</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True)</code> &#x2014;
Whether or not to condition on the artist and genre metadata.`,name:"metadata_conditioning"},{anchor:"transformers.JukeboxPriorConfig.metadata_dims",description:`<strong>metadata_dims</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[604, 7898]</code>) &#x2014;
Number of genres and the number of artists that were used to train the embedding layers of the prior
models.`,name:"metadata_dims"},{anchor:"transformers.JukeboxPriorConfig.min_duration",description:`<strong>min_duration</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Minimum duration of the generated audio on which the model was trained.`,name:"min_duration"},{anchor:"transformers.JukeboxPriorConfig.mlp_multiplier",description:`<strong>mlp_multiplier</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
Multiplier coefficient used to define the hidden dimension of the MLP layers. 0.25 means that 0.25*width of
the model will be used.`,name:"mlp_multiplier"},{anchor:"transformers.JukeboxPriorConfig.music_vocab_size",description:`<strong>music_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
Number of different music tokens. Should be similar to the <code>JukeboxVQVAEConfig.nb_discrete_codes</code>.`,name:"music_vocab_size"},{anchor:"transformers.JukeboxPriorConfig.n_ctx",description:`<strong>n_ctx</strong> (<code>int</code>, <em>optional</em>, defaults to 6144) &#x2014;
Number of context tokens for each prior. The context tokens are the music tokens that are attended to when
generating music tokens.`,name:"n_ctx"},{anchor:"transformers.JukeboxPriorConfig.n_heads",description:`<strong>n_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Number of attention heads.`,name:"n_heads"},{anchor:"transformers.JukeboxPriorConfig.nb_relevant_lyric_tokens",description:`<strong>nb_relevant_lyric_tokens</strong> (<code>int</code>, <em>optional</em>, defaults to 384) &#x2014;
Number of lyric tokens that are used when sampling a single window of length <code>n_ctx</code>`,name:"nb_relevant_lyric_tokens"},{anchor:"transformers.JukeboxPriorConfig.res_conv_depth",description:`<strong>res_conv_depth</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Depth of the <code>JukeboxDecoderConvBock</code> used to upsample the previously sampled audio in the
<code>JukeboxMusicTokenConditioner</code>.`,name:"res_conv_depth"},{anchor:"transformers.JukeboxPriorConfig.res_conv_width",description:`<strong>res_conv_width</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
Width of the <code>JukeboxDecoderConvBock</code> used to upsample the previously sampled audio in the
<code>JukeboxMusicTokenConditioner</code>.`,name:"res_conv_width"},{anchor:"transformers.JukeboxPriorConfig.res_convolution_multiplier",description:`<strong>res_convolution_multiplier</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Multiplier used to scale the <code>hidden_dim</code> of the <code>JukeboxResConv1DBlock</code>.`,name:"res_convolution_multiplier"},{anchor:"transformers.JukeboxPriorConfig.res_dilation_cycle",description:`<strong>res_dilation_cycle</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Dilation cycle used to define the <code>JukeboxMusicTokenConditioner</code>. Usually similar to the ones used in the
corresponding level of the VQVAE. The first prior does not use it as it is not conditioned on upper level
tokens.`,name:"res_dilation_cycle"},{anchor:"transformers.JukeboxPriorConfig.res_dilation_growth_rate",description:`<strong>res_dilation_growth_rate</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Dilation grow rate used between each convolutionnal block of the <code>JukeboxMusicTokenConditioner</code>`,name:"res_dilation_growth_rate"},{anchor:"transformers.JukeboxPriorConfig.res_downs_t",description:`<strong>res_downs_t</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[3, 2, 2]</code>) &#x2014;
Downsampling rates used in the audio conditioning network`,name:"res_downs_t"},{anchor:"transformers.JukeboxPriorConfig.res_strides_t",description:`<strong>res_strides_t</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[2, 2, 2]</code>) &#x2014;
Striding used in the audio conditioning network`,name:"res_strides_t"},{anchor:"transformers.JukeboxPriorConfig.resid_dropout",description:`<strong>resid_dropout</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Residual dropout used in the attention pattern.`,name:"resid_dropout"},{anchor:"transformers.JukeboxPriorConfig.sampling_rate",description:`<strong>sampling_rate</strong> (<code>int</code>, <em>optional</em>, defaults to 44100) &#x2014;
Sampling rate used for training.`,name:"sampling_rate"},{anchor:"transformers.JukeboxPriorConfig.spread",description:`<strong>spread</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Spread used in the <code>summary_spread_attention</code> pattern`,name:"spread"},{anchor:"transformers.JukeboxPriorConfig.timing_dims",description:`<strong>timing_dims</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
Dimension of the timing embedding.`,name:"timing_dims"},{anchor:"transformers.JukeboxPriorConfig.zero_out",description:`<strong>zero_out</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to zero out convolution weights when initializing.`,name:"zero_out"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/jukebox/configuration_jukebox.py#L143"}}),ze=new B({}),Qe=new T({props:{name:"class transformers.JukeboxVQVAEConfig",anchor:"transformers.JukeboxVQVAEConfig",parameters:[{name:"act_fn",val:" = 'relu'"},{name:"nb_discrete_codes",val:" = 2048"},{name:"commit",val:" = 0.02"},{name:"conv_input_shape",val:" = 1"},{name:"conv_res_scale",val:" = False"},{name:"embed_dim",val:" = 64"},{name:"hop_fraction",val:" = [0.125, 0.5, 0.5]"},{name:"levels",val:" = 3"},{name:"lmu",val:" = 0.99"},{name:"multipliers",val:" = [2, 1, 1]"},{name:"res_conv_depth",val:" = 4"},{name:"res_conv_width",val:" = 32"},{name:"res_convolution_multiplier",val:" = 1"},{name:"res_dilation_cycle",val:" = None"},{name:"res_dilation_growth_rate",val:" = 3"},{name:"res_downs_t",val:" = [3, 2, 2]"},{name:"res_strides_t",val:" = [2, 2, 2]"},{name:"sample_length",val:" = 1058304"},{name:"init_scale",val:" = 0.2"},{name:"zero_out",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.JukeboxVQVAEConfig.act_fn",description:`<strong>act_fn</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;relu&quot;</code>) &#x2014;
Activation function of the model.`,name:"act_fn"},{anchor:"transformers.JukeboxVQVAEConfig.nb_discrete_codes",description:`<strong>nb_discrete_codes</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
Number of codes of the VQVAE.`,name:"nb_discrete_codes"},{anchor:"transformers.JukeboxVQVAEConfig.commit",description:`<strong>commit</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
Commit loss multiplier.`,name:"commit"},{anchor:"transformers.JukeboxVQVAEConfig.conv_input_shape",description:`<strong>conv_input_shape</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of audio channels.`,name:"conv_input_shape"},{anchor:"transformers.JukeboxVQVAEConfig.conv_res_scale",description:`<strong>conv_res_scale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to scale the residuals of the <code>JukeboxResConv1DBlock</code>.`,name:"conv_res_scale"},{anchor:"transformers.JukeboxVQVAEConfig.embed_dim",description:`<strong>embed_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
Embedding dimension of the codebook vectors.`,name:"embed_dim"},{anchor:"transformers.JukeboxVQVAEConfig.hop_fraction",description:`<strong>hop_fraction</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[0.125, 0.5, 0.5]</code>) &#x2014;
Fraction of non-intersecting window used when continuing the sampling process.`,name:"hop_fraction"},{anchor:"transformers.JukeboxVQVAEConfig.levels",description:`<strong>levels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Number of hierarchical levels that used in the VQVAE.`,name:"levels"},{anchor:"transformers.JukeboxVQVAEConfig.lmu",description:`<strong>lmu</strong> (<code>float</code>, <em>optional</em>, defaults to 0.99) &#x2014;
Used in the codebook update, exponential moving average coefficient. For more detail refer to Appendix A.1
of the original <a href="https://arxiv.org/pdf/1711.00937v2.pdf" rel="nofollow">VQVAE paper</a>`,name:"lmu"},{anchor:"transformers.JukeboxVQVAEConfig.multipliers",description:`<strong>multipliers</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[2, 1, 1]</code>) &#x2014;
Depth and width multipliers used for each level. Used on the <code>res_conv_width</code> and <code>res_conv_depth</code>`,name:"multipliers"},{anchor:"transformers.JukeboxVQVAEConfig.res_conv_depth",description:`<strong>res_conv_depth</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Depth of the encoder and decoder block. If no <code>multipliers</code> are used, this is the same for each level.`,name:"res_conv_depth"},{anchor:"transformers.JukeboxVQVAEConfig.res_conv_width",description:`<strong>res_conv_width</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
Width of the encoder and decoder block. If no <code>multipliers</code> are used, this is the same for each level.`,name:"res_conv_width"},{anchor:"transformers.JukeboxVQVAEConfig.res_convolution_multiplier",description:`<strong>res_convolution_multiplier</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Scaling factor of the hidden dimension used in the <code>JukeboxResConv1DBlock</code>.`,name:"res_convolution_multiplier"},{anchor:"transformers.JukeboxVQVAEConfig.res_dilation_cycle",description:`<strong>res_dilation_cycle</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Dilation cycle value used in the <code>JukeboxResnet</code>. If an int is used, each new Conv1 block will have a depth
reduced by a power of <code>res_dilation_cycle</code>.`,name:"res_dilation_cycle"},{anchor:"transformers.JukeboxVQVAEConfig.res_dilation_growth_rate",description:`<strong>res_dilation_growth_rate</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Resnet dilation growth rate used in the VQVAE (dilation_growth_rate ** depth)`,name:"res_dilation_growth_rate"},{anchor:"transformers.JukeboxVQVAEConfig.res_downs_t",description:`<strong>res_downs_t</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[3, 2, 2]</code>) &#x2014;
Downsampling rate for each level of the hierarchical VQ-VAE.`,name:"res_downs_t"},{anchor:"transformers.JukeboxVQVAEConfig.res_strides_t",description:`<strong>res_strides_t</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[2, 2, 2]</code>) &#x2014;
Stride used for each level of the hierarchical VQ-VAE.`,name:"res_strides_t"},{anchor:"transformers.JukeboxVQVAEConfig.sample_length",description:`<strong>sample_length</strong> (<code>int</code>, <em>optional</em>, defaults to 1058304) &#x2014;
Provides the max input shape of the VQVAE. Is used to compute the input shape of each level.`,name:"sample_length"},{anchor:"transformers.JukeboxVQVAEConfig.init_scale",description:`<strong>init_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 0.2) &#x2014;
Initialization scale.`,name:"init_scale"},{anchor:"transformers.JukeboxVQVAEConfig.zero_out",description:`<strong>zero_out</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to zero out convolution weights when initializing.`,name:"zero_out"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/jukebox/configuration_jukebox.py#L372"}}),We=new B({}),Ie=new T({props:{name:"class transformers.JukeboxTokenizer",anchor:"transformers.JukeboxTokenizer",parameters:[{name:"artists_file",val:""},{name:"genres_file",val:""},{name:"lyrics_file",val:""},{name:"version",val:" = ['v3', 'v2', 'v2']"},{name:"max_n_lyric_tokens",val:" = 512"},{name:"n_genres",val:" = 5"},{name:"unk_token",val:" = '<|endoftext|>'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.JukeboxTokenizer.artists_file",description:`<strong>artists_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file which contains a mapping between artists and ids. The default file supports
both &#x201C;v2&#x201D; and &#x201C;v3&#x201D;`,name:"artists_file"},{anchor:"transformers.JukeboxTokenizer.genres_file",description:`<strong>genres_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file which contain a mapping between genres and ids.`,name:"genres_file"},{anchor:"transformers.JukeboxTokenizer.lyrics_file",description:`<strong>lyrics_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file which contains the accepted characters for the lyrics tokenization.`,name:"lyrics_file"},{anchor:"transformers.JukeboxTokenizer.version",description:`<strong>version</strong> (<code>List[str]</code>, <code>optional</code>, default to <code>[&quot;v3&quot;, &quot;v2&quot;, &quot;v2&quot;]</code>)  &#x2014;
List of the tokenizer versions. The <code>5b-lyrics</code>&#x2019;s top level prior model was trained using <code>v3</code> instead of
<code>v2</code>.`,name:"version"},{anchor:"transformers.JukeboxTokenizer.n_genres",description:`<strong>n_genres</strong> (<code>int</code>, <code>optional</code>, defaults to 1) &#x2014;
Maximum number of genres to use for composition.`,name:"n_genres"},{anchor:"transformers.JukeboxTokenizer.max_n_lyric_tokens",description:`<strong>max_n_lyric_tokens</strong> (<code>int</code>, <code>optional</code>, defaults to 512) &#x2014;
Maximum number of lyric tokens to keep.`,name:"max_n_lyric_tokens"},{anchor:"transformers.JukeboxTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;|endoftext|&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/jukebox/tokenization_jukebox.py#L59"}}),ne=new uo({props:{anchor:"transformers.JukeboxTokenizer.example",$$slots:{default:[jr]},$$scope:{ctx:E}}}),se=new Mr({props:{$$slots:{default:[Tr]},$$scope:{ctx:E}}}),He=new T({props:{name:"save_vocabulary",anchor:"transformers.JukeboxTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"transformers.JukeboxTokenizer.save_vocabulary.save_directory",description:`<strong>save_directory</strong> (<code>str</code>) &#x2014;
A path to the directory where to saved. It will be created if it doesn&#x2019;t exist.`,name:"save_directory"},{anchor:"transformers.JukeboxTokenizer.save_vocabulary.filename_prefix",description:`<strong>filename_prefix</strong> (<code>Optional[str]</code>, <em>optional</em>) &#x2014;
A prefix to add to the names of the files saved by the tokenizer.`,name:"filename_prefix"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/jukebox/tokenization_jukebox.py#L367"}}),qe=new B({}),Ze=new T({props:{name:"class transformers.JukeboxModel",anchor:"transformers.JukeboxModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.JukeboxModel.config",description:`<strong>config</strong> (<code>JukeboxConfig</code>) &#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/v4.33.3/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/v4.33.3/src/transformers/models/jukebox/modeling_jukebox.py#L2299"}}),Ne=new T({props:{name:"ancestral_sample",anchor:"transformers.JukeboxModel.ancestral_sample",parameters:[{name:"labels",val:""},{name:"n_samples",val:" = 1"},{name:"**sampling_kwargs",val:""}],parametersDescription:[{anchor:"transformers.JukeboxModel.ancestral_sample.labels",description:`<strong>labels</strong> (<code>List[torch.LongTensor]</code>)  &#x2014;
List of length <code>n_sample</code>, and shape <code>(self.levels, 4 + self.config.max_nb_genre + lyric_sequence_length)</code> metadata such as <code>artist_id</code>, <code>genre_id</code> and the full list of lyric tokens
which are used to condition the generation.`,name:"labels"},{anchor:"transformers.JukeboxModel.ancestral_sample.n_samples",description:`<strong>n_samples</strong> (<code>int</code>, <em>optional</em>, default to 1)  &#x2014;
Number of samples to be generated in parallel.`,name:"n_samples"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/jukebox/modeling_jukebox.py#L2573"}}),ie=new uo({props:{anchor:"transformers.JukeboxModel.ancestral_sample.example",$$slots:{default:[Vr]},$$scope:{ctx:E}}}),De=new T({props:{name:"primed_sample",anchor:"transformers.JukeboxModel.primed_sample",parameters:[{name:"raw_audio",val:""},{name:"labels",val:""},{name:"**sampling_kwargs",val:""}],parametersDescription:[{anchor:"transformers.JukeboxModel.primed_sample.raw_audio",description:`<strong>raw_audio</strong> (<code>List[torch.Tensor]</code> of length <code>n_samples</code> )  &#x2014;
A list of raw audio that will be used as conditioning information for each samples that will be
generated.`,name:"raw_audio"},{anchor:"transformers.JukeboxModel.primed_sample.labels",description:`<strong>labels</strong> (<code>List[torch.LongTensor]</code> of length <code>n_sample</code>, and shape <code>(self.levels, self.config.max_nb_genre + lyric_sequence_length)</code>  &#x2014;
List of metadata such as <code>artist_id</code>, <code>genre_id</code> and the full list of lyric tokens which are used to
condition the generation.`,name:"labels"},{anchor:"transformers.JukeboxModel.primed_sample.sampling_kwargs",description:`<strong>sampling_kwargs</strong> (<code>Dict[Any]</code>) &#x2014;
Various additional sampling arguments that are used by the <code>_sample</code> function. A detail list of the
arguments can bee seen in the <code>_sample</code> function documentation.`,name:"sampling_kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/jukebox/modeling_jukebox.py#L2649"}}),Se=new T({props:{name:"continue_sample",anchor:"transformers.JukeboxModel.continue_sample",parameters:[{name:"music_tokens",val:""},{name:"labels",val:""},{name:"**sampling_kwargs",val:""}],parametersDescription:[{anchor:"transformers.JukeboxModel.continue_sample.music_tokens",description:`<strong>music_tokens</strong> (<code>List[torch.LongTensor]</code> of length <code>self.levels</code> )  &#x2014;
A sequence of music tokens which will be used as context to continue the sampling process. Should have
<code>self.levels</code> tensors, each corresponding to the generation at a certain level.`,name:"music_tokens"},{anchor:"transformers.JukeboxModel.continue_sample.labels",description:`<strong>labels</strong> (<code>List[torch.LongTensor]</code> of length <code>n_sample</code>, and shape <code>(self.levels, self.config.max_nb_genre + lyric_sequence_length)</code>  &#x2014;
List of metadata such as <code>artist_id</code>, <code>genre_id</code> and the full list of lyric tokens which are used to
condition the generation.`,name:"labels"},{anchor:"transformers.JukeboxModel.continue_sample.sampling_kwargs",description:`<strong>sampling_kwargs</strong> (<code>Dict[Any]</code>) &#x2014;
Various additional sampling arguments that are used by the <code>_sample</code> function. A detail list of the
arguments can bee seen in the <code>_sample</code> function documentation.`,name:"sampling_kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/jukebox/modeling_jukebox.py#L2619"}}),Re=new T({props:{name:"upsample",anchor:"transformers.JukeboxModel.upsample",parameters:[{name:"music_tokens",val:""},{name:"labels",val:""},{name:"**sampling_kwargs",val:""}],parametersDescription:[{anchor:"transformers.JukeboxModel.upsample.music_tokens",description:`<strong>music_tokens</strong> (<code>List[torch.LongTensor]</code> of length <code>self.levels</code> )  &#x2014;
A sequence of music tokens which will be used as context to continue the sampling process. Should have
<code>self.levels</code> tensors, each corresponding to the generation at a certain level.`,name:"music_tokens"},{anchor:"transformers.JukeboxModel.upsample.labels",description:`<strong>labels</strong> (<code>List[torch.LongTensor]</code> of length <code>n_sample</code>, and shape <code>(self.levels, self.config.max_nb_genre + lyric_sequence_length)</code>  &#x2014;
List of metadata such as <code>artist_id</code>, <code>genre_id</code> and the full list of lyric tokens which are used to
condition the generation.`,name:"labels"},{anchor:"transformers.JukeboxModel.upsample.sampling_kwargs",description:`<strong>sampling_kwargs</strong> (<code>Dict[Any]</code>) &#x2014;
Various additional sampling arguments that are used by the <code>_sample</code> function. A detail list of the
arguments can bee seen in the <code>_sample</code> function documentation.`,name:"sampling_kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/jukebox/modeling_jukebox.py#L2634"}}),Ge=new T({props:{name:"_sample",anchor:"transformers.JukeboxModel._sample",parameters:[{name:"music_tokens",val:""},{name:"labels",val:""},{name:"sample_levels",val:""},{name:"metas",val:" = None"},{name:"chunk_size",val:" = 32"},{name:"sampling_temperature",val:" = 0.98"},{name:"lower_batch_size",val:" = 16"},{name:"max_batch_size",val:" = 16"},{name:"sample_length_in_seconds",val:" = 24"},{name:"compute_alignments",val:" = False"},{name:"sample_tokens",val:" = None"},{name:"offset",val:" = 0"},{name:"save_results",val:" = True"},{name:"sample_length",val:" = None"}],parametersDescription:[{anchor:"transformers.JukeboxModel._sample.music_tokens",description:`<strong>music_tokens</strong> (<code>List[torch.LongTensor]</code>) &#x2014;
A sequence of music tokens of length <code>self.levels</code> which will be used as context to continue the
sampling process. Should have <code>self.levels</code> tensors, each corresponding to the generation at a certain
level.`,name:"music_tokens"},{anchor:"transformers.JukeboxModel._sample.labels",description:`<strong>labels</strong> (<code>List[torch.LongTensor]</code>) &#x2014;
List of length <code>n_sample</code>, and shape <code>(self.levels, 4 + self.config.max_nb_genre + lyric_sequence_length)</code> metadata such as <code>artist_id</code>, <code>genre_id</code> and the full list of lyric tokens
which are used to condition the generation.`,name:"labels"},{anchor:"transformers.JukeboxModel._sample.sample_levels",description:`<strong>sample_levels</strong> (<code>List[int]</code>) &#x2014;
List of the desired levels at which the sampling will be done. A level is equivalent to the index of
the prior in the list of priors`,name:"sample_levels"},{anchor:"transformers.JukeboxModel._sample.metas",description:`<strong>metas</strong> (<code>List[Any]</code>, <em>optional</em>) &#x2014;
Metadatas used to generate the <code>labels</code>`,name:"metas"},{anchor:"transformers.JukeboxModel._sample.chunk_size",description:`<strong>chunk_size</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
Size of a chunk of audio, used to fill up the memory in chuncks to prevent OOM erros. Bigger chunks
means faster memory filling but more consumption.`,name:"chunk_size"},{anchor:"transformers.JukeboxModel._sample.sampling_temperature",description:`<strong>sampling_temperature</strong> (<code>float</code>, <em>optional</em>, defaults to 0.98) &#x2014;
Temperature used to ajust the randomness of the sampling.`,name:"sampling_temperature"},{anchor:"transformers.JukeboxModel._sample.lower_batch_size",description:`<strong>lower_batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Maximum batch size for the lower level priors`,name:"lower_batch_size"},{anchor:"transformers.JukeboxModel._sample.max_batch_size",description:`<strong>max_batch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Maximum batch size for the top level priors`,name:"max_batch_size"},{anchor:"transformers.JukeboxModel._sample.sample_length_in_seconds",description:`<strong>sample_length_in_seconds</strong> (<code>int</code>, <em>optional</em>, defaults to 24) &#x2014;
Desired length of the generation in seconds`,name:"sample_length_in_seconds"},{anchor:"transformers.JukeboxModel._sample.compute_alignments",description:`<strong>compute_alignments</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to compute the alignment between the lyrics and the audio using the top_prior`,name:"compute_alignments"},{anchor:"transformers.JukeboxModel._sample.sample_tokens",description:`<strong>sample_tokens</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Precise number of tokens that should be sampled at each level. This is mostly useful for running dummy
experiments`,name:"sample_tokens"},{anchor:"transformers.JukeboxModel._sample.offset",description:`<strong>offset</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Audio offset used as conditioning, corresponds to the starting sample in the music. If the offset is
greater than 0, the lyrics will be shifted take that intoaccount`,name:"offset"},{anchor:"transformers.JukeboxModel._sample.save_results",description:`<strong>save_results</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to save the intermediate results. If <code>True</code>, will generate a folder named with the start
time.`,name:"save_results"},{anchor:"transformers.JukeboxModel._sample.sample_length",description:`<strong>sample_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Desired length of the generation in samples.`,name:"sample_length"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/jukebox/modeling_jukebox.py#L2434"}}),me=new uo({props:{anchor:"transformers.JukeboxModel._sample.example",$$slots:{default:[Pr]},$$scope:{ctx:E}}}),Fe=new B({}),Be=new T({props:{name:"class transformers.JukeboxPrior",anchor:"transformers.JukeboxPrior",parameters:[{name:"config",val:": JukeboxPriorConfig"},{name:"level",val:" = None"},{name:"nb_priors",val:" = 3"},{name:"vqvae_encoder",val:" = None"},{name:"vqvae_decoder",val:" = None"}],parametersDescription:[{anchor:"transformers.JukeboxPrior.config",description:`<strong>config</strong> (<code>JukeboxPriorConfig</code>) &#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/v4.33.3/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.JukeboxPrior.level",description:`<strong>level</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Current level of the Prior. Should be in range <code>[0,nb_priors]</code>.`,name:"level"},{anchor:"transformers.JukeboxPrior.nb_priors",description:`<strong>nb_priors</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Total number of priors.`,name:"nb_priors"},{anchor:"transformers.JukeboxPrior.vqvae_encoder",description:`<strong>vqvae_encoder</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
Encoding method of the VQVAE encoder used in the forward pass of the model. Passing functions instead of
the vqvae module to avoid getting the parameters.`,name:"vqvae_encoder"},{anchor:"transformers.JukeboxPrior.vqvae_decoder",description:`<strong>vqvae_decoder</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
Decoding method of the VQVAE decoder used in the forward pass of the model. Passing functions instead of
the vqvae module to avoid getting the parameters.`,name:"vqvae_decoder"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/jukebox/modeling_jukebox.py#L1769"}}),Xe=new T({props:{name:"sample",anchor:"transformers.JukeboxPrior.sample",parameters:[{name:"n_samples",val:""},{name:"music_tokens",val:" = None"},{name:"music_tokens_conds",val:" = None"},{name:"metadata",val:" = None"},{name:"temp",val:" = 1.0"},{name:"top_k",val:" = 0"},{name:"top_p",val:" = 0.0"},{name:"chunk_size",val:" = None"},{name:"sample_tokens",val:" = None"}],parametersDescription:[{anchor:"transformers.JukeboxPrior.sample.n_samples",description:`<strong>n_samples</strong> (<code>int</code>) &#x2014;
Number of samples to generate.`,name:"n_samples"},{anchor:"transformers.JukeboxPrior.sample.music_tokens",description:`<strong>music_tokens</strong> (<code>List[torch.LongTensor]</code>, <em>optional</em>) &#x2014;
Previously gemerated tokens at the current level. Used as context for the generation.`,name:"music_tokens"},{anchor:"transformers.JukeboxPrior.sample.music_tokens_conds",description:`<strong>music_tokens_conds</strong> (<code>List[torch.FloatTensor]</code>, <em>optional</em>) &#x2014;
Upper-level music tokens generated by the previous prior model. Is <code>None</code> if the generation is not
conditionned on the upper-level tokens.`,name:"music_tokens_conds"},{anchor:"transformers.JukeboxPrior.sample.metadata",description:`<strong>metadata</strong> (<code>List[torch.LongTensor]</code>, <em>optional</em>) &#x2014;
List containing the metatdata tensor with the artist, genre and the lyric tokens.`,name:"metadata"},{anchor:"transformers.JukeboxPrior.sample.temp",description:`<strong>temp</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
Sampling temperature.`,name:"temp"},{anchor:"transformers.JukeboxPrior.sample.top_k",description:`<strong>top_k</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Top k probabilities used for filtering.`,name:"top_k"},{anchor:"transformers.JukeboxPrior.sample.top_p",description:`<strong>top_p</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Top p probabilities used for filtering.`,name:"top_p"},{anchor:"transformers.JukeboxPrior.sample.chunk_size",description:`<strong>chunk_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Size of the chunks used to prepare the cache of the transformer.`,name:"chunk_size"},{anchor:"transformers.JukeboxPrior.sample.sample_tokens",description:`<strong>sample_tokens</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of tokens to sample.`,name:"sample_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/jukebox/modeling_jukebox.py#L2059"}}),Ye=new T({props:{name:"forward",anchor:"transformers.JukeboxPrior.forward",parameters:[{name:"hidden_states",val:": Tensor"},{name:"metadata",val:": typing.Optional[typing.List[torch.LongTensor]]"},{name:"decode",val:": typing.Optional[bool] = False"},{name:"get_preds",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.JukeboxPrior.forward.hidden_states",description:`<strong>hidden_states</strong> (<code>torch.Tensor</code>) &#x2014;
Hidden states which should be raw audio`,name:"hidden_states"},{anchor:"transformers.JukeboxPrior.forward.metadata",description:`<strong>metadata</strong> (<code>List[torch.LongTensor]</code>, <em>optional</em>) &#x2014;
List containing the metadata conditioning tensorwith the lyric and the metadata tokens.`,name:"metadata"},{anchor:"transformers.JukeboxPrior.forward.decode",description:`<strong>decode</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to decode the encoded to tokens.`,name:"decode"},{anchor:"transformers.JukeboxPrior.forward.get_preds",description:`<strong>get_preds</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return the actual predicitons of the model.`,name:"get_preds"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/jukebox/modeling_jukebox.py#L2227"}}),Ke=new B({}),Oe=new T({props:{name:"class transformers.JukeboxVQVAE",anchor:"transformers.JukeboxVQVAE",parameters:[{name:"config",val:": JukeboxVQVAEConfig"}],parametersDescription:[{anchor:"transformers.JukeboxVQVAE.config",description:`<strong>config</strong> (<code>JukeboxConfig</code>) &#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/v4.33.3/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/v4.33.3/src/transformers/models/jukebox/modeling_jukebox.py#L602"}}),et=new T({props:{name:"forward",anchor:"transformers.JukeboxVQVAE.forward",parameters:[{name:"raw_audio",val:": FloatTensor"}],parametersDescription:[{anchor:"transformers.JukeboxVQVAE.forward.raw_audio",description:`<strong>raw_audio</strong> (<code>torch.FloatTensor</code>) &#x2014;
Audio input which will be encoded and decoded.`,name:"raw_audio"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/jukebox/modeling_jukebox.py#L739",returnDescription:`
<p><code>Tuple[torch.Tensor, torch.Tensor]</code></p>
`}}),ge=new uo({props:{anchor:"transformers.JukeboxVQVAE.forward.example",$$slots:{default:[Er]},$$scope:{ctx:E}}}),tt=new T({props:{name:"encode",anchor:"transformers.JukeboxVQVAE.encode",parameters:[{name:"input_audio",val:""},{name:"start_level",val:" = 0"},{name:"end_level",val:" = None"},{name:"bs_chunks",val:" = 1"}],parametersDescription:[{anchor:"transformers.JukeboxVQVAE.encode.input_audio",description:`<strong>input_audio</strong> (<code>torch.Tensor</code>) &#x2014;
Raw audio which will be encoded to its discrete representation using the codebook. The closest <code>code</code>
form the codebook will be computed for each sequence of samples.`,name:"input_audio"},{anchor:"transformers.JukeboxVQVAE.encode.start_level",description:`<strong>start_level</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Level at which the encoding process will start. Default to 0.`,name:"start_level"},{anchor:"transformers.JukeboxVQVAE.encode.end_level",description:`<strong>end_level</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Level at which the encoding process will start. Default to None.`,name:"end_level"},{anchor:"transformers.JukeboxVQVAE.encode.bs_chunks",description:`<strong>bs_chunks</strong> (int, <em>optional</em>, defaults to 1) &#x2014;
Number of chunks of raw audio to process at the same time.`,name:"bs_chunks"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/jukebox/modeling_jukebox.py#L709"}}),ot=new T({props:{name:"decode",anchor:"transformers.JukeboxVQVAE.decode",parameters:[{name:"music_tokens",val:""},{name:"start_level",val:" = 0"},{name:"end_level",val:" = None"},{name:"bs_chunks",val:" = 1"}],parametersDescription:[{anchor:"transformers.JukeboxVQVAE.decode.music_tokens",description:`<strong>music_tokens</strong> (<code>torch.LongTensor</code>) &#x2014;
Tensor of music tokens which will be decoded to raw audio by using the codebook. Each music token
should be an index to a corresponding <code>code</code> vector in the codebook.`,name:"music_tokens"},{anchor:"transformers.JukeboxVQVAE.decode.start_level",description:`<strong>start_level</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Level at which the decoding process will start. Default to 0.`,name:"start_level"},{anchor:"transformers.JukeboxVQVAE.decode.end_level",description:`<strong>end_level</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Level at which the decoding process will start. Default to None.`,name:"end_level"},{anchor:"transformers.JukeboxVQVAE.decode.bs_chunks",description:`<strong>bs_chunks</strong> (int, <em>optional</em>) &#x2014;
Number of chunks to process at the same time.`,name:"bs_chunks"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/jukebox/modeling_jukebox.py#L673"}}),{c(){d=n("meta"),J=r(),h=n("p"),f=r(),y=n("h1"),i=n("a"),C=n("span"),g(ke.$$.fragment),on=r(),rt=n("span"),rt.textContent=ds,fo=r(),q=n("h2"),X=n("a"),Ot=n("span"),g(ye.$$.fragment),nn=r(),at=n("span"),at.textContent=ms,go=r(),we=n("p"),we.innerHTML=ps,bo=r(),Je=n("p"),Je.textContent=us,_o=r(),$e=n("p"),$e.innerHTML=hs,vo=r(),Me=n("p"),Me.innerHTML=fs,xo=r(),Ce=n("p"),Ce.innerHTML=gs,ko=r(),je=n("p"),je.textContent=bs,yo=r(),Te=n("ul"),Te.innerHTML=_s,wo=r(),Ve=n("p"),Ve.innerHTML=vs,Jo=r(),Z=n("h2"),Y=n("a"),eo=n("span"),g(Pe.$$.fragment),sn=r(),it=n("span"),it.textContent=xs,$o=r(),P=n("div"),g(Ee.$$.fragment),rn=r(),lt=n("p"),lt.innerHTML=ks,an=r(),ct=n("p"),ct.innerHTML=ys,ln=r(),dt=n("p"),dt.textContent=ws,cn=r(),g(K.$$.fragment),dn=r(),O=n("div"),g(Ae.$$.fragment),mn=r(),mt=n("p"),mt.innerHTML=Js,Mo=r(),N=n("h2"),ee=n("a"),to=n("span"),g(Ue.$$.fragment),pn=r(),pt=n("span"),pt.textContent=$s,Co=r(),Q=n("div"),g(Le.$$.fragment),un=r(),ut=n("p"),ut.innerHTML=Ms,hn=r(),ht=n("p"),ht.innerHTML=Cs,jo=r(),D=n("h2"),te=n("a"),oo=n("span"),g(ze.$$.fragment),fn=r(),ft=n("span"),ft.textContent=js,To=r(),W=n("div"),g(Qe.$$.fragment),gn=r(),gt=n("p"),gt.innerHTML=Ts,bn=r(),bt=n("p"),bt.innerHTML=Vs,Vo=r(),S=n("h2"),oe=n("a"),no=n("span"),g(We.$$.fragment),_n=r(),_t=n("span"),_t.textContent=Ps,Po=r(),w=n("div"),g(Ie.$$.fragment),vn=r(),vt=n("p"),vt.textContent=Es,xn=r(),xt=n("ul"),xt.innerHTML=As,kn=r(),kt=n("p"),kt.textContent=Us,yn=r(),yt=n("p"),yt.innerHTML=Ls,wn=r(),g(ne.$$.fragment),Jn=r(),wt=n("p"),wt.innerHTML=zs,$n=r(),g(se.$$.fragment),Mn=r(),Jt=n("p"),Jt.innerHTML=Qs,Cn=r(),$t=n("p"),$t.textContent=Ws,jn=r(),re=n("div"),g(He.$$.fragment),Tn=r(),Mt=n("p"),Mt.textContent=Is,Eo=r(),R=n("h2"),ae=n("a"),so=n("span"),g(qe.$$.fragment),Vn=r(),Ct=n("span"),Ct.textContent=Hs,Ao=r(),$=n("div"),g(Ze.$$.fragment),Pn=r(),jt=n("p"),jt.innerHTML=qs,En=r(),Tt=n("p"),Tt.innerHTML=Zs,An=r(),Vt=n("p"),Vt.innerHTML=Ns,Un=r(),I=n("div"),g(Ne.$$.fragment),Ln=r(),Pt=n("p"),Pt.innerHTML=Ds,zn=r(),g(ie.$$.fragment),Qn=r(),le=n("div"),g(De.$$.fragment),Wn=r(),Et=n("p"),Et.innerHTML=Ss,In=r(),ce=n("div"),g(Se.$$.fragment),Hn=r(),At=n("p"),At.textContent=Rs,qn=r(),de=n("div"),g(Re.$$.fragment),Zn=r(),Ut=n("p"),Ut.innerHTML=Gs,Nn=r(),L=n("div"),g(Ge.$$.fragment),Dn=r(),Lt=n("p"),Lt.textContent=Fs,Sn=r(),zt=n("p"),zt.textContent=Bs,Rn=r(),g(me.$$.fragment),Uo=r(),G=n("h2"),pe=n("a"),ro=n("span"),g(Fe.$$.fragment),Gn=r(),Qt=n("span"),Qt.textContent=Xs,Lo=r(),U=n("div"),g(Be.$$.fragment),Fn=r(),Wt=n("p"),Wt.innerHTML=Ys,Bn=r(),ue=n("div"),g(Xe.$$.fragment),Xn=r(),It=n("p"),It.textContent=Ks,Yn=r(),he=n("div"),g(Ye.$$.fragment),Kn=r(),Ht=n("p"),Ht.innerHTML=Os,zo=r(),F=n("h2"),fe=n("a"),ao=n("span"),g(Ke.$$.fragment),On=r(),qt=n("span"),qt.textContent=er,Qo=r(),j=n("div"),g(Oe.$$.fragment),es=r(),Zt=n("p"),Zt.innerHTML=tr,ts=r(),Nt=n("p"),Nt.innerHTML=or,os=r(),Dt=n("p"),Dt.innerHTML=nr,ns=r(),H=n("div"),g(et.$$.fragment),ss=r(),St=n("p"),St.innerHTML=sr,rs=r(),g(ge.$$.fragment),as=r(),be=n("div"),g(tt.$$.fragment),is=r(),Rt=n("p"),Rt.innerHTML=rr,ls=r(),_e=n("div"),g(ot.$$.fragment),cs=r(),Gt=n("p"),Gt.innerHTML=ar,Wo=r(),io=n("p"),this.h()},l(e){const l=$r("svelte-1phssyn",document.head);d=s(l,"META",{name:!0,content:!0}),l.forEach(o),J=a(e),h=s(e,"P",{}),u(h).forEach(o),f=a(e),y=s(e,"H1",{class:!0});var nt=u(y);i=s(nt,"A",{id:!0,class:!0,href:!0});var lo=u(i);C=s(lo,"SPAN",{});var co=u(C);b(ke.$$.fragment,co),co.forEach(o),lo.forEach(o),on=a(nt),rt=s(nt,"SPAN",{"data-svelte-h":!0}),p(rt)!=="svelte-9cy7v5"&&(rt.textContent=ds),nt.forEach(o),fo=a(e),q=s(e,"H2",{class:!0});var st=u(q);X=s(st,"A",{id:!0,class:!0,href:!0});var mo=u(X);Ot=s(mo,"SPAN",{});var po=u(Ot);b(ye.$$.fragment,po),po.forEach(o),mo.forEach(o),nn=a(st),at=s(st,"SPAN",{"data-svelte-h":!0}),p(at)!=="svelte-1jsw1pg"&&(at.textContent=ms),st.forEach(o),go=a(e),we=s(e,"P",{"data-svelte-h":!0}),p(we)!=="svelte-1ax856a"&&(we.innerHTML=ps),bo=a(e),Je=s(e,"P",{"data-svelte-h":!0}),p(Je)!=="svelte-vfdo9a"&&(Je.textContent=us),_o=a(e),$e=s(e,"P",{"data-svelte-h":!0}),p($e)!=="svelte-nitrj1"&&($e.innerHTML=hs),vo=a(e),Me=s(e,"P",{"data-svelte-h":!0}),p(Me)!=="svelte-gptgy2"&&(Me.innerHTML=fs),xo=a(e),Ce=s(e,"P",{"data-svelte-h":!0}),p(Ce)!=="svelte-10w2oqd"&&(Ce.innerHTML=gs),ko=a(e),je=s(e,"P",{"data-svelte-h":!0}),p(je)!=="svelte-axv494"&&(je.textContent=bs),yo=a(e),Te=s(e,"UL",{"data-svelte-h":!0}),p(Te)!=="svelte-1jm8les"&&(Te.innerHTML=_s),wo=a(e),Ve=s(e,"P",{"data-svelte-h":!0}),p(Ve)!=="svelte-i0ky6l"&&(Ve.innerHTML=vs),Jo=a(e),Z=s(e,"H2",{class:!0});var Ho=u(Z);Y=s(Ho,"A",{id:!0,class:!0,href:!0});var ir=u(Y);eo=s(ir,"SPAN",{});var lr=u(eo);b(Pe.$$.fragment,lr),lr.forEach(o),ir.forEach(o),sn=a(Ho),it=s(Ho,"SPAN",{"data-svelte-h":!0}),p(it)!=="svelte-1p4cu6b"&&(it.textContent=xs),Ho.forEach(o),$o=a(e),P=s(e,"DIV",{class:!0});var z=u(P);b(Ee.$$.fragment,z),rn=a(z),lt=s(z,"P",{"data-svelte-h":!0}),p(lt)!=="svelte-1hcnslr"&&(lt.innerHTML=ks),an=a(z),ct=s(z,"P",{"data-svelte-h":!0}),p(ct)!=="svelte-1s7e3ue"&&(ct.innerHTML=ys),ln=a(z),dt=s(z,"P",{"data-svelte-h":!0}),p(dt)!=="svelte-1ge4jf0"&&(dt.textContent=ws),cn=a(z),b(K.$$.fragment,z),dn=a(z),O=s(z,"DIV",{class:!0});var qo=u(O);b(Ae.$$.fragment,qo),mn=a(qo),mt=s(qo,"P",{"data-svelte-h":!0}),p(mt)!=="svelte-nrahx8"&&(mt.innerHTML=Js),qo.forEach(o),z.forEach(o),Mo=a(e),N=s(e,"H2",{class:!0});var Zo=u(N);ee=s(Zo,"A",{id:!0,class:!0,href:!0});var cr=u(ee);to=s(cr,"SPAN",{});var dr=u(to);b(Ue.$$.fragment,dr),dr.forEach(o),cr.forEach(o),pn=a(Zo),pt=s(Zo,"SPAN",{"data-svelte-h":!0}),p(pt)!=="svelte-1g81f9t"&&(pt.textContent=$s),Zo.forEach(o),Co=a(e),Q=s(e,"DIV",{class:!0});var Ft=u(Q);b(Le.$$.fragment,Ft),un=a(Ft),ut=s(Ft,"P",{"data-svelte-h":!0}),p(ut)!=="svelte-pxfd15"&&(ut.innerHTML=Ms),hn=a(Ft),ht=s(Ft,"P",{"data-svelte-h":!0}),p(ht)!=="svelte-cfh5wl"&&(ht.innerHTML=Cs),Ft.forEach(o),jo=a(e),D=s(e,"H2",{class:!0});var No=u(D);te=s(No,"A",{id:!0,class:!0,href:!0});var mr=u(te);oo=s(mr,"SPAN",{});var pr=u(oo);b(ze.$$.fragment,pr),pr.forEach(o),mr.forEach(o),fn=a(No),ft=s(No,"SPAN",{"data-svelte-h":!0}),p(ft)!=="svelte-z18g2w"&&(ft.textContent=js),No.forEach(o),To=a(e),W=s(e,"DIV",{class:!0});var Bt=u(W);b(Qe.$$.fragment,Bt),gn=a(Bt),gt=s(Bt,"P",{"data-svelte-h":!0}),p(gt)!=="svelte-14sa7m9"&&(gt.innerHTML=Ts),bn=a(Bt),bt=s(Bt,"P",{"data-svelte-h":!0}),p(bt)!=="svelte-cfh5wl"&&(bt.innerHTML=Vs),Bt.forEach(o),Vo=a(e),S=s(e,"H2",{class:!0});var Do=u(S);oe=s(Do,"A",{id:!0,class:!0,href:!0});var ur=u(oe);no=s(ur,"SPAN",{});var hr=u(no);b(We.$$.fragment,hr),hr.forEach(o),ur.forEach(o),_n=a(Do),_t=s(Do,"SPAN",{"data-svelte-h":!0}),p(_t)!=="svelte-1gimu84"&&(_t.textContent=Ps),Do.forEach(o),Po=a(e),w=s(e,"DIV",{class:!0});var M=u(w);b(Ie.$$.fragment,M),vn=a(M),vt=s(M,"P",{"data-svelte-h":!0}),p(vt)!=="svelte-g45kr3"&&(vt.textContent=Es),xn=a(M),xt=s(M,"UL",{"data-svelte-h":!0}),p(xt)!=="svelte-1275agq"&&(xt.innerHTML=As),kn=a(M),kt=s(M,"P",{"data-svelte-h":!0}),p(kt)!=="svelte-1ohtqdr"&&(kt.textContent=Us),yn=a(M),yt=s(M,"P",{"data-svelte-h":!0}),p(yt)!=="svelte-1p2f8vn"&&(yt.innerHTML=Ls),wn=a(M),b(ne.$$.fragment,M),Jn=a(M),wt=s(M,"P",{"data-svelte-h":!0}),p(wt)!=="svelte-1jfcabo"&&(wt.innerHTML=zs),$n=a(M),b(se.$$.fragment,M),Mn=a(M),Jt=s(M,"P",{"data-svelte-h":!0}),p(Jt)!=="svelte-s2s4sm"&&(Jt.innerHTML=Qs),Cn=a(M),$t=s(M,"P",{"data-svelte-h":!0}),p($t)!=="svelte-ocbpqr"&&($t.textContent=Ws),jn=a(M),re=s(M,"DIV",{class:!0});var So=u(re);b(He.$$.fragment,So),Tn=a(So),Mt=s(So,"P",{"data-svelte-h":!0}),p(Mt)!=="svelte-1ht6cxs"&&(Mt.textContent=Is),So.forEach(o),M.forEach(o),Eo=a(e),R=s(e,"H2",{class:!0});var Ro=u(R);ae=s(Ro,"A",{id:!0,class:!0,href:!0});var fr=u(ae);so=s(fr,"SPAN",{});var gr=u(so);b(qe.$$.fragment,gr),gr.forEach(o),fr.forEach(o),Vn=a(Ro),Ct=s(Ro,"SPAN",{"data-svelte-h":!0}),p(Ct)!=="svelte-15jaobo"&&(Ct.textContent=Hs),Ro.forEach(o),Ao=a(e),$=s(e,"DIV",{class:!0});var V=u($);b(Ze.$$.fragment,V),Pn=a(V),jt=s(V,"P",{"data-svelte-h":!0}),p(jt)!=="svelte-1fljc29"&&(jt.innerHTML=qs),En=a(V),Tt=s(V,"P",{"data-svelte-h":!0}),p(Tt)!=="svelte-ev63c"&&(Tt.innerHTML=Zs),An=a(V),Vt=s(V,"P",{"data-svelte-h":!0}),p(Vt)!=="svelte-hswkmf"&&(Vt.innerHTML=Ns),Un=a(V),I=s(V,"DIV",{class:!0});var Xt=u(I);b(Ne.$$.fragment,Xt),Ln=a(Xt),Pt=s(Xt,"P",{"data-svelte-h":!0}),p(Pt)!=="svelte-1ah1sdk"&&(Pt.innerHTML=Ds),zn=a(Xt),b(ie.$$.fragment,Xt),Xt.forEach(o),Qn=a(V),le=s(V,"DIV",{class:!0});var Go=u(le);b(De.$$.fragment,Go),Wn=a(Go),Et=s(Go,"P",{"data-svelte-h":!0}),p(Et)!=="svelte-awu8ei"&&(Et.innerHTML=Ss),Go.forEach(o),In=a(V),ce=s(V,"DIV",{class:!0});var Fo=u(ce);b(Se.$$.fragment,Fo),Hn=a(Fo),At=s(Fo,"P",{"data-svelte-h":!0}),p(At)!=="svelte-130urlt"&&(At.textContent=Rs),Fo.forEach(o),qn=a(V),de=s(V,"DIV",{class:!0});var Bo=u(de);b(Re.$$.fragment,Bo),Zn=a(Bo),Ut=s(Bo,"P",{"data-svelte-h":!0}),p(Ut)!=="svelte-19aywgj"&&(Ut.innerHTML=Gs),Bo.forEach(o),Nn=a(V),L=s(V,"DIV",{class:!0});var ve=u(L);b(Ge.$$.fragment,ve),Dn=a(ve),Lt=s(ve,"P",{"data-svelte-h":!0}),p(Lt)!=="svelte-1nmq94k"&&(Lt.textContent=Fs),Sn=a(ve),zt=s(ve,"P",{"data-svelte-h":!0}),p(zt)!=="svelte-1c3z8g4"&&(zt.textContent=Bs),Rn=a(ve),b(me.$$.fragment,ve),ve.forEach(o),V.forEach(o),Uo=a(e),G=s(e,"H2",{class:!0});var Xo=u(G);pe=s(Xo,"A",{id:!0,class:!0,href:!0});var br=u(pe);ro=s(br,"SPAN",{});var _r=u(ro);b(Fe.$$.fragment,_r),_r.forEach(o),br.forEach(o),Gn=a(Xo),Qt=s(Xo,"SPAN",{"data-svelte-h":!0}),p(Qt)!=="svelte-f4dolz"&&(Qt.textContent=Xs),Xo.forEach(o),Lo=a(e),U=s(e,"DIV",{class:!0});var xe=u(U);b(Be.$$.fragment,xe),Fn=a(xe),Wt=s(xe,"P",{"data-svelte-h":!0}),p(Wt)!=="svelte-1ewbg8g"&&(Wt.innerHTML=Ys),Bn=a(xe),ue=s(xe,"DIV",{class:!0});var Yo=u(ue);b(Xe.$$.fragment,Yo),Xn=a(Yo),It=s(Yo,"P",{"data-svelte-h":!0}),p(It)!=="svelte-1tv9c3k"&&(It.textContent=Ks),Yo.forEach(o),Yn=a(xe),he=s(xe,"DIV",{class:!0});var Ko=u(he);b(Ye.$$.fragment,Ko),Kn=a(Ko),Ht=s(Ko,"P",{"data-svelte-h":!0}),p(Ht)!=="svelte-6kqsha"&&(Ht.innerHTML=Os),Ko.forEach(o),xe.forEach(o),zo=a(e),F=s(e,"H2",{class:!0});var Oo=u(F);fe=s(Oo,"A",{id:!0,class:!0,href:!0});var vr=u(fe);ao=s(vr,"SPAN",{});var xr=u(ao);b(Ke.$$.fragment,xr),xr.forEach(o),vr.forEach(o),On=a(Oo),qt=s(Oo,"SPAN",{"data-svelte-h":!0}),p(qt)!=="svelte-1peuzl6"&&(qt.textContent=er),Oo.forEach(o),Qo=a(e),j=s(e,"DIV",{class:!0});var A=u(j);b(Oe.$$.fragment,A),es=a(A),Zt=s(A,"P",{"data-svelte-h":!0}),p(Zt)!=="svelte-ltbxkh"&&(Zt.innerHTML=tr),ts=a(A),Nt=s(A,"P",{"data-svelte-h":!0}),p(Nt)!=="svelte-ev63c"&&(Nt.innerHTML=or),os=a(A),Dt=s(A,"P",{"data-svelte-h":!0}),p(Dt)!=="svelte-hswkmf"&&(Dt.innerHTML=nr),ns=a(A),H=s(A,"DIV",{class:!0});var Yt=u(H);b(et.$$.fragment,Yt),ss=a(Yt),St=s(Yt,"P",{"data-svelte-h":!0}),p(St)!=="svelte-1bropk3"&&(St.innerHTML=sr),rs=a(Yt),b(ge.$$.fragment,Yt),Yt.forEach(o),as=a(A),be=s(A,"DIV",{class:!0});var en=u(be);b(tt.$$.fragment,en),is=a(en),Rt=s(en,"P",{"data-svelte-h":!0}),p(Rt)!=="svelte-14si36p"&&(Rt.innerHTML=rr),en.forEach(o),ls=a(A),_e=s(A,"DIV",{class:!0});var tn=u(_e);b(ot.$$.fragment,tn),cs=a(tn),Gt=s(tn,"P",{"data-svelte-h":!0}),p(Gt)!=="svelte-dyifa7"&&(Gt.innerHTML=ar),tn.forEach(o),A.forEach(o),Wo=a(e),io=s(e,"P",{}),u(io).forEach(o),this.h()},h(){m(d,"name","hf:doc:metadata"),m(d,"content",JSON.stringify(Ur)),m(i,"id","jukebox"),m(i,"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"),m(i,"href","#jukebox"),m(y,"class","relative group"),m(X,"id","overview"),m(X,"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"),m(X,"href","#overview"),m(q,"class","relative group"),m(Y,"id","transformers.JukeboxConfig"),m(Y,"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"),m(Y,"href","#transformers.JukeboxConfig"),m(Z,"class","relative group"),m(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ee,"id","transformers.JukeboxPriorConfig"),m(ee,"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"),m(ee,"href","#transformers.JukeboxPriorConfig"),m(N,"class","relative group"),m(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(te,"id","transformers.JukeboxVQVAEConfig"),m(te,"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"),m(te,"href","#transformers.JukeboxVQVAEConfig"),m(D,"class","relative group"),m(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(oe,"id","transformers.JukeboxTokenizer"),m(oe,"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"),m(oe,"href","#transformers.JukeboxTokenizer"),m(S,"class","relative group"),m(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ae,"id","transformers.JukeboxModel"),m(ae,"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"),m(ae,"href","#transformers.JukeboxModel"),m(R,"class","relative group"),m(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(pe,"id","transformers.JukeboxPrior"),m(pe,"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"),m(pe,"href","#transformers.JukeboxPrior"),m(G,"class","relative group"),m(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(fe,"id","transformers.JukeboxVQVAE"),m(fe,"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"),m(fe,"href","#transformers.JukeboxVQVAE"),m(F,"class","relative group"),m(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(be,"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,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(j,"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){t(document.head,d),c(e,J,l),c(e,h,l),c(e,f,l),c(e,y,l),t(y,i),t(i,C),_(ke,C,null),t(y,on),t(y,rt),c(e,fo,l),c(e,q,l),t(q,X),t(X,Ot),_(ye,Ot,null),t(q,nn),t(q,at),c(e,go,l),c(e,we,l),c(e,bo,l),c(e,Je,l),c(e,_o,l),c(e,$e,l),c(e,vo,l),c(e,Me,l),c(e,xo,l),c(e,Ce,l),c(e,ko,l),c(e,je,l),c(e,yo,l),c(e,Te,l),c(e,wo,l),c(e,Ve,l),c(e,Jo,l),c(e,Z,l),t(Z,Y),t(Y,eo),_(Pe,eo,null),t(Z,sn),t(Z,it),c(e,$o,l),c(e,P,l),_(Ee,P,null),t(P,rn),t(P,lt),t(P,an),t(P,ct),t(P,ln),t(P,dt),t(P,cn),_(K,P,null),t(P,dn),t(P,O),_(Ae,O,null),t(O,mn),t(O,mt),c(e,Mo,l),c(e,N,l),t(N,ee),t(ee,to),_(Ue,to,null),t(N,pn),t(N,pt),c(e,Co,l),c(e,Q,l),_(Le,Q,null),t(Q,un),t(Q,ut),t(Q,hn),t(Q,ht),c(e,jo,l),c(e,D,l),t(D,te),t(te,oo),_(ze,oo,null),t(D,fn),t(D,ft),c(e,To,l),c(e,W,l),_(Qe,W,null),t(W,gn),t(W,gt),t(W,bn),t(W,bt),c(e,Vo,l),c(e,S,l),t(S,oe),t(oe,no),_(We,no,null),t(S,_n),t(S,_t),c(e,Po,l),c(e,w,l),_(Ie,w,null),t(w,vn),t(w,vt),t(w,xn),t(w,xt),t(w,kn),t(w,kt),t(w,yn),t(w,yt),t(w,wn),_(ne,w,null),t(w,Jn),t(w,wt),t(w,$n),_(se,w,null),t(w,Mn),t(w,Jt),t(w,Cn),t(w,$t),t(w,jn),t(w,re),_(He,re,null),t(re,Tn),t(re,Mt),c(e,Eo,l),c(e,R,l),t(R,ae),t(ae,so),_(qe,so,null),t(R,Vn),t(R,Ct),c(e,Ao,l),c(e,$,l),_(Ze,$,null),t($,Pn),t($,jt),t($,En),t($,Tt),t($,An),t($,Vt),t($,Un),t($,I),_(Ne,I,null),t(I,Ln),t(I,Pt),t(I,zn),_(ie,I,null),t($,Qn),t($,le),_(De,le,null),t(le,Wn),t(le,Et),t($,In),t($,ce),_(Se,ce,null),t(ce,Hn),t(ce,At),t($,qn),t($,de),_(Re,de,null),t(de,Zn),t(de,Ut),t($,Nn),t($,L),_(Ge,L,null),t(L,Dn),t(L,Lt),t(L,Sn),t(L,zt),t(L,Rn),_(me,L,null),c(e,Uo,l),c(e,G,l),t(G,pe),t(pe,ro),_(Fe,ro,null),t(G,Gn),t(G,Qt),c(e,Lo,l),c(e,U,l),_(Be,U,null),t(U,Fn),t(U,Wt),t(U,Bn),t(U,ue),_(Xe,ue,null),t(ue,Xn),t(ue,It),t(U,Yn),t(U,he),_(Ye,he,null),t(he,Kn),t(he,Ht),c(e,zo,l),c(e,F,l),t(F,fe),t(fe,ao),_(Ke,ao,null),t(F,On),t(F,qt),c(e,Qo,l),c(e,j,l),_(Oe,j,null),t(j,es),t(j,Zt),t(j,ts),t(j,Nt),t(j,os),t(j,Dt),t(j,ns),t(j,H),_(et,H,null),t(H,ss),t(H,St),t(H,rs),_(ge,H,null),t(j,as),t(j,be),_(tt,be,null),t(be,is),t(be,Rt),t(j,ls),t(j,_e),_(ot,_e,null),t(_e,cs),t(_e,Gt),c(e,Wo,l),c(e,io,l),Io=!0},p(e,[l]){const nt={};l&2&&(nt.$$scope={dirty:l,ctx:e}),K.$set(nt);const lo={};l&2&&(lo.$$scope={dirty:l,ctx:e}),ne.$set(lo);const co={};l&2&&(co.$$scope={dirty:l,ctx:e}),se.$set(co);const st={};l&2&&(st.$$scope={dirty:l,ctx:e}),ie.$set(st);const mo={};l&2&&(mo.$$scope={dirty:l,ctx:e}),me.$set(mo);const po={};l&2&&(po.$$scope={dirty:l,ctx:e}),ge.$set(po)},i(e){Io||(v(ke.$$.fragment,e),v(ye.$$.fragment,e),v(Pe.$$.fragment,e),v(Ee.$$.fragment,e),v(K.$$.fragment,e),v(Ae.$$.fragment,e),v(Ue.$$.fragment,e),v(Le.$$.fragment,e),v(ze.$$.fragment,e),v(Qe.$$.fragment,e),v(We.$$.fragment,e),v(Ie.$$.fragment,e),v(ne.$$.fragment,e),v(se.$$.fragment,e),v(He.$$.fragment,e),v(qe.$$.fragment,e),v(Ze.$$.fragment,e),v(Ne.$$.fragment,e),v(ie.$$.fragment,e),v(De.$$.fragment,e),v(Se.$$.fragment,e),v(Re.$$.fragment,e),v(Ge.$$.fragment,e),v(me.$$.fragment,e),v(Fe.$$.fragment,e),v(Be.$$.fragment,e),v(Xe.$$.fragment,e),v(Ye.$$.fragment,e),v(Ke.$$.fragment,e),v(Oe.$$.fragment,e),v(et.$$.fragment,e),v(ge.$$.fragment,e),v(tt.$$.fragment,e),v(ot.$$.fragment,e),Io=!0)},o(e){x(ke.$$.fragment,e),x(ye.$$.fragment,e),x(Pe.$$.fragment,e),x(Ee.$$.fragment,e),x(K.$$.fragment,e),x(Ae.$$.fragment,e),x(Ue.$$.fragment,e),x(Le.$$.fragment,e),x(ze.$$.fragment,e),x(Qe.$$.fragment,e),x(We.$$.fragment,e),x(Ie.$$.fragment,e),x(ne.$$.fragment,e),x(se.$$.fragment,e),x(He.$$.fragment,e),x(qe.$$.fragment,e),x(Ze.$$.fragment,e),x(Ne.$$.fragment,e),x(ie.$$.fragment,e),x(De.$$.fragment,e),x(Se.$$.fragment,e),x(Re.$$.fragment,e),x(Ge.$$.fragment,e),x(me.$$.fragment,e),x(Fe.$$.fragment,e),x(Be.$$.fragment,e),x(Xe.$$.fragment,e),x(Ye.$$.fragment,e),x(Ke.$$.fragment,e),x(Oe.$$.fragment,e),x(et.$$.fragment,e),x(ge.$$.fragment,e),x(tt.$$.fragment,e),x(ot.$$.fragment,e),Io=!1},d(e){e&&(o(J),o(h),o(f),o(y),o(fo),o(q),o(go),o(we),o(bo),o(Je),o(_o),o($e),o(vo),o(Me),o(xo),o(Ce),o(ko),o(je),o(yo),o(Te),o(wo),o(Ve),o(Jo),o(Z),o($o),o(P),o(Mo),o(N),o(Co),o(Q),o(jo),o(D),o(To),o(W),o(Vo),o(S),o(Po),o(w),o(Eo),o(R),o(Ao),o($),o(Uo),o(G),o(Lo),o(U),o(zo),o(F),o(Qo),o(j),o(Wo),o(io)),o(d),k(ke),k(ye),k(Pe),k(Ee),k(K),k(Ae),k(Ue),k(Le),k(ze),k(Qe),k(We),k(Ie),k(ne),k(se),k(He),k(qe),k(Ze),k(Ne),k(ie),k(De),k(Se),k(Re),k(Ge),k(me),k(Fe),k(Be),k(Xe),k(Ye),k(Ke),k(Oe),k(et),k(ge),k(tt),k(ot)}}}const Ur={local:"jukebox",sections:[{local:"overview",title:"Overview"},{local:"transformers.JukeboxConfig",title:"JukeboxConfig"},{local:"transformers.JukeboxPriorConfig",title:"JukeboxPriorConfig"},{local:"transformers.JukeboxVQVAEConfig",title:"JukeboxVQVAEConfig"},{local:"transformers.JukeboxTokenizer",title:"JukeboxTokenizer"},{local:"transformers.JukeboxModel",title:"JukeboxModel"},{local:"transformers.JukeboxPrior",title:"JukeboxPrior"},{local:"transformers.JukeboxVQVAE",title:"JukeboxVQVAE"}],title:"Jukebox"};function Lr(E){return yr(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Nr extends wr{constructor(d){super(),Jr(this,d,Lr,Ar,kr,{})}}export{Nr as component};
