Buckets:
| import{s as We,o as Re,n as qe}from"../chunks/scheduler.53228c21.js";import{S as ze,i as Ye,e as l,s as a,c as d,h as Ve,a as i,d as n,b as s,f as O,g as c,j as h,k as L,l as J,m as o,n as m,t as u,o as f,p as g}from"../chunks/index.cac5d66a.js";import{C as He}from"../chunks/CopyLLMTxtMenu.c9892084.js";import{D as Ze}from"../chunks/Docstring.6d051794.js";import{C as Je}from"../chunks/CodeBlock.606cbaf4.js";import{E as Se}from"../chunks/ExampleCodeBlock.b469abd9.js";import{H as Me,E as De}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.af4accee.js";function Le(ee){let p,k="Examples:",T,_,w;return _=new Je({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQXVyYUZsb3dQaXBlbGluZSUwQSUwQXBpcGUlMjAlM0QlMjBBdXJhRmxvd1BpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMjJmYWwlMkZBdXJhRmxvdyUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiklMEFwaXBlJTIwJTNEJTIwcGlwZS50byglMjJjdWRhJTIyKSUwQXByb21wdCUyMCUzRCUyMCUyMkElMjBjYXQlMjBob2xkaW5nJTIwYSUyMHNpZ24lMjB0aGF0JTIwc2F5cyUyMGhlbGxvJTIwd29ybGQlMjIlMEFpbWFnZSUyMCUzRCUyMHBpcGUocHJvbXB0KS5pbWFnZXMlNUIwJTVEJTBBaW1hZ2Uuc2F2ZSglMjJhdXJhX2Zsb3cucG5nJTIyKQ==",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AuraFlowPipeline | |
| <span class="hljs-meta">>>> </span>pipe = AuraFlowPipeline.from_pretrained(<span class="hljs-string">"fal/AuraFlow"</span>, torch_dtype=torch.float16) | |
| <span class="hljs-meta">>>> </span>pipe = pipe.to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-meta">>>> </span>prompt = <span class="hljs-string">"A cat holding a sign that says hello world"</span> | |
| <span class="hljs-meta">>>> </span>image = pipe(prompt).images[<span class="hljs-number">0</span>] | |
| <span class="hljs-meta">>>> </span>image.save(<span class="hljs-string">"aura_flow.png"</span>)`,lang:"py",wrap:!1}}),{c(){p=l("p"),p.textContent=k,T=a(),d(_.$$.fragment)},l(r){p=i(r,"P",{"data-svelte-h":!0}),h(p)!=="svelte-kvfsh7"&&(p.textContent=k),T=s(r),c(_.$$.fragment,r)},m(r,b){o(r,p,b),o(r,T,b),m(_,r,b),w=!0},p:qe,i(r){w||(u(_.$$.fragment,r),w=!0)},o(r){f(_.$$.fragment,r),w=!1},d(r){r&&(n(p),n(T)),g(_,r)}}}function Ke(ee){let p,k,T,_,w,r,b,te,Z,Ae='AuraFlow is inspired by <a href="../pipelines/stable_diffusion/stable_diffusion_3">Stable Diffusion 3</a> and is by far the largest text-to-image generation model that comes with an Apache 2.0 license. This model achieves state-of-the-art results on the <a href="https://github.com/djghosh13/geneval" rel="nofollow">GenEval</a> benchmark.',ne,A,Ce='It was developed by the Fal team and more details about it can be found in <a href="https://blog.fal.ai/auraflow/" rel="nofollow">this blog post</a>.',oe,x,$e='<p>AuraFlow can be quite expensive to run on consumer hardware devices. However, you can perform a suite of optimizations to run it faster and in a more memory-friendly manner. Check out <a href="https://huggingface.co/blog/sd3#memory-optimizations-for-sd3" rel="nofollow">this section</a> for more details.</p>',ae,C,se,$,Ie="Quantization helps reduce the memory requirements of very large models by storing model weights in a lower precision data type. However, quantization may have varying impact on video quality depending on the video model.",re,I,je='Refer to the <a href="../../quantization/overview">Quantization</a> overview to learn more about supported quantization backends and selecting a quantization backend that supports your use case. The example below demonstrates how to load a quantized <a href="/docs/diffusers/pr_14045/en/api/pipelines/aura_flow#diffusers.AuraFlowPipeline">AuraFlowPipeline</a> for inference with bitsandbytes.',le,j,ie,B,Be='Loading <a href="https://huggingface.co/docs/diffusers/quantization/gguf" rel="nofollow">GGUF checkpoints</a> are also supported:',pe,G,de,N,ce,P,Ge='AuraFlow can be compiled with <code>torch.compile()</code> to speed up inference latency even for different resolutions. First, install PyTorch nightly following the instructions from <a href="https://pytorch.org/" rel="nofollow">here</a>. The snippet below shows the changes needed to enable this:',me,X,ue,E,Ne='Specifying <code>use_duck_shape</code> to be <code>False</code> instructs the compiler if it should use the same symbolic variable to represent input sizes that are the same. For more details, check out <a href="https://github.com/huggingface/diffusers/pull/11327#discussion_r2047659790" rel="nofollow">this comment</a>.',fe,Q,Pe="This enables from 100% (on low resolutions) to a 30% (on 1536x1536 resolution) speed improvements.",ge,W,Xe='Thanks to <a href="https://github.com/huggingface/diffusers/pull/11297/" rel="nofollow">AstraliteHeart</a> who helped us rewrite the <a href="/docs/diffusers/pr_14045/en/api/models/aura_flow_transformer2d#diffusers.AuraFlowTransformer2DModel">AuraFlowTransformer2DModel</a> class so that the above works for different resolutions (<a href="https://github.com/huggingface/diffusers/pull/11297/" rel="nofollow">PR</a>).',he,R,_e,y,q,ve,M,z,xe,H,Ee="Function invoked when calling the pipeline for generation.",Fe,F,Ue,U,Y,ke,S,Qe="Encodes the prompt into text encoder hidden states.",we,V,be,K,ye;return w=new He({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),b=new Me({props:{title:"AuraFlow",local:"auraflow",headingTag:"h1"}}),C=new Me({props:{title:"Quantization",local:"quantization",headingTag:"h2"}}),j=new Je({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQml0c0FuZEJ5dGVzQ29uZmlnJTIwYXMlMjBEaWZmdXNlcnNCaXRzQW5kQnl0ZXNDb25maWclMkMlMjBBdXJhRmxvd1RyYW5zZm9ybWVyMkRNb2RlbCUyQyUyMEF1cmFGbG93UGlwZWxpbmUlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQml0c0FuZEJ5dGVzQ29uZmlnJTIwYXMlMjBCaXRzQW5kQnl0ZXNDb25maWclMkMlMjBUNUVuY29kZXJNb2RlbCUwQSUwQXF1YW50X2NvbmZpZyUyMCUzRCUyMEJpdHNBbmRCeXRlc0NvbmZpZyhsb2FkX2luXzhiaXQlM0RUcnVlKSUwQXRleHRfZW5jb2Rlcl84Yml0JTIwJTNEJTIwVDVFbmNvZGVyTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMmZhbCUyRkF1cmFGbG93JTIyJTJDJTBBJTIwJTIwJTIwJTIwc3ViZm9sZGVyJTNEJTIydGV4dF9lbmNvZGVyJTIyJTJDJTBBJTIwJTIwJTIwJTIwcXVhbnRpemF0aW9uX2NvbmZpZyUzRHF1YW50X2NvbmZpZyUyQyUwQSUyMCUyMCUyMCUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUyQyUwQSklMEElMEFxdWFudF9jb25maWclMjAlM0QlMjBEaWZmdXNlcnNCaXRzQW5kQnl0ZXNDb25maWcobG9hZF9pbl84Yml0JTNEVHJ1ZSklMEF0cmFuc2Zvcm1lcl84Yml0JTIwJTNEJTIwQXVyYUZsb3dUcmFuc2Zvcm1lcjJETW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMmZhbCUyRkF1cmFGbG93JTIyJTJDJTBBJTIwJTIwJTIwJTIwc3ViZm9sZGVyJTNEJTIydHJhbnNmb3JtZXIlMjIlMkMlMEElMjAlMjAlMjAlMjBxdWFudGl6YXRpb25fY29uZmlnJTNEcXVhbnRfY29uZmlnJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBKSUwQSUwQXBpcGVsaW5lJTIwJTNEJTIwQXVyYUZsb3dQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyZmFsJTJGQXVyYUZsb3clMjIlMkMlMEElMjAlMjAlMjAlMjB0ZXh0X2VuY29kZXIlM0R0ZXh0X2VuY29kZXJfOGJpdCUyQyUwQSUyMCUyMCUyMCUyMHRyYW5zZm9ybWVyJTNEdHJhbnNmb3JtZXJfOGJpdCUyQyUwQSUyMCUyMCUyMCUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiUyQyUwQSUyMCUyMCUyMCUyMGRldmljZV9tYXAlM0QlMjJiYWxhbmNlZCUyMiUyQyUwQSklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJhJTIwdGlueSUyMGFzdHJvbmF1dCUyMGhhdGNoaW5nJTIwZnJvbSUyMGFuJTIwZWdnJTIwb24lMjB0aGUlMjBtb29uJTIyJTBBaW1hZ2UlMjAlM0QlMjBwaXBlbGluZShwcm9tcHQpLmltYWdlcyU1QjAlNUQlMEFpbWFnZS5zYXZlKCUyMmF1cmFmbG93LnBuZyUyMik=",highlighted:`<span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> BitsAndBytesConfig <span class="hljs-keyword">as</span> DiffusersBitsAndBytesConfig, AuraFlowTransformer2DModel, AuraFlowPipeline | |
| <span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BitsAndBytesConfig <span class="hljs-keyword">as</span> BitsAndBytesConfig, T5EncoderModel | |
| quant_config = BitsAndBytesConfig(load_in_8bit=<span class="hljs-literal">True</span>) | |
| text_encoder_8bit = T5EncoderModel.from_pretrained( | |
| <span class="hljs-string">"fal/AuraFlow"</span>, | |
| subfolder=<span class="hljs-string">"text_encoder"</span>, | |
| quantization_config=quant_config, | |
| torch_dtype=torch.float16, | |
| ) | |
| quant_config = DiffusersBitsAndBytesConfig(load_in_8bit=<span class="hljs-literal">True</span>) | |
| transformer_8bit = AuraFlowTransformer2DModel.from_pretrained( | |
| <span class="hljs-string">"fal/AuraFlow"</span>, | |
| subfolder=<span class="hljs-string">"transformer"</span>, | |
| quantization_config=quant_config, | |
| torch_dtype=torch.float16, | |
| ) | |
| pipeline = AuraFlowPipeline.from_pretrained( | |
| <span class="hljs-string">"fal/AuraFlow"</span>, | |
| text_encoder=text_encoder_8bit, | |
| transformer=transformer_8bit, | |
| torch_dtype=torch.float16, | |
| device_map=<span class="hljs-string">"balanced"</span>, | |
| ) | |
| prompt = <span class="hljs-string">"a tiny astronaut hatching from an egg on the moon"</span> | |
| image = pipeline(prompt).images[<span class="hljs-number">0</span>] | |
| image.save(<span class="hljs-string">"auraflow.png"</span>)`,lang:"py",wrap:!1}}),G=new Je({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwKCUwQSUyMCUyMCUyMCUyMEF1cmFGbG93UGlwZWxpbmUlMkMlMEElMjAlMjAlMjAlMjBHR1VGUXVhbnRpemF0aW9uQ29uZmlnJTJDJTBBJTIwJTIwJTIwJTIwQXVyYUZsb3dUcmFuc2Zvcm1lcjJETW9kZWwlMkMlMEEpJTBBJTBBdHJhbnNmb3JtZXIlMjAlM0QlMjBBdXJhRmxvd1RyYW5zZm9ybWVyMkRNb2RlbC5mcm9tX3NpbmdsZV9maWxlKCUwQSUyMCUyMCUyMCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZjaXR5OTYlMkZBdXJhRmxvdy12MC4zLWdndWYlMkZibG9iJTJGbWFpbiUyRmF1cmFfZmxvd18wLjMtUTJfSy5nZ3VmJTIyJTJDJTBBJTIwJTIwJTIwJTIwcXVhbnRpemF0aW9uX2NvbmZpZyUzREdHVUZRdWFudGl6YXRpb25Db25maWcoY29tcHV0ZV9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2KSUyQyUwQSUyMCUyMCUyMCUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYlMkMlMEEpJTBBJTBBcGlwZWxpbmUlMjAlM0QlMjBBdXJhRmxvd1BpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJmYWwlMkZBdXJhRmxvdy12MC4zJTIyJTJDJTBBJTIwJTIwJTIwJTIwdHJhbnNmb3JtZXIlM0R0cmFuc2Zvcm1lciUyQyUwQSUyMCUyMCUyMCUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYlMkMlMEEpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyYSUyMGN1dGUlMjBwb255JTIwaW4lMjBhJTIwZmllbGQlMjBvZiUyMGZsb3dlcnMlMjIlMEFpbWFnZSUyMCUzRCUyMHBpcGVsaW5lKHByb21wdCkuaW1hZ2VzJTVCMCU1RCUwQWltYWdlLnNhdmUoJTIyYXVyYWZsb3cucG5nJTIyKQ==",highlighted:`<span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> ( | |
| AuraFlowPipeline, | |
| GGUFQuantizationConfig, | |
| AuraFlowTransformer2DModel, | |
| ) | |
| transformer = AuraFlowTransformer2DModel.from_single_file( | |
| <span class="hljs-string">"https://huggingface.co/city96/AuraFlow-v0.3-gguf/blob/main/aura_flow_0.3-Q2_K.gguf"</span>, | |
| quantization_config=GGUFQuantizationConfig(compute_dtype=torch.bfloat16), | |
| torch_dtype=torch.bfloat16, | |
| ) | |
| pipeline = AuraFlowPipeline.from_pretrained( | |
| <span class="hljs-string">"fal/AuraFlow-v0.3"</span>, | |
| transformer=transformer, | |
| torch_dtype=torch.bfloat16, | |
| ) | |
| prompt = <span class="hljs-string">"a cute pony in a field of flowers"</span> | |
| image = pipeline(prompt).images[<span class="hljs-number">0</span>] | |
| image.save(<span class="hljs-string">"auraflow.png"</span>)`,lang:"py",wrap:!1}}),N=new Me({props:{title:"Support for torch.compile()",local:"support-for-torchcompile",headingTag:"h2"}}),X=new Je({props:{code:"JTJCJTIwdG9yY2guZnguZXhwZXJpbWVudGFsLl9jb25maWcudXNlX2R1Y2tfc2hhcGUlMjAlM0QlMjBGYWxzZSUwQSUyQiUyMHBpcGVsaW5lLnRyYW5zZm9ybWVyJTIwJTNEJTIwdG9yY2guY29tcGlsZSglMEElMjAlMjAlMjAlMjBwaXBlbGluZS50cmFuc2Zvcm1lciUyQyUyMGZ1bGxncmFwaCUzRFRydWUlMkMlMjBkeW5hbWljJTNEVHJ1ZSUwQSk=",highlighted:`<span class="hljs-addition">+ torch.fx.experimental._config.use_duck_shape = False</span> | |
| <span class="hljs-addition">+ pipeline.transformer = torch.compile(</span> | |
| pipeline.transformer, fullgraph=True, dynamic=True | |
| )`,lang:"diff",wrap:!1}}),R=new Me({props:{title:"AuraFlowPipeline",local:"diffusers.AuraFlowPipeline",headingTag:"h2"}}),q=new Ze({props:{name:"class diffusers.AuraFlowPipeline",anchor:"diffusers.AuraFlowPipeline",parameters:[{name:"tokenizer",val:": T5Tokenizer"},{name:"text_encoder",val:": UMT5EncoderModel"},{name:"vae",val:": AutoencoderKL"},{name:"transformer",val:": AuraFlowTransformer2DModel"},{name:"scheduler",val:": FlowMatchEulerDiscreteScheduler"}],parametersDescription:[{anchor:"diffusers.AuraFlowPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>T5TokenizerFast</code>) — | |
| Tokenizer of class | |
| <a href="https://huggingface.co/docs/transformers/model_doc/t5#transformers.T5Tokenizer" rel="nofollow">T5Tokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.AuraFlowPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>T5EncoderModel</code>) — | |
| Frozen text-encoder. AuraFlow uses | |
| <a href="https://huggingface.co/docs/transformers/model_doc/t5#transformers.T5EncoderModel" rel="nofollow">T5</a>, specifically the | |
| <a href="https://huggingface.co/EleutherAI/pile-t5-xl" rel="nofollow">EleutherAI/pile-t5-xl</a> variant.`,name:"text_encoder"},{anchor:"diffusers.AuraFlowPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/pr_14045/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) — | |
| Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.AuraFlowPipeline.transformer",description:`<strong>transformer</strong> (<a href="/docs/diffusers/pr_14045/en/api/models/aura_flow_transformer2d#diffusers.AuraFlowTransformer2DModel">AuraFlowTransformer2DModel</a>) — | |
| Conditional Transformer (MMDiT and DiT) architecture to denoise the encoded image latents.`,name:"transformer"},{anchor:"diffusers.AuraFlowPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/pr_14045/en/api/schedulers/flow_match_euler_discrete#diffusers.FlowMatchEulerDiscreteScheduler">FlowMatchEulerDiscreteScheduler</a>) — | |
| A scheduler to be used in combination with <code>transformer</code> to denoise the encoded image latents.`,name:"scheduler"}],source:"https://github.com/huggingface/diffusers/blob/vr_14045/src/diffusers/pipelines/aura_flow/pipeline_aura_flow.py#L123"}}),z=new Ze({props:{name:"__call__",anchor:"diffusers.AuraFlowPipeline.__call__",parameters:[{name:"prompt",val:": str | list[str] = None"},{name:"negative_prompt",val:": str | list[str] = None"},{name:"num_inference_steps",val:": int = 50"},{name:"sigmas",val:": list = None"},{name:"guidance_scale",val:": float = 3.5"},{name:"num_images_per_prompt",val:": int | None = 1"},{name:"height",val:": int | None = 1024"},{name:"width",val:": int | None = 1024"},{name:"generator",val:": torch._C.Generator | list[torch._C.Generator] | None = None"},{name:"latents",val:": torch.Tensor | None = None"},{name:"prompt_embeds",val:": torch.Tensor | None = None"},{name:"prompt_attention_mask",val:": torch.Tensor | None = None"},{name:"negative_prompt_embeds",val:": torch.Tensor | None = None"},{name:"negative_prompt_attention_mask",val:": torch.Tensor | None = None"},{name:"max_sequence_length",val:": int = 256"},{name:"output_type",val:": str | None = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"attention_kwargs",val:": dict[str, typing.Any] | None = None"},{name:"callback_on_step_end",val:": typing.Union[typing.Callable[[int, int], NoneType], diffusers.callbacks.PipelineCallback, diffusers.callbacks.MultiPipelineCallbacks, NoneType] = None"},{name:"callback_on_step_end_tensor_inputs",val:": list = ['latents']"}],parametersDescription:[{anchor:"diffusers.AuraFlowPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>list[str]</code>, <em>optional</em>) — | |
| The prompt or prompts to guide the image generation. If not defined, one has to pass <code>prompt_embeds</code>. | |
| instead.`,name:"prompt"},{anchor:"diffusers.AuraFlowPipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>list[str]</code>, <em>optional</em>) — | |
| The prompt or prompts not to guide the image generation. If not defined, one has to pass | |
| <code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is | |
| less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.AuraFlowPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to self.transformer.config.sample_size * self.vae_scale_factor) — | |
| The height in pixels of the generated image. This is set to 1024 by default for best results.`,name:"height"},{anchor:"diffusers.AuraFlowPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to self.transformer.config.sample_size * self.vae_scale_factor) — | |
| The width in pixels of the generated image. This is set to 1024 by default for best results.`,name:"width"},{anchor:"diffusers.AuraFlowPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 50) — | |
| The number of denoising steps. More denoising steps usually lead to a higher quality image at the | |
| expense of slower inference.`,name:"num_inference_steps"},{anchor:"diffusers.AuraFlowPipeline.__call__.sigmas",description:`<strong>sigmas</strong> (<code>list[float]</code>, <em>optional</em>) — | |
| Custom sigmas used to override the timestep spacing strategy of the scheduler. If <code>sigmas</code> is passed, | |
| <code>num_inference_steps</code> and <code>timesteps</code> must be <code>None</code>.`,name:"sigmas"},{anchor:"diffusers.AuraFlowPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 5.0) — | |
| Guidance scale as defined in <a href="https://huggingface.co/papers/2207.12598" rel="nofollow">Classifier-Free Diffusion | |
| Guidance</a>. <code>guidance_scale</code> is defined as <code>w</code> of equation 2. | |
| of <a href="https://huggingface.co/papers/2205.11487" rel="nofollow">Imagen Paper</a>. Guidance scale is enabled by setting | |
| <code>guidance_scale > 1</code>. Higher guidance scale encourages to generate images that are closely linked to | |
| the text <code>prompt</code>, usually at the expense of lower image quality.`,name:"guidance_scale"},{anchor:"diffusers.AuraFlowPipeline.__call__.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) — | |
| The number of images to generate per prompt.`,name:"num_images_per_prompt"},{anchor:"diffusers.AuraFlowPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>list[torch.Generator]</code>, <em>optional</em>) — | |
| One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</a> | |
| to make generation deterministic.`,name:"generator"},{anchor:"diffusers.AuraFlowPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) — | |
| Pre-generated noisy latents, sampled from a Gaussian distribution, to be used as inputs for image | |
| generation. Can be used to tweak the same generation with different prompts. If not provided, a latents | |
| tensor will be generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.AuraFlowPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) — | |
| Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not | |
| provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.AuraFlowPipeline.__call__.prompt_attention_mask",description:`<strong>prompt_attention_mask</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated attention mask for text embeddings.`,name:"prompt_attention_mask"},{anchor:"diffusers.AuraFlowPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) — | |
| Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt | |
| weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input | |
| argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.AuraFlowPipeline.__call__.negative_prompt_attention_mask",description:`<strong>negative_prompt_attention_mask</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated attention mask for negative text embeddings.`,name:"negative_prompt_attention_mask"},{anchor:"diffusers.AuraFlowPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>"pil"</code>) — | |
| The output format of the generate image. Choose between | |
| <a href="https://pillow.readthedocs.io/en/stable/" rel="nofollow">PIL</a>: <code>PIL.Image.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.AuraFlowPipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether or not to return a <code>~pipelines.stable_diffusion_xl.StableDiffusionXLPipelineOutput</code> instead | |
| of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.AuraFlowPipeline.__call__.attention_kwargs",description:`<strong>attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) — | |
| A kwargs dictionary that if specified is passed along to the <code>AttentionProcessor</code> as defined under | |
| <code>self.processor</code> in | |
| <a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow">diffusers.models.attention_processor</a>.`,name:"attention_kwargs"},{anchor:"diffusers.AuraFlowPipeline.__call__.callback_on_step_end",description:`<strong>callback_on_step_end</strong> (<code>Callable</code>, <em>optional</em>) — | |
| A function that calls at the end of each denoising steps during the inference. The function is called | |
| with the following arguments: <code>callback_on_step_end(self: DiffusionPipeline, step: int, timestep: int, callback_kwargs: Dict)</code>. <code>callback_kwargs</code> will include a list of all tensors as specified by | |
| <code>callback_on_step_end_tensor_inputs</code>.`,name:"callback_on_step_end"},{anchor:"diffusers.AuraFlowPipeline.__call__.callback_on_step_end_tensor_inputs",description:`<strong>callback_on_step_end_tensor_inputs</strong> (<code>list</code>, <em>optional</em>) — | |
| The list of tensor inputs for the <code>callback_on_step_end</code> function. The tensors specified in the list | |
| will be passed as <code>callback_kwargs</code> argument. You will only be able to include variables listed in the | |
| <code>._callback_tensor_inputs</code> attribute of your pipeline class.`,name:"callback_on_step_end_tensor_inputs"},{anchor:"diffusers.AuraFlowPipeline.__call__.max_sequence_length",description:"<strong>max_sequence_length</strong> (<code>int</code> defaults to 256) — Maximum sequence length to use with the <code>prompt</code>.",name:"max_sequence_length"}],source:"https://github.com/huggingface/diffusers/blob/vr_14045/src/diffusers/pipelines/aura_flow/pipeline_aura_flow.py#L428",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>If <code>return_dict</code> is <code>True</code>, <a | |
| href="/docs/diffusers/pr_14045/en/api/pipelines/ddim#diffusers.ImagePipelineOutput" | |
| >ImagePipelineOutput</a> is returned, otherwise a <code>tuple</code> is | |
| returned where the first element is a list with the generated images.</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><a | |
| href="/docs/diffusers/pr_14045/en/api/pipelines/ddim#diffusers.ImagePipelineOutput" | |
| >ImagePipelineOutput</a> or <code>tuple</code></p> | |
| `}}),F=new Se({props:{anchor:"diffusers.AuraFlowPipeline.__call__.example",$$slots:{default:[Le]},$$scope:{ctx:ee}}}),Y=new Ze({props:{name:"encode_prompt",anchor:"diffusers.AuraFlowPipeline.encode_prompt",parameters:[{name:"prompt",val:": str | list[str]"},{name:"negative_prompt",val:": str | list[str] = None"},{name:"do_classifier_free_guidance",val:": bool = True"},{name:"num_images_per_prompt",val:": int = 1"},{name:"device",val:": torch.device | None = None"},{name:"prompt_embeds",val:": torch.Tensor | None = None"},{name:"negative_prompt_embeds",val:": torch.Tensor | None = None"},{name:"prompt_attention_mask",val:": torch.Tensor | None = None"},{name:"negative_prompt_attention_mask",val:": torch.Tensor | None = None"},{name:"max_sequence_length",val:": int = 256"},{name:"lora_scale",val:": float | None = None"}],parametersDescription:[{anchor:"diffusers.AuraFlowPipeline.encode_prompt.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>list[str]</code>, <em>optional</em>) — | |
| prompt to be encoded`,name:"prompt"},{anchor:"diffusers.AuraFlowPipeline.encode_prompt.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>list[str]</code>, <em>optional</em>) — | |
| The prompt not to guide the image generation. If not defined, one has to pass <code>negative_prompt_embeds</code> | |
| instead. Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.AuraFlowPipeline.encode_prompt.do_classifier_free_guidance",description:`<strong>do_classifier_free_guidance</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| whether to use classifier free guidance or not`,name:"do_classifier_free_guidance"},{anchor:"diffusers.AuraFlowPipeline.encode_prompt.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) — | |
| number of images that should be generated per prompt`,name:"num_images_per_prompt"},{anchor:"diffusers.AuraFlowPipeline.encode_prompt.device",description:`<strong>device</strong> — (<code>torch.device</code>, <em>optional</em>): | |
| torch device to place the resulting embeddings on`,name:"device"},{anchor:"diffusers.AuraFlowPipeline.encode_prompt.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not | |
| provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.AuraFlowPipeline.encode_prompt.prompt_attention_mask",description:`<strong>prompt_attention_mask</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated attention mask for text embeddings.`,name:"prompt_attention_mask"},{anchor:"diffusers.AuraFlowPipeline.encode_prompt.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated negative text embeddings.`,name:"negative_prompt_embeds"},{anchor:"diffusers.AuraFlowPipeline.encode_prompt.negative_prompt_attention_mask",description:`<strong>negative_prompt_attention_mask</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| Pre-generated attention mask for negative text embeddings.`,name:"negative_prompt_attention_mask"},{anchor:"diffusers.AuraFlowPipeline.encode_prompt.max_sequence_length",description:"<strong>max_sequence_length</strong> (<code>int</code>, defaults to 256) — Maximum sequence length to use for the prompt.",name:"max_sequence_length"},{anchor:"diffusers.AuraFlowPipeline.encode_prompt.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>, <em>optional</em>) — | |
| A lora scale that will be applied to all LoRA layers of the text encoder if LoRA layers are loaded.`,name:"lora_scale"}],source:"https://github.com/huggingface/diffusers/blob/vr_14045/src/diffusers/pipelines/aura_flow/pipeline_aura_flow.py#L232"}}),V=new De({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/aura_flow.md"}}),{c(){p=l("meta"),k=a(),T=l("p"),_=a(),d(w.$$.fragment),r=a(),d(b.$$.fragment),te=a(),Z=l("p"),Z.innerHTML=Ae,ne=a(),A=l("p"),A.innerHTML=Ce,oe=a(),x=l("blockquote"),x.innerHTML=$e,ae=a(),d(C.$$.fragment),se=a(),$=l("p"),$.textContent=Ie,re=a(),I=l("p"),I.innerHTML=je,le=a(),d(j.$$.fragment),ie=a(),B=l("p"),B.innerHTML=Be,pe=a(),d(G.$$.fragment),de=a(),d(N.$$.fragment),ce=a(),P=l("p"),P.innerHTML=Ge,me=a(),d(X.$$.fragment),ue=a(),E=l("p"),E.innerHTML=Ne,fe=a(),Q=l("p"),Q.textContent=Pe,ge=a(),W=l("p"),W.innerHTML=Xe,he=a(),d(R.$$.fragment),_e=a(),y=l("div"),d(q.$$.fragment),ve=a(),M=l("div"),d(z.$$.fragment),xe=a(),H=l("p"),H.textContent=Ee,Fe=a(),d(F.$$.fragment),Ue=a(),U=l("div"),d(Y.$$.fragment),ke=a(),S=l("p"),S.textContent=Qe,we=a(),d(V.$$.fragment),be=a(),K=l("p"),this.h()},l(e){const t=Ve("svelte-u9bgzb",document.head);p=i(t,"META",{name:!0,content:!0}),t.forEach(n),k=s(e),T=i(e,"P",{}),O(T).forEach(n),_=s(e),c(w.$$.fragment,e),r=s(e),c(b.$$.fragment,e),te=s(e),Z=i(e,"P",{"data-svelte-h":!0}),h(Z)!=="svelte-mz8sy4"&&(Z.innerHTML=Ae),ne=s(e),A=i(e,"P",{"data-svelte-h":!0}),h(A)!=="svelte-1tuv1oa"&&(A.innerHTML=Ce),oe=s(e),x=i(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),h(x)!=="svelte-4gxvdb"&&(x.innerHTML=$e),ae=s(e),c(C.$$.fragment,e),se=s(e),$=i(e,"P",{"data-svelte-h":!0}),h($)!=="svelte-1ou2pxc"&&($.textContent=Ie),re=s(e),I=i(e,"P",{"data-svelte-h":!0}),h(I)!=="svelte-1ismbua"&&(I.innerHTML=je),le=s(e),c(j.$$.fragment,e),ie=s(e),B=i(e,"P",{"data-svelte-h":!0}),h(B)!=="svelte-9873at"&&(B.innerHTML=Be),pe=s(e),c(G.$$.fragment,e),de=s(e),c(N.$$.fragment,e),ce=s(e),P=i(e,"P",{"data-svelte-h":!0}),h(P)!=="svelte-10cvqm3"&&(P.innerHTML=Ge),me=s(e),c(X.$$.fragment,e),ue=s(e),E=i(e,"P",{"data-svelte-h":!0}),h(E)!=="svelte-mmsxgw"&&(E.innerHTML=Ne),fe=s(e),Q=i(e,"P",{"data-svelte-h":!0}),h(Q)!=="svelte-rc38yx"&&(Q.textContent=Pe),ge=s(e),W=i(e,"P",{"data-svelte-h":!0}),h(W)!=="svelte-1ddaz29"&&(W.innerHTML=Xe),he=s(e),c(R.$$.fragment,e),_e=s(e),y=i(e,"DIV",{class:!0});var v=O(y);c(q.$$.fragment,v),ve=s(v),M=i(v,"DIV",{class:!0});var D=O(M);c(z.$$.fragment,D),xe=s(D),H=i(D,"P",{"data-svelte-h":!0}),h(H)!=="svelte-v78lg8"&&(H.textContent=Ee),Fe=s(D),c(F.$$.fragment,D),D.forEach(n),Ue=s(v),U=i(v,"DIV",{class:!0});var Te=O(U);c(Y.$$.fragment,Te),ke=s(Te),S=i(Te,"P",{"data-svelte-h":!0}),h(S)!=="svelte-16q0ax1"&&(S.textContent=Qe),Te.forEach(n),v.forEach(n),we=s(e),c(V.$$.fragment,e),be=s(e),K=i(e,"P",{}),O(K).forEach(n),this.h()},h(){L(p,"name","hf:doc:metadata"),L(p,"content",Oe),L(x,"class","tip"),L(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),L(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),L(y,"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,t){J(document.head,p),o(e,k,t),o(e,T,t),o(e,_,t),m(w,e,t),o(e,r,t),m(b,e,t),o(e,te,t),o(e,Z,t),o(e,ne,t),o(e,A,t),o(e,oe,t),o(e,x,t),o(e,ae,t),m(C,e,t),o(e,se,t),o(e,$,t),o(e,re,t),o(e,I,t),o(e,le,t),m(j,e,t),o(e,ie,t),o(e,B,t),o(e,pe,t),m(G,e,t),o(e,de,t),m(N,e,t),o(e,ce,t),o(e,P,t),o(e,me,t),m(X,e,t),o(e,ue,t),o(e,E,t),o(e,fe,t),o(e,Q,t),o(e,ge,t),o(e,W,t),o(e,he,t),m(R,e,t),o(e,_e,t),o(e,y,t),m(q,y,null),J(y,ve),J(y,M),m(z,M,null),J(M,xe),J(M,H),J(M,Fe),m(F,M,null),J(y,Ue),J(y,U),m(Y,U,null),J(U,ke),J(U,S),o(e,we,t),m(V,e,t),o(e,be,t),o(e,K,t),ye=!0},p(e,[t]){const v={};t&2&&(v.$$scope={dirty:t,ctx:e}),F.$set(v)},i(e){ye||(u(w.$$.fragment,e),u(b.$$.fragment,e),u(C.$$.fragment,e),u(j.$$.fragment,e),u(G.$$.fragment,e),u(N.$$.fragment,e),u(X.$$.fragment,e),u(R.$$.fragment,e),u(q.$$.fragment,e),u(z.$$.fragment,e),u(F.$$.fragment,e),u(Y.$$.fragment,e),u(V.$$.fragment,e),ye=!0)},o(e){f(w.$$.fragment,e),f(b.$$.fragment,e),f(C.$$.fragment,e),f(j.$$.fragment,e),f(G.$$.fragment,e),f(N.$$.fragment,e),f(X.$$.fragment,e),f(R.$$.fragment,e),f(q.$$.fragment,e),f(z.$$.fragment,e),f(F.$$.fragment,e),f(Y.$$.fragment,e),f(V.$$.fragment,e),ye=!1},d(e){e&&(n(k),n(T),n(_),n(r),n(te),n(Z),n(ne),n(A),n(oe),n(x),n(ae),n(se),n($),n(re),n(I),n(le),n(ie),n(B),n(pe),n(de),n(ce),n(P),n(me),n(ue),n(E),n(fe),n(Q),n(ge),n(W),n(he),n(_e),n(y),n(we),n(be),n(K)),n(p),g(w,e),g(b,e),g(C,e),g(j,e),g(G,e),g(N,e),g(X,e),g(R,e),g(q),g(z),g(F),g(Y),g(V,e)}}}const Oe='{"title":"AuraFlow","local":"auraflow","sections":[{"title":"Quantization","local":"quantization","sections":[],"depth":2},{"title":"Support for torch.compile()","local":"support-for-torchcompile","sections":[],"depth":2},{"title":"AuraFlowPipeline","local":"diffusers.AuraFlowPipeline","sections":[],"depth":2}],"depth":1}';function et(ee){return Re(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class it extends ze{constructor(p){super(),Ye(this,p,et,Ke,We,{})}}export{it as component}; | |
Xet Storage Details
- Size:
- 33.3 kB
- Xet hash:
- 9be38de8bc4d4d00bc505335d4530370122fc17d2244a5cc6079e2bcc6aa7395
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.