Buckets:
| import{s as Ae,o as Pe,n as De}from"../chunks/scheduler.53228c21.js";import{S as Ie,i as We,e as d,s as a,c as g,h as Re,a as c,d as t,b as s,f as O,g as _,j as v,k as z,l as h,m as i,n as y,t as b,o as T,p as w}from"../chunks/index.100fac89.js";import{C as Xe}from"../chunks/CopyLLMTxtMenu.ed6919ca.js";import{D as Me}from"../chunks/Docstring.1c305f7c.js";import{C as ve}from"../chunks/CodeBlock.d30a6509.js";import{E as Ge}from"../chunks/ExampleCodeBlock.6eee431e.js";import{H as ue,E as Ve}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.75de4b50.js";function Ne(Q){let l,C="If you get the error message below, you need to finetune the weights for your downstream task:",u,r,p;return r=new ve({props:{code:"U29tZSUyMHdlaWdodHMlMjBvZiUyMFVOZXQyRENvbmRpdGlvbk1vZGVsJTIwd2VyZSUyMG5vdCUyMGluaXRpYWxpemVkJTIwZnJvbSUyMHRoZSUyMG1vZGVsJTIwY2hlY2twb2ludCUyMGF0JTIwc3RhYmxlLWRpZmZ1c2lvbi12MS01JTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIwYW5kJTIwYXJlJTIwbmV3bHklMjBpbml0aWFsaXplZCUyMGJlY2F1c2UlMjB0aGUlMjBzaGFwZXMlMjBkaWQlMjBub3QlMjBtYXRjaCUzQSUwQS0lMjBjb252X2luLndlaWdodCUzQSUyMGZvdW5kJTIwc2hhcGUlMjB0b3JjaC5TaXplKCU1QjMyMCUyQyUyMDQlMkMlMjAzJTJDJTIwMyU1RCklMjBpbiUyMHRoZSUyMGNoZWNrcG9pbnQlMjBhbmQlMjB0b3JjaC5TaXplKCU1QjMyMCUyQyUyMDklMkMlMjAzJTJDJTIwMyU1RCklMjBpbiUyMHRoZSUyMG1vZGVsJTIwaW5zdGFudGlhdGVkJTBBWW91JTIwc2hvdWxkJTIwcHJvYmFibHklMjBUUkFJTiUyMHRoaXMlMjBtb2RlbCUyMG9uJTIwYSUyMGRvd24tc3RyZWFtJTIwdGFzayUyMHRvJTIwYmUlMjBhYmxlJTIwdG8lMjB1c2UlMjBpdCUyMGZvciUyMHByZWRpY3Rpb25zJTIwYW5kJTIwaW5mZXJlbmNlLg==",highlighted:`Some weights of UNet2DConditionModel were not initialized from the model checkpoint <span class="hljs-built_in">at</span> stable-<span class="hljs-keyword">diffusion-v1-5/stable-diffusion-v1-5 </span><span class="hljs-keyword">and </span>are newly initialized <span class="hljs-keyword">because </span>the <span class="hljs-keyword">shapes </span><span class="hljs-keyword">did </span>not match: | |
| - conv_in.weight: found <span class="hljs-keyword">shape </span>torch.Size([<span class="hljs-number">320</span>, <span class="hljs-number">4</span>, <span class="hljs-number">3</span>, <span class="hljs-number">3</span>]) in the checkpoint <span class="hljs-keyword">and </span>torch.Size([<span class="hljs-number">320</span>, <span class="hljs-number">9</span>, <span class="hljs-number">3</span>, <span class="hljs-number">3</span>]) in the model <span class="hljs-keyword">instantiated | |
| </span>You <span class="hljs-keyword">should </span>probably TRAIN this model on a down-stream task to <span class="hljs-keyword">be </span>able to use it for predictions <span class="hljs-keyword">and </span>inference.`,wrap:!1}}),{c(){l=d("p"),l.textContent=C,u=a(),g(r.$$.fragment)},l(n){l=c(n,"P",{"data-svelte-h":!0}),v(l)!=="svelte-xueb0m"&&(l.textContent=C),u=s(n),_(r.$$.fragment,n)},m(n,f){i(n,l,f),i(n,u,f),y(r,n,f),p=!0},p:De,i(n){p||(b(r.$$.fragment,n),p=!0)},o(n){T(r.$$.fragment,n),p=!1},d(n){n&&(t(l),t(u)),w(r,n)}}}function Se(Q){let l,C="Examples:",u,r,p;return r=new ve({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMERpZmZ1c2lvblBpcGVsaW5lJTBBJTBBJTIzJTIwRG93bmxvYWQlMjBwaXBlbGluZSUyMGZyb20lMjBodWdnaW5nZmFjZS5jbyUyMGFuZCUyMGNhY2hlLiUwQXBpcGVsaW5lJTIwJTNEJTIwRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUyMkNvbXBWaXMlMkZsZG0tdGV4dDJpbS1sYXJnZS0yNTYlMjIpJTBBJTBBJTIzJTIwRG93bmxvYWQlMjBwaXBlbGluZSUyMHRoYXQlMjByZXF1aXJlcyUyMGFuJTIwYXV0aG9yaXphdGlvbiUyMHRva2VuJTBBJTIzJTIwRm9yJTIwbW9yZSUyMGluZm9ybWF0aW9uJTIwb24lMjBhY2Nlc3MlMjB0b2tlbnMlMkMlMjBwbGVhc2UlMjByZWZlciUyMHRvJTIwdGhpcyUyMHNlY3Rpb24lMEElMjMlMjBvZiUyMHRoZSUyMGRvY3VtZW50YXRpb24lNUQoaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRvY3MlMkZodWIlMkZzZWN1cml0eS10b2tlbnMpJTBBcGlwZWxpbmUlMjAlM0QlMjBEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIyc3RhYmxlLWRpZmZ1c2lvbi12MS01JTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyKSUwQSUwQSUyMyUyMFVzZSUyMGElMjBkaWZmZXJlbnQlMjBzY2hlZHVsZXIlMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwTE1TRGlzY3JldGVTY2hlZHVsZXIlMEElMEFzY2hlZHVsZXIlMjAlM0QlMjBMTVNEaXNjcmV0ZVNjaGVkdWxlci5mcm9tX2NvbmZpZyhwaXBlbGluZS5zY2hlZHVsZXIuY29uZmlnKSUwQXBpcGVsaW5lLnNjaGVkdWxlciUyMCUzRCUyMHNjaGVkdWxlcg==",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Download pipeline from huggingface.co and cache.</span> | |
| <span class="hljs-meta">>>> </span>pipeline = DiffusionPipeline.from_pretrained(<span class="hljs-string">"CompVis/ldm-text2im-large-256"</span>) | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Download pipeline that requires an authorization token</span> | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># For more information on access tokens, please refer to this section</span> | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># of the documentation](https://huggingface.co/docs/hub/security-tokens)</span> | |
| <span class="hljs-meta">>>> </span>pipeline = DiffusionPipeline.from_pretrained(<span class="hljs-string">"stable-diffusion-v1-5/stable-diffusion-v1-5"</span>) | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Use a different scheduler</span> | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> LMSDiscreteScheduler | |
| <span class="hljs-meta">>>> </span>scheduler = LMSDiscreteScheduler.from_config(pipeline.scheduler.config) | |
| <span class="hljs-meta">>>> </span>pipeline.scheduler = scheduler`,wrap:!1}}),{c(){l=d("p"),l.textContent=C,u=a(),g(r.$$.fragment)},l(n){l=c(n,"P",{"data-svelte-h":!0}),v(l)!=="svelte-kvfsh7"&&(l.textContent=C),u=s(n),_(r.$$.fragment,n)},m(n,f){i(n,l,f),i(n,u,f),y(r,n,f),p=!0},p:De,i(n){p||(b(r.$$.fragment,n),p=!0)},o(n){T(r.$$.fragment,n),p=!1},d(n){n&&(t(l),t(u)),w(r,n)}}}function He(Q){let l,C,u,r,p,n,f,K,J,xe='LongCat-AudioDiT is a text-to-audio diffusion model from Meituan LongCat. The diffusers integration exposes a standard <a href="/docs/diffusers/pr_13481/en/api/pipelines/overview#diffusers.DiffusionPipeline">DiffusionPipeline</a> interface for text-conditioned audio generation.',ee,Z,Ce="This pipeline supports loading the original flat LongCat checkpoint layout from either a local directory or a Hugging Face Hub repository containing:",oe,L,je="<li><code>config.json</code></li> <li><code>model.safetensors</code></li>",te,B,$e="The loader builds the text encoder, transformer, and VAE from <code>config.json</code>, restores component weights from <code>model.safetensors</code>, and ties the shared UMT5 embedding when needed.",ne,G,Ue='This pipeline was adapted from the LongCat-AudioDiT reference implementation: <a href="https://github.com/meituan-longcat/LongCat-AudioDiT" rel="nofollow">https://github.com/meituan-longcat/LongCat-AudioDiT</a>',ie,D,ae,A,se,P,le,I,ke="<li><code>audio_end_in_s</code> is the most direct way to control output duration.</li> <li><code>output_type="pt"</code> returns a PyTorch tensor shaped <code>(batch, channels, samples)</code>.</li>",re,W,de,x,R,fe,$,X,he,Y,Je="Function invoked when calling the pipeline for generation.",ge,m,V,_e,F,Ze="Instantiate a PyTorch diffusion pipeline from pretrained pipeline weights.",ye,E,Le="The pipeline is set in evaluation mode (<code>model.eval()</code>) by default.",be,U,Te,N,Be=`<p>> To use private or <a href="https://huggingface.co/docs/hub/models-gated#gated-models" rel="nofollow">gated</a> models, log-in | |
| with <code>hf > auth login</code>.</p>`,we,k,ce,S,pe,q,me;return p=new Xe({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),f=new ue({props:{title:"LongCat-AudioDiT",local:"longcat-audiodit",headingTag:"h1"}}),D=new ue({props:{title:"Usage",local:"usage",headingTag:"h2"}}),A=new ve({props:{code:"aW1wb3J0JTIwc291bmRmaWxlJTIwYXMlMjBzZiUwQWltcG9ydCUyMHRvcmNoJTBBZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMExvbmdDYXRBdWRpb0RpVFBpcGVsaW5lJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBMb25nQ2F0QXVkaW9EaVRQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIybWVpdHVhbi1sb25nY2F0JTJGTG9uZ0NhdC1BdWRpb0RpVC0xQiUyMiUyQyUwQSUyMCUyMCUyMCUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUyQyUwQSklMEFwaXBlbGluZSUyMCUzRCUyMHBpcGVsaW5lLnRvKCUyMmN1ZGElMjIpJTBBJTBBYXVkaW8lMjAlM0QlMjBwaXBlbGluZSglMEElMjAlMjAlMjAlMjBwcm9tcHQlM0QlMjJBJTIwY2FsbSUyMG9jZWFuJTIwd2F2ZSUyMGFtYmllbmNlJTIwd2l0aCUyMHNvZnQlMjB3aW5kJTIwaW4lMjB0aGUlMjBiYWNrZ3JvdW5kLiUyMiUyQyUwQSUyMCUyMCUyMCUyMGF1ZGlvX2VuZF9pbl9zJTNENS4wJTJDJTBBJTIwJTIwJTIwJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDE2JTJDJTBBJTIwJTIwJTIwJTIwZ3VpZGFuY2Vfc2NhbGUlM0Q0LjAlMkMlMEElMjAlMjAlMjAlMjBvdXRwdXRfdHlwZSUzRCUyMnB0JTIyJTJDJTBBKS5hdWRpb3MlMEElMEFvdXRwdXQlMjAlM0QlMjBhdWRpbyU1QjAlMkMlMjAwJTVELmZsb2F0KCkuY3B1KCkubnVtcHkoKSUwQXNmLndyaXRlKCUyMmxvbmdjYXQud2F2JTIyJTJDJTIwb3V0cHV0JTJDJTIwcGlwZWxpbmUuc2FtcGxlX3JhdGUp",highlighted:`<span class="hljs-keyword">import</span> soundfile <span class="hljs-keyword">as</span> sf | |
| <span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> LongCatAudioDiTPipeline | |
| pipeline = LongCatAudioDiTPipeline.from_pretrained( | |
| <span class="hljs-string">"meituan-longcat/LongCat-AudioDiT-1B"</span>, | |
| torch_dtype=torch.float16, | |
| ) | |
| pipeline = pipeline.to(<span class="hljs-string">"cuda"</span>) | |
| audio = pipeline( | |
| prompt=<span class="hljs-string">"A calm ocean wave ambience with soft wind in the background."</span>, | |
| audio_end_in_s=<span class="hljs-number">5.0</span>, | |
| num_inference_steps=<span class="hljs-number">16</span>, | |
| guidance_scale=<span class="hljs-number">4.0</span>, | |
| output_type=<span class="hljs-string">"pt"</span>, | |
| ).audios | |
| output = audio[<span class="hljs-number">0</span>, <span class="hljs-number">0</span>].<span class="hljs-built_in">float</span>().cpu().numpy() | |
| sf.write(<span class="hljs-string">"longcat.wav"</span>, output, pipeline.sample_rate)`,wrap:!1}}),P=new ue({props:{title:"Tips",local:"tips",headingTag:"h2"}}),W=new ue({props:{title:"LongCatAudioDiTPipeline",local:"diffusers.LongCatAudioDiTPipeline",headingTag:"h2"}}),R=new Me({props:{name:"class diffusers.LongCatAudioDiTPipeline",anchor:"diffusers.LongCatAudioDiTPipeline",parameters:[{name:"vae",val:": LongCatAudioDiTVae"},{name:"text_encoder",val:": UMT5EncoderModel"},{name:"tokenizer",val:": PreTrainedTokenizerBase"},{name:"transformer",val:": LongCatAudioDiTTransformer"},{name:"scheduler",val:": diffusers.schedulers.scheduling_flow_match_euler_discrete.FlowMatchEulerDiscreteScheduler | None = None"}],source:"https://github.com/huggingface/diffusers/blob/vr_13481/src/diffusers/pipelines/longcat_audio_dit/pipeline_longcat_audio_dit.py#L76"}}),X=new Me({props:{name:"__call__",anchor:"diffusers.LongCatAudioDiTPipeline.__call__",parameters:[{name:"prompt",val:": str | list[str]"},{name:"negative_prompt",val:": str | list[str] | None = None"},{name:"audio_duration_s",val:": float | None = None"},{name:"latents",val:": torch.Tensor | None = None"},{name:"num_inference_steps",val:": int = 16"},{name:"guidance_scale",val:": float = 4.0"},{name:"generator",val:": torch._C.Generator | list[torch._C.Generator] | None = None"},{name:"output_type",val:": str = 'np'"},{name:"return_dict",val:": bool = True"},{name:"callback_on_step_end",val:": typing.Optional[typing.Callable[[int, int], NoneType]] = None"},{name:"callback_on_step_end_tensor_inputs",val:": list = ['latents']"}],parametersDescription:[{anchor:"diffusers.LongCatAudioDiTPipeline.__call__.prompt",description:"<strong>prompt</strong> (<code>str</code> or <code>list[str]</code>) — Prompt or prompts that guide audio generation.",name:"prompt"},{anchor:"diffusers.LongCatAudioDiTPipeline.__call__.negative_prompt",description:"<strong>negative_prompt</strong> (<code>str</code> or <code>list[str]</code>, <em>optional</em>) — Negative prompt(s) for classifier-free guidance.",name:"negative_prompt"},{anchor:"diffusers.LongCatAudioDiTPipeline.__call__.audio_duration_s",description:`<strong>audio_duration_s</strong> (<code>float</code>, <em>optional</em>) — | |
| Target audio duration in seconds. Ignored when <code>latents</code> is provided.`,name:"audio_duration_s"},{anchor:"diffusers.LongCatAudioDiTPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated noisy latents of shape <code>(batch_size, duration, latent_dim)</code>.`,name:"latents"},{anchor:"diffusers.LongCatAudioDiTPipeline.__call__.num_inference_steps",description:"<strong>num_inference_steps</strong> (<code>int</code>, defaults to 16) — Number of denoising steps.",name:"num_inference_steps"},{anchor:"diffusers.LongCatAudioDiTPipeline.__call__.guidance_scale",description:"<strong>guidance_scale</strong> (<code>float</code>, defaults to 4.0) — Guidance scale for classifier-free guidance.",name:"guidance_scale"},{anchor:"diffusers.LongCatAudioDiTPipeline.__call__.generator",description:"<strong>generator</strong> (<code>torch.Generator</code> or <code>list[torch.Generator]</code>, <em>optional</em>) — Random generator(s).",name:"generator"},{anchor:"diffusers.LongCatAudioDiTPipeline.__call__.output_type",description:"<strong>output_type</strong> (<code>str</code>, defaults to <code>"np"</code>) — Output format: <code>"np"</code>, <code>"pt"</code>, or <code>"latent"</code>.",name:"output_type"},{anchor:"diffusers.LongCatAudioDiTPipeline.__call__.return_dict",description:"<strong>return_dict</strong> (<code>bool</code>, defaults to <code>True</code>) — Whether to return <code>AudioPipelineOutput</code>.",name:"return_dict"},{anchor:"diffusers.LongCatAudioDiTPipeline.__call__.callback_on_step_end",description:`<strong>callback_on_step_end</strong> (<code>Callable</code>, <em>optional</em>) — | |
| A function called at the end of each denoising step with the pipeline, step index, timestep, and tensor | |
| inputs specified by <code>callback_on_step_end_tensor_inputs</code>.`,name:"callback_on_step_end"},{anchor:"diffusers.LongCatAudioDiTPipeline.__call__.callback_on_step_end_tensor_inputs",description:`<strong>callback_on_step_end_tensor_inputs</strong> (<code>list</code>, defaults to <code>["latents"]</code>) — | |
| Tensor inputs passed to <code>callback_on_step_end</code>.`,name:"callback_on_step_end_tensor_inputs"}],source:"https://github.com/huggingface/diffusers/blob/vr_13481/src/diffusers/pipelines/longcat_audio_dit/pipeline_longcat_audio_dit.py#L196"}}),V=new Me({props:{name:"from_pretrained",anchor:"diffusers.LongCatAudioDiTPipeline.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": str | os.PathLike"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.LongCatAudioDiTPipeline.from_pretrained.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>, <em>optional</em>) — | |
| Can be either:</p> | |
| <ul> | |
| <li>A string, the <em>repo id</em> (for example <code>CompVis/ldm-text2im-large-256</code>) of a pretrained pipeline | |
| hosted on the Hub.</li> | |
| <li>A path to a <em>directory</em> (for example <code>./my_pipeline_directory/</code>) containing pipeline weights | |
| saved using | |
| <a href="/docs/diffusers/pr_13481/en/api/pipelines/overview#diffusers.DiffusionPipeline.save_pretrained">save_pretrained()</a>.</li> | |
| <li>A path to a <em>directory</em> (for example <code>./my_pipeline_directory/</code>) containing a dduf file</li> | |
| </ul>`,name:"pretrained_model_name_or_path"},{anchor:"diffusers.LongCatAudioDiTPipeline.from_pretrained.torch_dtype",description:`<strong>torch_dtype</strong> (<code>torch.dtype</code> or <code>dict[str, Union[str, torch.dtype]]</code>, <em>optional</em>) — | |
| Override the default <code>torch.dtype</code> and load the model with another dtype. To load submodels with | |
| different dtype pass a <code>dict</code> (for example <code>{'transformer': torch.bfloat16, 'vae': torch.float16}</code>). | |
| Set the default dtype for unspecified components with <code>default</code> (for example <code>{'transformer': torch.bfloat16, 'default': torch.float16}</code>). If a component is not specified and no default is set, | |
| <code>torch.float32</code> is used.`,name:"torch_dtype"},{anchor:"diffusers.LongCatAudioDiTPipeline.from_pretrained.custom_pipeline",description:`<strong>custom_pipeline</strong> (<code>str</code>, <em>optional</em>) —</p> | |
| <blockquote class="warning"> | |
| <p>> 🧪 This is an experimental feature and may change in the future.</p> | |
| </blockquote> | |
| <p>Can be either:</p> | |
| <ul> | |
| <li>A string, the <em>repo id</em> (for example <code>hf-internal-testing/diffusers-dummy-pipeline</code>) of a custom | |
| pipeline hosted on the Hub. The repository must contain a file called pipeline.py that defines | |
| the custom pipeline.</li> | |
| <li>A string, the <em>file name</em> of a community pipeline hosted on GitHub under | |
| <a href="https://github.com/huggingface/diffusers/tree/main/examples/community" rel="nofollow">Community</a>. Valid file | |
| names must match the file name and not the pipeline script (<code>clip_guided_stable_diffusion</code> | |
| instead of <code>clip_guided_stable_diffusion.py</code>). Community pipelines are always loaded from the | |
| current main branch of GitHub.</li> | |
| <li>A path to a directory (<code>./my_pipeline_directory/</code>) containing a custom pipeline. The directory | |
| must contain a file called <code>pipeline.py</code> that defines the custom pipeline.</li> | |
| </ul> | |
| <p>For more information on how to load and create custom pipelines, please have a look at <a href="https://huggingface.co/docs/diffusers/using-diffusers/custom_pipeline_overview" rel="nofollow">Loading and | |
| Adding Custom | |
| Pipelines</a>`,name:"custom_pipeline"},{anchor:"diffusers.LongCatAudioDiTPipeline.from_pretrained.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — | |
| Whether or not to force the (re-)download of the model weights and configuration files, overriding the | |
| cached versions if they exist.`,name:"force_download"},{anchor:"diffusers.LongCatAudioDiTPipeline.from_pretrained.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) — | |
| Path to a directory where a downloaded pretrained model configuration is cached if the standard cache | |
| is not used.`,name:"cache_dir"},{anchor:"diffusers.LongCatAudioDiTPipeline.from_pretrained.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) — | |
| A dictionary of proxy servers to use by protocol or endpoint, for example, <code>{'http': 'foo.bar:3128', 'http://hostname': 'foo.bar:4012'}</code>. The proxies are used on each request.`,name:"proxies"},{anchor:"diffusers.LongCatAudioDiTPipeline.from_pretrained.output_loading_info(bool,",description:`<strong>output_loading_info(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>False</code>) — | |
| Whether or not to also return a dictionary containing missing keys, unexpected keys and error messages.`,name:"output_loading_info(bool,"},{anchor:"diffusers.LongCatAudioDiTPipeline.from_pretrained.local_files_only",description:`<strong>local_files_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — | |
| Whether to only load local model weights and configuration files or not. If set to <code>True</code>, the model | |
| won’t be downloaded from the Hub.`,name:"local_files_only"},{anchor:"diffusers.LongCatAudioDiTPipeline.from_pretrained.token",description:`<strong>token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) — | |
| The token to use as HTTP bearer authorization for remote files. If <code>True</code>, the token generated from | |
| <code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>) is used.`,name:"token"},{anchor:"diffusers.LongCatAudioDiTPipeline.from_pretrained.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>"main"</code>) — | |
| The specific model version to use. It can be a branch name, a tag name, a commit id, or any identifier | |
| allowed by Git.`,name:"revision"},{anchor:"diffusers.LongCatAudioDiTPipeline.from_pretrained.custom_revision",description:`<strong>custom_revision</strong> (<code>str</code>, <em>optional</em>) — | |
| The specific model version to use. It can be a branch name, a tag name, or a commit id similar to | |
| <code>revision</code> when loading a custom pipeline from the Hub. Defaults to the latest stable 🤗 Diffusers | |
| version.`,name:"custom_revision"},{anchor:"diffusers.LongCatAudioDiTPipeline.from_pretrained.mirror",description:`<strong>mirror</strong> (<code>str</code>, <em>optional</em>) — | |
| Mirror source to resolve accessibility issues if you’re downloading a model in China. We do not | |
| guarantee the timeliness or safety of the source, and you should refer to the mirror site for more | |
| information.`,name:"mirror"},{anchor:"diffusers.LongCatAudioDiTPipeline.from_pretrained.device_map",description:`<strong>device_map</strong> (<code>str</code>, <em>optional</em>) — | |
| Strategy that dictates how the different components of a pipeline should be placed on available | |
| devices. Currently, only “balanced” <code>device_map</code> is supported. Check out | |
| <a href="https://huggingface.co/docs/diffusers/main/en/tutorials/inference_with_big_models#device-placement" rel="nofollow">this</a> | |
| to know more.`,name:"device_map"},{anchor:"diffusers.LongCatAudioDiTPipeline.from_pretrained.max_memory",description:`<strong>max_memory</strong> (<code>Dict</code>, <em>optional</em>) — | |
| A dictionary device identifier for the maximum memory. Will default to the maximum memory available for | |
| each GPU and the available CPU RAM if unset.`,name:"max_memory"},{anchor:"diffusers.LongCatAudioDiTPipeline.from_pretrained.offload_folder",description:`<strong>offload_folder</strong> (<code>str</code> or <code>os.PathLike</code>, <em>optional</em>) — | |
| The path to offload weights if device_map contains the value <code>"disk"</code>.`,name:"offload_folder"},{anchor:"diffusers.LongCatAudioDiTPipeline.from_pretrained.offload_state_dict",description:`<strong>offload_state_dict</strong> (<code>bool</code>, <em>optional</em>) — | |
| If <code>True</code>, temporarily offloads the CPU state dict to the hard drive to avoid running out of CPU RAM if | |
| the weight of the CPU state dict + the biggest shard of the checkpoint does not fit. Defaults to <code>True</code> | |
| when there is some disk offload.`,name:"offload_state_dict"},{anchor:"diffusers.LongCatAudioDiTPipeline.from_pretrained.low_cpu_mem_usage",description:`<strong>low_cpu_mem_usage</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code> if torch version >= 1.9.0 else <code>False</code>) — | |
| Speed up model loading only loading the pretrained weights and not initializing the weights. This also | |
| tries to not use more than 1x model size in CPU memory (including peak memory) while loading the model. | |
| Only supported for PyTorch >= 1.9.0. If you are using an older version of PyTorch, setting this | |
| argument to <code>True</code> will raise an error.`,name:"low_cpu_mem_usage"},{anchor:"diffusers.LongCatAudioDiTPipeline.from_pretrained.use_safetensors",description:`<strong>use_safetensors</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) — | |
| If set to <code>None</code>, the safetensors weights are downloaded if they’re available <strong>and</strong> if the | |
| safetensors library is installed. If set to <code>True</code>, the model is forcibly loaded from safetensors | |
| weights. If set to <code>False</code>, safetensors weights are not loaded.`,name:"use_safetensors"},{anchor:"diffusers.LongCatAudioDiTPipeline.from_pretrained.use_onnx",description:`<strong>use_onnx</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) — | |
| If set to <code>True</code>, ONNX weights will always be downloaded if present. If set to <code>False</code>, ONNX weights | |
| will never be downloaded. By default <code>use_onnx</code> defaults to the <code>_is_onnx</code> class attribute which is | |
| <code>False</code> for non-ONNX pipelines and <code>True</code> for ONNX pipelines. ONNX weights include both files ending | |
| with <code>.onnx</code> and <code>.pb</code>.`,name:"use_onnx"},{anchor:"diffusers.LongCatAudioDiTPipeline.from_pretrained.kwargs",description:`<strong>kwargs</strong> (remaining dictionary of keyword arguments, <em>optional</em>) — | |
| Can be used to overwrite load and saveable variables (the pipeline components of the specific pipeline | |
| class). The overwritten components are passed directly to the pipelines <code>__init__</code> method. See example | |
| below for more information.`,name:"kwargs"},{anchor:"diffusers.LongCatAudioDiTPipeline.from_pretrained.variant",description:`<strong>variant</strong> (<code>str</code>, <em>optional</em>) — | |
| Load weights from a specified variant filename such as <code>"fp16"</code> or <code>"ema"</code>. This is ignored when | |
| loading <code>from_flax</code>.`,name:"variant"},{anchor:"diffusers.LongCatAudioDiTPipeline.from_pretrained.dduf_file(str,",description:`<strong>dduf_file(<code>str</code>,</strong> <em>optional</em>) — | |
| Load weights from the specified dduf file.`,name:"dduf_file(str,"},{anchor:"diffusers.LongCatAudioDiTPipeline.from_pretrained.disable_mmap",description:`<strong>disable_mmap</strong> (‘bool’, <em>optional</em>, defaults to ‘False’) — | |
| Whether to disable mmap when loading a Safetensors model. This option can perform better when the model | |
| is on a network mount or hard drive, which may not handle the seeky-ness of mmap very well.`,name:"disable_mmap"}],source:"https://github.com/huggingface/diffusers/blob/vr_13481/src/diffusers/pipelines/pipeline_utils.py#L616"}}),U=new Ge({props:{anchor:"diffusers.LongCatAudioDiTPipeline.from_pretrained.example",$$slots:{default:[Ne]},$$scope:{ctx:Q}}}),k=new Ge({props:{anchor:"diffusers.LongCatAudioDiTPipeline.from_pretrained.example-2",$$slots:{default:[Se]},$$scope:{ctx:Q}}}),S=new Ve({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/longcat_audio_dit.md"}}),{c(){l=d("meta"),C=a(),u=d("p"),r=a(),g(p.$$.fragment),n=a(),g(f.$$.fragment),K=a(),J=d("p"),J.innerHTML=xe,ee=a(),Z=d("p"),Z.textContent=Ce,oe=a(),L=d("ul"),L.innerHTML=je,te=a(),B=d("p"),B.innerHTML=$e,ne=a(),G=d("p"),G.innerHTML=Ue,ie=a(),g(D.$$.fragment),ae=a(),g(A.$$.fragment),se=a(),g(P.$$.fragment),le=a(),I=d("ul"),I.innerHTML=ke,re=a(),g(W.$$.fragment),de=a(),x=d("div"),g(R.$$.fragment),fe=a(),$=d("div"),g(X.$$.fragment),he=a(),Y=d("p"),Y.textContent=Je,ge=a(),m=d("div"),g(V.$$.fragment),_e=a(),F=d("p"),F.textContent=Ze,ye=a(),E=d("p"),E.innerHTML=Le,be=a(),g(U.$$.fragment),Te=a(),N=d("blockquote"),N.innerHTML=Be,we=a(),g(k.$$.fragment),ce=a(),g(S.$$.fragment),pe=a(),q=d("p"),this.h()},l(e){const o=Re("svelte-u9bgzb",document.head);l=c(o,"META",{name:!0,content:!0}),o.forEach(t),C=s(e),u=c(e,"P",{}),O(u).forEach(t),r=s(e),_(p.$$.fragment,e),n=s(e),_(f.$$.fragment,e),K=s(e),J=c(e,"P",{"data-svelte-h":!0}),v(J)!=="svelte-xj8kdg"&&(J.innerHTML=xe),ee=s(e),Z=c(e,"P",{"data-svelte-h":!0}),v(Z)!=="svelte-16hcbj4"&&(Z.textContent=Ce),oe=s(e),L=c(e,"UL",{"data-svelte-h":!0}),v(L)!=="svelte-11frvmw"&&(L.innerHTML=je),te=s(e),B=c(e,"P",{"data-svelte-h":!0}),v(B)!=="svelte-1nz4bub"&&(B.innerHTML=$e),ne=s(e),G=c(e,"P",{"data-svelte-h":!0}),v(G)!=="svelte-1th8ail"&&(G.innerHTML=Ue),ie=s(e),_(D.$$.fragment,e),ae=s(e),_(A.$$.fragment,e),se=s(e),_(P.$$.fragment,e),le=s(e),I=c(e,"UL",{"data-svelte-h":!0}),v(I)!=="svelte-ykt8pg"&&(I.innerHTML=ke),re=s(e),_(W.$$.fragment,e),de=s(e),x=c(e,"DIV",{class:!0});var j=O(x);_(R.$$.fragment,j),fe=s(j),$=c(j,"DIV",{class:!0});var H=O($);_(X.$$.fragment,H),he=s(H),Y=c(H,"P",{"data-svelte-h":!0}),v(Y)!=="svelte-v78lg8"&&(Y.textContent=Je),H.forEach(t),ge=s(j),m=c(j,"DIV",{class:!0});var M=O(m);_(V.$$.fragment,M),_e=s(M),F=c(M,"P",{"data-svelte-h":!0}),v(F)!=="svelte-ccbjek"&&(F.textContent=Ze),ye=s(M),E=c(M,"P",{"data-svelte-h":!0}),v(E)!=="svelte-1p5vgmd"&&(E.innerHTML=Le),be=s(M),_(U.$$.fragment,M),Te=s(M),N=c(M,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),v(N)!=="svelte-zg8xkk"&&(N.innerHTML=Be),we=s(M),_(k.$$.fragment,M),M.forEach(t),j.forEach(t),ce=s(e),_(S.$$.fragment,e),pe=s(e),q=c(e,"P",{}),O(q).forEach(t),this.h()},h(){z(l,"name","hf:doc:metadata"),z(l,"content",Qe),z($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),z(N,"class","tip"),z(m,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),z(x,"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,o){h(document.head,l),i(e,C,o),i(e,u,o),i(e,r,o),y(p,e,o),i(e,n,o),y(f,e,o),i(e,K,o),i(e,J,o),i(e,ee,o),i(e,Z,o),i(e,oe,o),i(e,L,o),i(e,te,o),i(e,B,o),i(e,ne,o),i(e,G,o),i(e,ie,o),y(D,e,o),i(e,ae,o),y(A,e,o),i(e,se,o),y(P,e,o),i(e,le,o),i(e,I,o),i(e,re,o),y(W,e,o),i(e,de,o),i(e,x,o),y(R,x,null),h(x,fe),h(x,$),y(X,$,null),h($,he),h($,Y),h(x,ge),h(x,m),y(V,m,null),h(m,_e),h(m,F),h(m,ye),h(m,E),h(m,be),y(U,m,null),h(m,Te),h(m,N),h(m,we),y(k,m,null),i(e,ce,o),y(S,e,o),i(e,pe,o),i(e,q,o),me=!0},p(e,[o]){const j={};o&2&&(j.$$scope={dirty:o,ctx:e}),U.$set(j);const H={};o&2&&(H.$$scope={dirty:o,ctx:e}),k.$set(H)},i(e){me||(b(p.$$.fragment,e),b(f.$$.fragment,e),b(D.$$.fragment,e),b(A.$$.fragment,e),b(P.$$.fragment,e),b(W.$$.fragment,e),b(R.$$.fragment,e),b(X.$$.fragment,e),b(V.$$.fragment,e),b(U.$$.fragment,e),b(k.$$.fragment,e),b(S.$$.fragment,e),me=!0)},o(e){T(p.$$.fragment,e),T(f.$$.fragment,e),T(D.$$.fragment,e),T(A.$$.fragment,e),T(P.$$.fragment,e),T(W.$$.fragment,e),T(R.$$.fragment,e),T(X.$$.fragment,e),T(V.$$.fragment,e),T(U.$$.fragment,e),T(k.$$.fragment,e),T(S.$$.fragment,e),me=!1},d(e){e&&(t(C),t(u),t(r),t(n),t(K),t(J),t(ee),t(Z),t(oe),t(L),t(te),t(B),t(ne),t(G),t(ie),t(ae),t(se),t(le),t(I),t(re),t(de),t(x),t(ce),t(pe),t(q)),t(l),w(p,e),w(f,e),w(D,e),w(A,e),w(P,e),w(W,e),w(R),w(X),w(V),w(U),w(k),w(S,e)}}}const Qe='{"title":"LongCat-AudioDiT","local":"longcat-audiodit","sections":[{"title":"Usage","local":"usage","sections":[],"depth":2},{"title":"Tips","local":"tips","sections":[],"depth":2},{"title":"LongCatAudioDiTPipeline","local":"diffusers.LongCatAudioDiTPipeline","sections":[],"depth":2}],"depth":1}';function Ye(Q){return Pe(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class oo extends Ie{constructor(l){super(),We(this,l,Ye,He,Ae,{})}}export{oo as component}; | |
Xet Storage Details
- Size:
- 31 kB
- Xet hash:
- 267fd4b73e4a91c44ef91af6be5be3d0dc784882c727efc8b7ed7e0c0cdfd695
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.