Buckets:
| import{s as Mt,o as _t,n as wt}from"../chunks/scheduler.53228c21.js";import{S as bt,i as jt,e as r,s as o,c as p,h as Tt,a as i,d as n,b as l,f as x,g as c,j as w,k as I,l as s,m as a,n as m,t as f,o as u,p as g}from"../chunks/index.100fac89.js";import{D as oe}from"../chunks/Docstring.8934f3ee.js";import{C as Ve}from"../chunks/CodeBlock.0adb3827.js";import{E as yt}from"../chunks/ExampleCodeBlock.0fb1da6c.js";import{H as le,E as Jt}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.b70fb789.js";function vt(ge){let _,U="Examples:",y,b,j;return b=new Ve({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwUFJYUGlwZWxpbmUlMEElMEElMjMlMjBMb2FkJTIwcGlwZWxpbmUlMjB3aXRoJTIwZnJvbV9wcmV0cmFpbmVkJTBBcGlwZSUyMCUzRCUyMFBSWFBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMjJQaG90b3Jvb20lMkZwcngtNTEyLXQyaS1zZnQlMjIpJTBBcGlwZS50byglMjJjdWRhJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMkElMjBkaWdpdGFsJTIwcGFpbnRpbmclMjBvZiUyMGElMjBydXN0eSUyQyUyMHZpbnRhZ2UlMjB0cmFtJTIwb24lMjBhJTIwc2FuZHklMjBiZWFjaCUyMiUwQWltYWdlJTIwJTNEJTIwcGlwZShwcm9tcHQlMkMlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNEMjglMkMlMjBndWlkYW5jZV9zY2FsZSUzRDUuMCkuaW1hZ2VzJTVCMCU1RCUwQWltYWdlLnNhdmUoJTIycHJ4X291dHB1dC5wbmclMjIp",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> PRXPipeline | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Load pipeline with from_pretrained</span> | |
| <span class="hljs-meta">>>> </span>pipe = PRXPipeline.from_pretrained(<span class="hljs-string">"Photoroom/prx-512-t2i-sft"</span>) | |
| <span class="hljs-meta">>>> </span>pipe.to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-meta">>>> </span>prompt = <span class="hljs-string">"A digital painting of a rusty, vintage tram on a sandy beach"</span> | |
| <span class="hljs-meta">>>> </span>image = pipe(prompt, num_inference_steps=<span class="hljs-number">28</span>, guidance_scale=<span class="hljs-number">5.0</span>).images[<span class="hljs-number">0</span>] | |
| <span class="hljs-meta">>>> </span>image.save(<span class="hljs-string">"prx_output.png"</span>)`,lang:"py",wrap:!1}}),{c(){_=r("p"),_.textContent=U,y=o(),p(b.$$.fragment)},l(h){_=i(h,"P",{"data-svelte-h":!0}),w(_)!=="svelte-kvfsh7"&&(_.textContent=U),y=l(h),c(b.$$.fragment,h)},m(h,T){a(h,_,T),a(h,y,T),m(b,h,T),j=!0},p:wt,i(h){j||(f(b.$$.fragment,h),j=!0)},o(h){u(b.$$.fragment,h),j=!1},d(h){h&&(n(_),n(y)),g(b,h)}}}function xt(ge){let _,U,y,b,j,h,T,nt="PRX generates high-quality images from text using a simplified MMDIT architecture where text tokens don’t update through transformer blocks. It employs flow matching with discrete scheduling for efficient sampling and uses Google’s T5Gemma-2B-2B-UL2 model for multi-language text encoding. The ~1.3B parameter transformer delivers fast inference without sacrificing quality. You can choose between Flux VAE (8x compression, 16 latent channels) for balanced quality and speed or DC-AE (32x compression, 32 latent channels) for latent compression and faster processing.",he,$,Me,R,ot='PRX offers multiple variants with different VAE configurations, each optimized for specific resolutions. Base models excel with detailed prompts, capturing complex compositions and subtle details. Fine-tuned models trained on the <a href="https://huggingface.co/datasets/yandex/alchemist" rel="nofollow">Alchemist dataset</a> improve aesthetic quality, especially with simpler prompts.',_e,B,lt='<thead><tr><th align="center">Model</th> <th align="center">Resolution</th> <th align="center">Fine-tuned</th> <th align="center">Distilled</th> <th align="center">Description</th> <th align="center">Suggested prompts</th> <th align="center">Suggested parameters</th> <th align="center">Recommended dtype</th></tr></thead> <tbody><tr><td align="center"><a href="https://huggingface.co/Photoroom/prx-256-t2i" rel="nofollow"><code>Photoroom/prx-256-t2i</code></a></td> <td align="center">256</td> <td align="center">No</td> <td align="center">No</td> <td align="center">Base model pre-trained at 256 with Flux VAE</td> <td align="center">Works best with detailed prompts in natural language</td> <td align="center">28 steps, cfg=5.0</td> <td align="center"><code>torch.bfloat16</code></td></tr> <tr><td align="center"><a href="https://huggingface.co/Photoroom/prx-256-t2i-sft" rel="nofollow"><code>Photoroom/prx-256-t2i-sft</code></a></td> <td align="center">512</td> <td align="center">Yes</td> <td align="center">No</td> <td align="center">Fine-tuned on the <a href="https://huggingface.co/datasets/yandex/alchemist" rel="nofollow">Alchemist dataset</a> dataset with Flux VAE</td> <td align="center">Can handle less detailed prompts</td> <td align="center">28 steps, cfg=5.0</td> <td align="center"><code>torch.bfloat16</code></td></tr> <tr><td align="center"><a href="https://huggingface.co/Photoroom/prx-512-t2i" rel="nofollow"><code>Photoroom/prx-512-t2i</code></a></td> <td align="center">512</td> <td align="center">No</td> <td align="center">No</td> <td align="center">Base model pre-trained at 512 with Flux VAE</td> <td align="center">Works best with detailed prompts in natural language</td> <td align="center">28 steps, cfg=5.0</td> <td align="center"><code>torch.bfloat16</code></td></tr> <tr><td align="center"><a href="https://huggingface.co/Photoroom/prx-512-t2i-sft" rel="nofollow"><code>Photoroom/prx-512-t2i-sft</code></a></td> <td align="center">512</td> <td align="center">Yes</td> <td align="center">No</td> <td align="center">Fine-tuned on the <a href="https://huggingface.co/datasets/yandex/alchemist" rel="nofollow">Alchemist dataset</a> dataset with Flux VAE</td> <td align="center">Can handle less detailed prompts in natural language</td> <td align="center">28 steps, cfg=5.0</td> <td align="center"><code>torch.bfloat16</code></td></tr> <tr><td align="center"><a href="https://huggingface.co/Photoroom/prx-512-t2i-sft-distilled" rel="nofollow"><code>Photoroom/prx-512-t2i-sft-distilled</code></a></td> <td align="center">512</td> <td align="center">Yes</td> <td align="center">Yes</td> <td align="center">8-step distilled model from <a href="https://huggingface.co/Photoroom/prx-512-t2i-sft" rel="nofollow"><code>Photoroom/prx-512-t2i-sft</code></a></td> <td align="center">Can handle less detailed prompts in natural language</td> <td align="center">8 steps, cfg=1.0</td> <td align="center"><code>torch.bfloat16</code></td></tr> <tr><td align="center"><a href="https://huggingface.co/Photoroom/prx-512-t2i-dc-ae" rel="nofollow"><code>Photoroom/prx-512-t2i-dc-ae</code></a></td> <td align="center">512</td> <td align="center">No</td> <td align="center">No</td> <td align="center">Base model pre-trained at 512 with <a href="https://hanlab.mit.edu/projects/dc-ae" rel="nofollow">Deep Compression Autoencoder (DC-AE)</a></td> <td align="center">Works best with detailed prompts in natural language</td> <td align="center">28 steps, cfg=5.0</td> <td align="center"><code>torch.bfloat16</code></td></tr> <tr><td align="center"><a href="https://huggingface.co/Photoroom/prx-512-t2i-dc-ae-sft" rel="nofollow"><code>Photoroom/prx-512-t2i-dc-ae-sft</code></a></td> <td align="center">512</td> <td align="center">Yes</td> <td align="center">No</td> <td align="center">Fine-tuned on the <a href="https://huggingface.co/datasets/yandex/alchemist" rel="nofollow">Alchemist dataset</a> dataset with <a href="https://hanlab.mit.edu/projects/dc-ae" rel="nofollow">Deep Compression Autoencoder (DC-AE)</a></td> <td align="center">Can handle less detailed prompts in natural language</td> <td align="center">28 steps, cfg=5.0</td> <td align="center"><code>torch.bfloat16</code></td></tr> <tr><td align="center"><a href="https://huggingface.co/Photoroom/prx-512-t2i-dc-ae-sft-distilled" rel="nofollow"><code>Photoroom/prx-512-t2i-dc-ae-sft-distilled</code></a></td> <td align="center">512</td> <td align="center">Yes</td> <td align="center">Yes</td> <td align="center">8-step distilled model from <a href="https://huggingface.co/Photoroom/prx-512-t2i-dc-ae-sft-distilled" rel="nofollow"><code>Photoroom/prx-512-t2i-dc-ae-sft-distilled</code></a></td> <td align="center">Can handle less detailed prompts in natural language</td> <td align="center">8 steps, cfg=1.0</td> <td align="center"><code>torch.bfloat16</code></td></tr></tbody>',we,C,at='Refer to <a href="https://huggingface.co/collections/Photoroom/prx-models-68e66254c202ebfab99ad38e" rel="nofollow">this</a> collection for more information.',be,E,je,W,st='Load the pipeline with <a href="/docs/diffusers/pr_13769/en/api/pipelines/overview#diffusers.DiffusionPipeline.from_pretrained">from_pretrained()</a>.',Te,N,ye,V,Je,F,rt="Load components individually to customize the pipeline for instance to use quantized models.",ve,G,xe,Q,Ie,z,it="For memory-constrained environments:",Pe,Y,Ze,H,Ae,d,L,Fe,ae,dt="Pipeline for text-to-image generation using PRX Transformer.",Ge,se,pt=`This model inherits from <a href="/docs/diffusers/pr_13769/en/api/pipelines/overview#diffusers.DiffusionPipeline">DiffusionPipeline</a>. Check the superclass documentation for the generic methods the | |
| library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`,Qe,J,S,ze,re,ct="Function invoked when calling the pipeline for generation.",Ye,P,He,Z,q,Le,ie,mt="Check that all inputs are in correct format.",Se,A,D,qe,de,ft="Encode text prompt using standard text encoder and tokenizer, or use precomputed embeddings.",De,k,O,Oe,pe,ut="Determine the default resolution based on the loaded VAE and config.",Ke,X,K,et,ce,gt="Prepare initial latents for the diffusion process.",ke,ee,Xe,v,te,tt,me,ht="Output class for PRX pipelines.",Ue,ne,$e,ue,Re;return j=new le({props:{title:"PRX",local:"prx",headingTag:"h1"}}),$=new le({props:{title:"Available models",local:"available-models",headingTag:"h2"}}),E=new le({props:{title:"Loading the pipeline",local:"loading-the-pipeline",headingTag:"h2"}}),N=new Ve({props:{code:"ZnJvbSUyMGRpZmZ1c2Vycy5waXBlbGluZXMucHJ4JTIwaW1wb3J0JTIwUFJYUGlwZWxpbmUlMEElMEElMjMlMjBMb2FkJTIwcGlwZWxpbmUlMjAtJTIwVkFFJTIwYW5kJTIwdGV4dCUyMGVuY29kZXIlMjB3aWxsJTIwYmUlMjBsb2FkZWQlMjBmcm9tJTIwSHVnZ2luZ0ZhY2UlMEFwaXBlJTIwJTNEJTIwUFJYUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUyMlBob3Rvcm9vbSUyRnByeC01MTItdDJpLXNmdCUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYpJTBBcGlwZS50byglMjJjdWRhJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMkElMjBmcm9udC1mYWNpbmclMjBwb3J0cmFpdCUyMG9mJTIwYSUyMGxpb24lMjB0aGUlMjBnb2xkZW4lMjBzYXZhbm5hJTIwYXQlMjBzdW5zZXQuJTIyJTBBaW1hZ2UlMjAlM0QlMjBwaXBlKHByb21wdCUyQyUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0QyOCUyQyUyMGd1aWRhbmNlX3NjYWxlJTNENS4wKS5pbWFnZXMlNUIwJTVEJTBBaW1hZ2Uuc2F2ZSglMjJwcnhfb3V0cHV0LnBuZyUyMik=",highlighted:`<span class="hljs-keyword">from</span> diffusers.pipelines.prx <span class="hljs-keyword">import</span> PRXPipeline | |
| <span class="hljs-comment"># Load pipeline - VAE and text encoder will be loaded from HuggingFace</span> | |
| pipe = PRXPipeline.from_pretrained(<span class="hljs-string">"Photoroom/prx-512-t2i-sft"</span>, torch_dtype=torch.bfloat16) | |
| pipe.to(<span class="hljs-string">"cuda"</span>) | |
| prompt = <span class="hljs-string">"A front-facing portrait of a lion the golden savanna at sunset."</span> | |
| image = pipe(prompt, num_inference_steps=<span class="hljs-number">28</span>, guidance_scale=<span class="hljs-number">5.0</span>).images[<span class="hljs-number">0</span>] | |
| image.save(<span class="hljs-string">"prx_output.png"</span>)`,lang:"py",wrap:!1}}),V=new le({props:{title:"Manual Component Loading",local:"manual-component-loading",headingTag:"h3"}}),G=new Ve({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzLnBpcGVsaW5lcy5wcnglMjBpbXBvcnQlMjBQUlhQaXBlbGluZSUwQ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NjaGVkdWxlciUzRHNjaGVkdWxlciUyQyUwQSUyMCUyMCUyMCUyMHRleHRfZW5jb2RlciUzRHRleHRfZW5jb2RlciUyQyUwQSUyMCUyMCUyMCUyMHRva2VuaXplciUzRHRva2VuaXplciUyQyUwQSUyMCUyMCUyMCUyMHZhZSUzRHZhZSUwQSklMEFwaXBlLnRvKCUyMmN1ZGElMjIp",highlighted:`<span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers.pipelines.prx <span class="hljs-keyword">import</span> PRXPipeline | |
| <span class="hljs-keyword">from</span> diffusers.models <span class="hljs-keyword">import</span> AutoencoderKL, AutoencoderDC | |
| <span class="hljs-keyword">from</span> diffusers.models.transformers.transformer_prx <span class="hljs-keyword">import</span> PRXTransformer2DModel | |
| <span class="hljs-keyword">from</span> diffusers.schedulers <span class="hljs-keyword">import</span> FlowMatchEulerDiscreteScheduler | |
| <span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> T5GemmaModel, GemmaTokenizerFast | |
| <span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> BitsAndBytesConfig <span class="hljs-keyword">as</span> DiffusersBitsAndBytesConfig | |
| <span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BitsAndBytesConfig <span class="hljs-keyword">as</span> BitsAndBytesConfig | |
| quant_config = DiffusersBitsAndBytesConfig(load_in_8bit=<span class="hljs-literal">True</span>) | |
| <span class="hljs-comment"># Load transformer</span> | |
| transformer = PRXTransformer2DModel.from_pretrained( | |
| <span class="hljs-string">"checkpoints/prx-512-t2i-sft"</span>, | |
| subfolder=<span class="hljs-string">"transformer"</span>, | |
| quantization_config=quant_config, | |
| torch_dtype=torch.bfloat16, | |
| ) | |
| <span class="hljs-comment"># Load scheduler</span> | |
| scheduler = FlowMatchEulerDiscreteScheduler.from_pretrained( | |
| <span class="hljs-string">"checkpoints/prx-512-t2i-sft"</span>, subfolder=<span class="hljs-string">"scheduler"</span> | |
| ) | |
| <span class="hljs-comment"># Load T5Gemma text encoder</span> | |
| t5gemma_model = T5GemmaModel.from_pretrained(<span class="hljs-string">"google/t5gemma-2b-2b-ul2"</span>, | |
| quantization_config=quant_config, | |
| torch_dtype=torch.bfloat16) | |
| text_encoder = t5gemma_model.encoder.to(dtype=torch.bfloat16) | |
| tokenizer = GemmaTokenizerFast.from_pretrained(<span class="hljs-string">"google/t5gemma-2b-2b-ul2"</span>) | |
| tokenizer.model_max_length = <span class="hljs-number">256</span> | |
| <span class="hljs-comment"># Load VAE - choose either Flux VAE or DC-AE</span> | |
| <span class="hljs-comment"># Flux VAE</span> | |
| vae = AutoencoderKL.from_pretrained(<span class="hljs-string">"black-forest-labs/FLUX.1-dev"</span>, | |
| subfolder=<span class="hljs-string">"vae"</span>, | |
| quantization_config=quant_config, | |
| torch_dtype=torch.bfloat16) | |
| pipe = PRXPipeline( | |
| transformer=transformer, | |
| scheduler=scheduler, | |
| text_encoder=text_encoder, | |
| tokenizer=tokenizer, | |
| vae=vae | |
| ) | |
| pipe.to(<span class="hljs-string">"cuda"</span>)`,lang:"py",wrap:!1}}),Q=new le({props:{title:"Memory Optimization",local:"memory-optimization",headingTag:"h2"}}),Y=new Ve({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzLnBpcGVsaW5lcy5wcnglMjBpbXBvcnQlMjBQUlhQaXBlbGluZSUwQSUwQXBpcGUlMjAlM0QlMjBQUlhQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIyUGhvdG9yb29tJTJGcHJ4LTUxMi10Mmktc2Z0JTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5iZmxvYXQxNiklMEFwaXBlLmVuYWJsZV9tb2RlbF9jcHVfb2ZmbG9hZCgpJTIwJTIwJTIzJTIwT2ZmbG9hZCUyMGNvbXBvbmVudHMlMjB0byUyMENQVSUyMHdoZW4lMjBub3QlMjBpbiUyMHVzZSUwQSUwQSUyMyUyME9yJTIwdXNlJTIwc2VxdWVudGlhbCUyMENQVSUyMG9mZmxvYWQlMjBmb3IlMjBldmVuJTIwbG93ZXIlMjBtZW1vcnklMEFwaXBlLmVuYWJsZV9zZXF1ZW50aWFsX2NwdV9vZmZsb2FkKCk=",highlighted:`<span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers.pipelines.prx <span class="hljs-keyword">import</span> PRXPipeline | |
| pipe = PRXPipeline.from_pretrained(<span class="hljs-string">"Photoroom/prx-512-t2i-sft"</span>, torch_dtype=torch.bfloat16) | |
| pipe.enable_model_cpu_offload() <span class="hljs-comment"># Offload components to CPU when not in use</span> | |
| <span class="hljs-comment"># Or use sequential CPU offload for even lower memory</span> | |
| pipe.enable_sequential_cpu_offload()`,lang:"py",wrap:!1}}),H=new le({props:{title:"PRXPipeline",local:"diffusers.PRXPipeline",headingTag:"h2"}}),L=new oe({props:{name:"class diffusers.PRXPipeline",anchor:"diffusers.PRXPipeline",parameters:[{name:"transformer",val:": PRXTransformer2DModel"},{name:"scheduler",val:": FlowMatchEulerDiscreteScheduler"},{name:"text_encoder",val:": T5GemmaEncoder"},{name:"tokenizer",val:": transformers.models.t5.tokenization_t5.T5Tokenizer | transformers.models.gemma.tokenization_gemma.GemmaTokenizer | transformers.models.auto.tokenization_auto.AutoTokenizer"},{name:"vae",val:": diffusers.models.autoencoders.autoencoder_kl.AutoencoderKL | diffusers.models.autoencoders.autoencoder_dc.AutoencoderDC | None = None"},{name:"default_sample_size",val:": int | None = 512"}],parametersDescription:[{anchor:"diffusers.PRXPipeline.transformer",description:`<strong>transformer</strong> (<code>PRXTransformer2DModel</code>) — | |
| The PRX transformer model to denoise the encoded image latents.`,name:"transformer"},{anchor:"diffusers.PRXPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/pr_13769/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"},{anchor:"diffusers.PRXPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>T5GemmaEncoder</code>) — | |
| Text encoder model for encoding prompts.`,name:"text_encoder"},{anchor:"diffusers.PRXPipeline.tokenizer",description:`<strong>tokenizer</strong> ([<code>T5TokenizerFast</code> or <code>GemmaTokenizerFast</code>]) — | |
| Tokenizer for the text encoder.`,name:"tokenizer"},{anchor:"diffusers.PRXPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/pr_13769/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a> or <a href="/docs/diffusers/pr_13769/en/api/models/autoencoder_dc#diffusers.AutoencoderDC">AutoencoderDC</a>) — | |
| Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations. | |
| Supports both AutoencoderKL (8x compression) and AutoencoderDC (32x compression).`,name:"vae"}],source:"https://github.com/huggingface/diffusers/blob/vr_13769/src/diffusers/pipelines/prx/pipeline_prx.py#L251"}}),S=new oe({props:{name:"__call__",anchor:"diffusers.PRXPipeline.__call__",parameters:[{name:"prompt",val:": str | list[str] = None"},{name:"negative_prompt",val:": str = ''"},{name:"height",val:": int | None = None"},{name:"width",val:": int | None = None"},{name:"num_inference_steps",val:": int = 28"},{name:"timesteps",val:": list = None"},{name:"guidance_scale",val:": float = 4.0"},{name:"num_images_per_prompt",val:": int | None = 1"},{name:"generator",val:": torch._C.Generator | list[torch._C.Generator] | None = None"},{name:"latents",val:": torch.Tensor | None = None"},{name:"prompt_embeds",val:": torch.FloatTensor | None = None"},{name:"negative_prompt_embeds",val:": torch.FloatTensor | None = None"},{name:"prompt_attention_mask",val:": torch.BoolTensor | None = None"},{name:"negative_prompt_attention_mask",val:": torch.BoolTensor | None = None"},{name:"output_type",val:": str | None = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"use_resolution_binning",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.PRXPipeline.__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.PRXPipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code>, <em>optional</em>, defaults to <code>""</code>) — | |
| The prompt or prompts not to guide the image generation. Ignored when not using guidance (i.e., ignored | |
| if <code>guidance_scale</code> is less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.PRXPipeline.__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.`,name:"height"},{anchor:"diffusers.PRXPipeline.__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.`,name:"width"},{anchor:"diffusers.PRXPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 28) — | |
| 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.PRXPipeline.__call__.timesteps",description:`<strong>timesteps</strong> (<code>list[int]</code>, <em>optional</em>) — | |
| Custom timesteps to use for the denoising process with schedulers which support a <code>timesteps</code> argument | |
| in their <code>set_timesteps</code> method. If not defined, the default behavior when <code>num_inference_steps</code> is | |
| passed will be used. Must be in descending order.`,name:"timesteps"},{anchor:"diffusers.PRXPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 4.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.PRXPipeline.__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.PRXPipeline.__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.PRXPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.Tensor</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.PRXPipeline.__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.PRXPipeline.__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 and <code>guidance_scale > 1</code>, negative embeddings will be generated from an | |
| empty string.`,name:"negative_prompt_embeds"},{anchor:"diffusers.PRXPipeline.__call__.prompt_attention_mask",description:`<strong>prompt_attention_mask</strong> (<code>torch.BoolTensor</code>, <em>optional</em>) — | |
| Pre-generated attention mask for <code>prompt_embeds</code>. If not provided, attention mask will be generated | |
| from <code>prompt</code> input argument.`,name:"prompt_attention_mask"},{anchor:"diffusers.PRXPipeline.__call__.negative_prompt_attention_mask",description:`<strong>negative_prompt_attention_mask</strong> (<code>torch.BoolTensor</code>, <em>optional</em>) — | |
| Pre-generated attention mask for <code>negative_prompt_embeds</code>. If not provided and <code>guidance_scale > 1</code>, | |
| attention mask will be generated from an empty string.`,name:"negative_prompt_attention_mask"},{anchor:"diffusers.PRXPipeline.__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.PRXPipeline.__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 <a href="/docs/diffusers/pr_13769/en/api/pipelines/prx#diffusers.pipelines.prx.PRXPipelineOutput">PRXPipelineOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.PRXPipeline.__call__.use_resolution_binning",description:`<strong>use_resolution_binning</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| If set to <code>True</code>, the requested height and width are first mapped to the closest resolutions using | |
| predefined aspect ratio bins. After the produced latents are decoded into images, they are resized back | |
| to the requested resolution. Useful for generating non-square images at optimal resolutions.`,name:"use_resolution_binning"},{anchor:"diffusers.PRXPipeline.__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, step, timestep, callback_kwargs)</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.PRXPipeline.__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 tensors that are listed | |
| in the <code>._callback_tensor_inputs</code> attribute.`,name:"callback_on_step_end_tensor_inputs"}],source:"https://github.com/huggingface/diffusers/blob/vr_13769/src/diffusers/pipelines/prx/pipeline_prx.py#L525",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><a | |
| href="/docs/diffusers/pr_13769/en/api/pipelines/prx#diffusers.pipelines.prx.PRXPipelineOutput" | |
| >PRXPipelineOutput</a> if <code>return_dict</code> is | |
| True, otherwise a \`tuple. When returning a tuple, 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_13769/en/api/pipelines/prx#diffusers.pipelines.prx.PRXPipelineOutput" | |
| >PRXPipelineOutput</a> or <code>tuple</code></p> | |
| `}}),P=new yt({props:{anchor:"diffusers.PRXPipeline.__call__.example",$$slots:{default:[vt]},$$scope:{ctx:ge}}}),q=new oe({props:{name:"check_inputs",anchor:"diffusers.PRXPipeline.check_inputs",parameters:[{name:"prompt",val:": str | list[str]"},{name:"height",val:": int"},{name:"width",val:": int"},{name:"guidance_scale",val:": float"},{name:"callback_on_step_end_tensor_inputs",val:": list[str] | None = None"},{name:"prompt_embeds",val:": torch.FloatTensor | None = None"},{name:"negative_prompt_embeds",val:": torch.FloatTensor | None = None"}],source:"https://github.com/huggingface/diffusers/blob/vr_13769/src/diffusers/pipelines/prx/pipeline_prx.py#L473"}}),D=new oe({props:{name:"encode_prompt",anchor:"diffusers.PRXPipeline.encode_prompt",parameters:[{name:"prompt",val:": str | list[str]"},{name:"device",val:": torch.device | None = None"},{name:"do_classifier_free_guidance",val:": bool = True"},{name:"negative_prompt",val:": str = ''"},{name:"num_images_per_prompt",val:": int = 1"},{name:"prompt_embeds",val:": torch.FloatTensor | None = None"},{name:"negative_prompt_embeds",val:": torch.FloatTensor | None = None"},{name:"prompt_attention_mask",val:": torch.BoolTensor | None = None"},{name:"negative_prompt_attention_mask",val:": torch.BoolTensor | None = None"}],source:"https://github.com/huggingface/diffusers/blob/vr_13769/src/diffusers/pipelines/prx/pipeline_prx.py#L370"}}),O=new oe({props:{name:"get_default_resolution",anchor:"diffusers.PRXPipeline.get_default_resolution",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_13769/src/diffusers/pipelines/prx/pipeline_prx.py#L334",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>The default sample size (height/width) to use for generation.</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>int</p> | |
| `}}),K=new oe({props:{name:"prepare_latents",anchor:"diffusers.PRXPipeline.prepare_latents",parameters:[{name:"batch_size",val:": int"},{name:"num_channels_latents",val:": int"},{name:"height",val:": int"},{name:"width",val:": int"},{name:"dtype",val:": dtype"},{name:"device",val:": device"},{name:"generator",val:": torch._C.Generator | None = None"},{name:"latents",val:": torch.Tensor | None = None"}],source:"https://github.com/huggingface/diffusers/blob/vr_13769/src/diffusers/pipelines/prx/pipeline_prx.py#L346"}}),ee=new le({props:{title:"PRXPipelineOutput",local:"diffusers.pipelines.prx.PRXPipelineOutput",headingTag:"h2"}}),te=new oe({props:{name:"class diffusers.pipelines.prx.PRXPipelineOutput",anchor:"diffusers.pipelines.prx.PRXPipelineOutput",parameters:[{name:"images",val:": list[PIL.Image.Image] | numpy.ndarray"}],parametersDescription:[{anchor:"diffusers.pipelines.prx.PRXPipelineOutput.images",description:`<strong>images</strong> (<code>list[PIL.Image.Image]</code> or <code>np.ndarray</code>) — | |
| list of denoised PIL images of length <code>batch_size</code> or numpy array of shape <code>(batch_size, height, width, num_channels)</code>. PIL images or numpy array present the denoised images of the diffusion pipeline.`,name:"images"}],source:"https://github.com/huggingface/diffusers/blob/vr_13769/src/diffusers/pipelines/prx/pipeline_output.py#L24"}}),ne=new Jt({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/prx.md"}}),{c(){_=r("meta"),U=o(),y=r("p"),b=o(),p(j.$$.fragment),h=o(),T=r("p"),T.textContent=nt,he=o(),p($.$$.fragment),Me=o(),R=r("p"),R.innerHTML=ot,_e=o(),B=r("table"),B.innerHTML=lt,we=o(),C=r("p"),C.innerHTML=at,be=o(),p(E.$$.fragment),je=o(),W=r("p"),W.innerHTML=st,Te=o(),p(N.$$.fragment),ye=o(),p(V.$$.fragment),Je=o(),F=r("p"),F.textContent=rt,ve=o(),p(G.$$.fragment),xe=o(),p(Q.$$.fragment),Ie=o(),z=r("p"),z.textContent=it,Pe=o(),p(Y.$$.fragment),Ze=o(),p(H.$$.fragment),Ae=o(),d=r("div"),p(L.$$.fragment),Fe=o(),ae=r("p"),ae.textContent=dt,Ge=o(),se=r("p"),se.innerHTML=pt,Qe=o(),J=r("div"),p(S.$$.fragment),ze=o(),re=r("p"),re.textContent=ct,Ye=o(),p(P.$$.fragment),He=o(),Z=r("div"),p(q.$$.fragment),Le=o(),ie=r("p"),ie.textContent=mt,Se=o(),A=r("div"),p(D.$$.fragment),qe=o(),de=r("p"),de.textContent=ft,De=o(),k=r("div"),p(O.$$.fragment),Oe=o(),pe=r("p"),pe.textContent=ut,Ke=o(),X=r("div"),p(K.$$.fragment),et=o(),ce=r("p"),ce.textContent=gt,ke=o(),p(ee.$$.fragment),Xe=o(),v=r("div"),p(te.$$.fragment),tt=o(),me=r("p"),me.textContent=ht,Ue=o(),p(ne.$$.fragment),$e=o(),ue=r("p"),this.h()},l(e){const t=Tt("svelte-u9bgzb",document.head);_=i(t,"META",{name:!0,content:!0}),t.forEach(n),U=l(e),y=i(e,"P",{}),x(y).forEach(n),b=l(e),c(j.$$.fragment,e),h=l(e),T=i(e,"P",{"data-svelte-h":!0}),w(T)!=="svelte-m5sak4"&&(T.textContent=nt),he=l(e),c($.$$.fragment,e),Me=l(e),R=i(e,"P",{"data-svelte-h":!0}),w(R)!=="svelte-1h5j4x4"&&(R.innerHTML=ot),_e=l(e),B=i(e,"TABLE",{"data-svelte-h":!0}),w(B)!=="svelte-19j5tak"&&(B.innerHTML=lt),we=l(e),C=i(e,"P",{"data-svelte-h":!0}),w(C)!=="svelte-1enwsbq"&&(C.innerHTML=at),be=l(e),c(E.$$.fragment,e),je=l(e),W=i(e,"P",{"data-svelte-h":!0}),w(W)!=="svelte-ol8c6p"&&(W.innerHTML=st),Te=l(e),c(N.$$.fragment,e),ye=l(e),c(V.$$.fragment,e),Je=l(e),F=i(e,"P",{"data-svelte-h":!0}),w(F)!=="svelte-xfqnac"&&(F.textContent=rt),ve=l(e),c(G.$$.fragment,e),xe=l(e),c(Q.$$.fragment,e),Ie=l(e),z=i(e,"P",{"data-svelte-h":!0}),w(z)!=="svelte-8u7gup"&&(z.textContent=it),Pe=l(e),c(Y.$$.fragment,e),Ze=l(e),c(H.$$.fragment,e),Ae=l(e),d=i(e,"DIV",{class:!0});var M=x(d);c(L.$$.fragment,M),Fe=l(M),ae=i(M,"P",{"data-svelte-h":!0}),w(ae)!=="svelte-jlclpv"&&(ae.textContent=dt),Ge=l(M),se=i(M,"P",{"data-svelte-h":!0}),w(se)!=="svelte-s26c6t"&&(se.innerHTML=pt),Qe=l(M),J=i(M,"DIV",{class:!0});var fe=x(J);c(S.$$.fragment,fe),ze=l(fe),re=i(fe,"P",{"data-svelte-h":!0}),w(re)!=="svelte-v78lg8"&&(re.textContent=ct),Ye=l(fe),c(P.$$.fragment,fe),fe.forEach(n),He=l(M),Z=i(M,"DIV",{class:!0});var Be=x(Z);c(q.$$.fragment,Be),Le=l(Be),ie=i(Be,"P",{"data-svelte-h":!0}),w(ie)!=="svelte-x9auef"&&(ie.textContent=mt),Be.forEach(n),Se=l(M),A=i(M,"DIV",{class:!0});var Ce=x(A);c(D.$$.fragment,Ce),qe=l(Ce),de=i(Ce,"P",{"data-svelte-h":!0}),w(de)!=="svelte-1o7rddz"&&(de.textContent=ft),Ce.forEach(n),De=l(M),k=i(M,"DIV",{class:!0});var Ee=x(k);c(O.$$.fragment,Ee),Oe=l(Ee),pe=i(Ee,"P",{"data-svelte-h":!0}),w(pe)!=="svelte-1pf05cy"&&(pe.textContent=ut),Ee.forEach(n),Ke=l(M),X=i(M,"DIV",{class:!0});var We=x(X);c(K.$$.fragment,We),et=l(We),ce=i(We,"P",{"data-svelte-h":!0}),w(ce)!=="svelte-vy3whk"&&(ce.textContent=gt),We.forEach(n),M.forEach(n),ke=l(e),c(ee.$$.fragment,e),Xe=l(e),v=i(e,"DIV",{class:!0});var Ne=x(v);c(te.$$.fragment,Ne),tt=l(Ne),me=i(Ne,"P",{"data-svelte-h":!0}),w(me)!=="svelte-1l7a397"&&(me.textContent=ht),Ne.forEach(n),Ue=l(e),c(ne.$$.fragment,e),$e=l(e),ue=i(e,"P",{}),x(ue).forEach(n),this.h()},h(){I(_,"name","hf:doc:metadata"),I(_,"content",It),I(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(d,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(v,"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){s(document.head,_),a(e,U,t),a(e,y,t),a(e,b,t),m(j,e,t),a(e,h,t),a(e,T,t),a(e,he,t),m($,e,t),a(e,Me,t),a(e,R,t),a(e,_e,t),a(e,B,t),a(e,we,t),a(e,C,t),a(e,be,t),m(E,e,t),a(e,je,t),a(e,W,t),a(e,Te,t),m(N,e,t),a(e,ye,t),m(V,e,t),a(e,Je,t),a(e,F,t),a(e,ve,t),m(G,e,t),a(e,xe,t),m(Q,e,t),a(e,Ie,t),a(e,z,t),a(e,Pe,t),m(Y,e,t),a(e,Ze,t),m(H,e,t),a(e,Ae,t),a(e,d,t),m(L,d,null),s(d,Fe),s(d,ae),s(d,Ge),s(d,se),s(d,Qe),s(d,J),m(S,J,null),s(J,ze),s(J,re),s(J,Ye),m(P,J,null),s(d,He),s(d,Z),m(q,Z,null),s(Z,Le),s(Z,ie),s(d,Se),s(d,A),m(D,A,null),s(A,qe),s(A,de),s(d,De),s(d,k),m(O,k,null),s(k,Oe),s(k,pe),s(d,Ke),s(d,X),m(K,X,null),s(X,et),s(X,ce),a(e,ke,t),m(ee,e,t),a(e,Xe,t),a(e,v,t),m(te,v,null),s(v,tt),s(v,me),a(e,Ue,t),m(ne,e,t),a(e,$e,t),a(e,ue,t),Re=!0},p(e,[t]){const M={};t&2&&(M.$$scope={dirty:t,ctx:e}),P.$set(M)},i(e){Re||(f(j.$$.fragment,e),f($.$$.fragment,e),f(E.$$.fragment,e),f(N.$$.fragment,e),f(V.$$.fragment,e),f(G.$$.fragment,e),f(Q.$$.fragment,e),f(Y.$$.fragment,e),f(H.$$.fragment,e),f(L.$$.fragment,e),f(S.$$.fragment,e),f(P.$$.fragment,e),f(q.$$.fragment,e),f(D.$$.fragment,e),f(O.$$.fragment,e),f(K.$$.fragment,e),f(ee.$$.fragment,e),f(te.$$.fragment,e),f(ne.$$.fragment,e),Re=!0)},o(e){u(j.$$.fragment,e),u($.$$.fragment,e),u(E.$$.fragment,e),u(N.$$.fragment,e),u(V.$$.fragment,e),u(G.$$.fragment,e),u(Q.$$.fragment,e),u(Y.$$.fragment,e),u(H.$$.fragment,e),u(L.$$.fragment,e),u(S.$$.fragment,e),u(P.$$.fragment,e),u(q.$$.fragment,e),u(D.$$.fragment,e),u(O.$$.fragment,e),u(K.$$.fragment,e),u(ee.$$.fragment,e),u(te.$$.fragment,e),u(ne.$$.fragment,e),Re=!1},d(e){e&&(n(U),n(y),n(b),n(h),n(T),n(he),n(Me),n(R),n(_e),n(B),n(we),n(C),n(be),n(je),n(W),n(Te),n(ye),n(Je),n(F),n(ve),n(xe),n(Ie),n(z),n(Pe),n(Ze),n(Ae),n(d),n(ke),n(Xe),n(v),n(Ue),n($e),n(ue)),n(_),g(j,e),g($,e),g(E,e),g(N,e),g(V,e),g(G,e),g(Q,e),g(Y,e),g(H,e),g(L),g(S),g(P),g(q),g(D),g(O),g(K),g(ee,e),g(te),g(ne,e)}}}const It='{"title":"PRX","local":"prx","sections":[{"title":"Available models","local":"available-models","sections":[],"depth":2},{"title":"Loading the pipeline","local":"loading-the-pipeline","sections":[{"title":"Manual Component Loading","local":"manual-component-loading","sections":[],"depth":3}],"depth":2},{"title":"Memory Optimization","local":"memory-optimization","sections":[],"depth":2},{"title":"PRXPipeline","local":"diffusers.PRXPipeline","sections":[],"depth":2},{"title":"PRXPipelineOutput","local":"diffusers.pipelines.prx.PRXPipelineOutput","sections":[],"depth":2}],"depth":1}';function Pt(ge){return _t(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Rt extends bt{constructor(_){super(),jt(this,_,Pt,xt,Mt,{})}}export{Rt as component}; | |
Xet Storage Details
- Size:
- 41.7 kB
- Xet hash:
- b189eeb734a6073360eb4ae18c5ca834e750a0ff324f18ed4db6bf863716afee
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.