import{s as We,o as Be,n as ze}from"../chunks/scheduler.8c3d61f6.js";import{S as Re,i as Ae,g as l,s as a,r as _,A as Se,h as p,f as n,c as i,j as D,u,x as I,k as J,y as s,a as r,v as f,d as h,t as b,w as y}from"../chunks/index.da70eac4.js";import{T as Oe}from"../chunks/Tip.6f698f24.js";import{D as X}from"../chunks/Docstring.367be9ed.js";import{C as Xe}from"../chunks/CodeBlock.a9c4becf.js";import{E as Qe}from"../chunks/ExampleCodeBlock.dd9ee828.js";import{H as ve,E as qe}from"../chunks/getInferenceSnippets.cb466318.js";function Ye(Q){let o,$='<a href="../../optimization/cache">Caching</a> may also speed up inference by storing and reusing intermediate outputs.';return{c(){o=l("p"),o.innerHTML=$},l(c){o=p(c,"P",{"data-svelte-h":!0}),I(o)!=="svelte-yvhnlz"&&(o.innerHTML=$)},m(c,v){r(c,o,v)},p:ze,d(c){c&&n(o)}}}function Ke(Q){let o,$="Examples:",c,v,w;return v=new Xe({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMExsYW1hRm9yQ2F1c2FsTE0lMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwSGlEcmVhbUltYWdlUGlwZWxpbmUlMEElMEElMEF0b2tlbml6ZXJfNCUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMm1ldGEtbGxhbWElMkZNZXRhLUxsYW1hLTMuMS04Qi1JbnN0cnVjdCUyMiklMEF0ZXh0X2VuY29kZXJfNCUyMCUzRCUyMExsYW1hRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMm1ldGEtbGxhbWElMkZNZXRhLUxsYW1hLTMuMS04Qi1JbnN0cnVjdCUyMiUyQyUwQSUyMCUyMCUyMCUyMG91dHB1dF9oaWRkZW5fc3RhdGVzJTNEVHJ1ZSUyQyUwQSUyMCUyMCUyMCUyMG91dHB1dF9hdHRlbnRpb25zJTNEVHJ1ZSUyQyUwQSUyMCUyMCUyMCUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYlMkMlMEEpJTBBJTBBcGlwZSUyMCUzRCUyMEhpRHJlYW1JbWFnZVBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJIaURyZWFtLWFpJTJGSGlEcmVhbS1JMS1GdWxsJTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9rZW5pemVyXzQlM0R0b2tlbml6ZXJfNCUyQyUwQSUyMCUyMCUyMCUyMHRleHRfZW5jb2Rlcl80JTNEdGV4dF9lbmNvZGVyXzQlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2JTJDJTBBKSUwQXBpcGUuZW5hYmxlX21vZGVsX2NwdV9vZmZsb2FkKCklMEElMEFpbWFnZSUyMCUzRCUyMHBpcGUoJTBBJTIwJTIwJTIwJTIwJ0ElMjBjYXQlMjBob2xkaW5nJTIwYSUyMHNpZ24lMjB0aGF0JTIwc2F5cyUyMCUyMkhpLURyZWFtcy5haSUyMi4nJTJDJTBBJTIwJTIwJTIwJTIwaGVpZ2h0JTNEMTAyNCUyQyUwQSUyMCUyMCUyMCUyMHdpZHRoJTNEMTAyNCUyQyUwQSUyMCUyMCUyMCUyMGd1aWRhbmNlX3NjYWxlJTNENS4wJTJDJTBBJTIwJTIwJTIwJTIwbnVtX2luZmVyZW5jZV9zdGVwcyUzRDUwJTJDJTBBJTIwJTIwJTIwJTIwZ2VuZXJhdG9yJTNEdG9yY2guR2VuZXJhdG9yKCUyMmN1ZGElMjIpLm1hbnVhbF9zZWVkKDApJTJDJTBBKS5pbWFnZXMlNUIwJTVEJTBBaW1hZ2Uuc2F2ZSglMjJvdXRwdXQucG5nJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, LlamaForCausalLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> HiDreamImagePipeline


<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer_4 = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;meta-llama/Meta-Llama-3.1-8B-Instruct&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>text_encoder_4 = LlamaForCausalLM.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;meta-llama/Meta-Llama-3.1-8B-Instruct&quot;</span>,
<span class="hljs-meta">... </span>    output_hidden_states=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    output_attentions=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    torch_dtype=torch.bfloat16,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = HiDreamImagePipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;HiDream-ai/HiDream-I1-Full&quot;</span>,
<span class="hljs-meta">... </span>    tokenizer_4=tokenizer_4,
<span class="hljs-meta">... </span>    text_encoder_4=text_encoder_4,
<span class="hljs-meta">... </span>    torch_dtype=torch.bfloat16,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.enable_model_cpu_offload()

<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(
<span class="hljs-meta">... </span>    <span class="hljs-string">&#x27;A cat holding a sign that says &quot;Hi-Dreams.ai&quot;.&#x27;</span>,
<span class="hljs-meta">... </span>    height=<span class="hljs-number">1024</span>,
<span class="hljs-meta">... </span>    width=<span class="hljs-number">1024</span>,
<span class="hljs-meta">... </span>    guidance_scale=<span class="hljs-number">5.0</span>,
<span class="hljs-meta">... </span>    num_inference_steps=<span class="hljs-number">50</span>,
<span class="hljs-meta">... </span>    generator=torch.Generator(<span class="hljs-string">&quot;cuda&quot;</span>).manual_seed(<span class="hljs-number">0</span>),
<span class="hljs-meta">... </span>).images[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image.save(<span class="hljs-string">&quot;output.png&quot;</span>)`,wrap:!1}}),{c(){o=l("p"),o.textContent=$,c=a(),_(v.$$.fragment)},l(m){o=p(m,"P",{"data-svelte-h":!0}),I(o)!=="svelte-kvfsh7"&&(o.textContent=$),c=i(m),u(v.$$.fragment,m)},m(m,T){r(m,o,T),r(m,c,T),f(v,m,T),w=!0},p:ze,i(m){w||(h(v.$$.fragment,m),w=!0)},o(m){b(v.$$.fragment,m),w=!1},d(m){m&&(n(o),n(c)),y(v,m)}}}function et(Q){let o,$,c,v,w,m,T,ke='<a href="https://huggingface.co/HiDream-ai" rel="nofollow">HiDream-I1</a> by HiDream.ai',ie,U,oe,E,se,N,Le='The following models are available for the <a href="text-to-image"><code>HiDreamImagePipeline</code></a> pipeline:',re,F,je='<thead><tr><th align="left">Model name</th> <th align="left">Description</th></tr></thead> <tbody><tr><td align="left"><a href="https://huggingface.co/HiDream-ai/HiDream-I1-Full" rel="nofollow"><code>HiDream-ai/HiDream-I1-Full</code></a></td> <td align="left">-</td></tr> <tr><td align="left"><a href="https://huggingface.co/HiDream-ai/HiDream-I1-Dev" rel="nofollow"><code>HiDream-ai/HiDream-I1-Dev</code></a></td> <td align="left">-</td></tr> <tr><td align="left"><a href="https://huggingface.co/HiDream-ai/HiDream-I1-Fast" rel="nofollow"><code>HiDream-ai/HiDream-I1-Fast</code></a></td> <td align="left">-</td></tr></tbody>',le,Z,pe,d,V,we,x,G,Te,q,Ee="Function invoked when calling the pipeline for generation.",Ie,C,$e,P,z,xe,Y,Ne=`Disable sliced VAE decoding. If <code>enable_vae_slicing</code> was previously enabled, this method will go back to
computing decoding in one step.`,Me,k,W,He,K,Fe=`Disable tiled VAE decoding. If <code>enable_vae_tiling</code> was previously enabled, this method will go back to
computing decoding in one step.`,De,L,B,Je,ee,Ze=`Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to
compute decoding in several steps. This is useful to save some memory and allow larger batch sizes.`,Ue,j,R,Ce,te,Ve=`Enable tiled VAE decoding. When this option is enabled, the VAE will split the input tensor into tiles to
compute decoding and encoding in several steps. This is useful for saving a large amount of memory and to allow
processing larger images.`,me,A,de,M,S,Pe,ne,Ge="Output class for HiDreamImage pipelines.",ce,O,ge,ae,_e;return w=new ve({props:{title:"HiDreamImage",local:"hidreamimage",headingTag:"h1"}}),U=new Oe({props:{$$slots:{default:[Ye]},$$scope:{ctx:Q}}}),E=new ve({props:{title:"Available models",local:"available-models",headingTag:"h2"}}),Z=new ve({props:{title:"HiDreamImagePipeline",local:"diffusers.HiDreamImagePipeline",headingTag:"h2"}}),V=new X({props:{name:"class diffusers.HiDreamImagePipeline",anchor:"diffusers.HiDreamImagePipeline",parameters:[{name:"scheduler",val:": FlowMatchEulerDiscreteScheduler"},{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": CLIPTextModelWithProjection"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"text_encoder_2",val:": CLIPTextModelWithProjection"},{name:"tokenizer_2",val:": CLIPTokenizer"},{name:"text_encoder_3",val:": T5EncoderModel"},{name:"tokenizer_3",val:": T5Tokenizer"},{name:"text_encoder_4",val:": LlamaForCausalLM"},{name:"tokenizer_4",val:": PreTrainedTokenizerFast"},{name:"transformer",val:": HiDreamImageTransformer2DModel"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/hidream_image/pipeline_hidream_image.py#L160"}}),G=new X({props:{name:"__call__",anchor:"diffusers.HiDreamImagePipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"prompt_2",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"prompt_3",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"prompt_4",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": int = 50"},{name:"sigmas",val:": typing.Optional[typing.List[float]] = None"},{name:"guidance_scale",val:": float = 5.0"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"negative_prompt_2",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"negative_prompt_3",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"negative_prompt_4",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.FloatTensor] = None"},{name:"prompt_embeds_t5",val:": typing.Optional[torch.FloatTensor] = None"},{name:"prompt_embeds_llama3",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds_t5",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds_llama3",val:": typing.Optional[torch.FloatTensor] = None"},{name:"pooled_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_pooled_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"attention_kwargs",val:": typing.Optional[typing.Dict[str, typing.Any]] = None"},{name:"callback_on_step_end",val:": typing.Optional[typing.Callable[[int, int, typing.Dict], NoneType]] = None"},{name:"callback_on_step_end_tensor_inputs",val:": typing.List[str] = ['latents']"},{name:"max_sequence_length",val:": int = 128"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.HiDreamImagePipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
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.HiDreamImagePipeline.__call__.prompt_2",description:`<strong>prompt_2</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to be sent to <code>tokenizer_2</code> and <code>text_encoder_2</code>. If not defined, <code>prompt</code> is
will be used instead.`,name:"prompt_2"},{anchor:"diffusers.HiDreamImagePipeline.__call__.prompt_3",description:`<strong>prompt_3</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to be sent to <code>tokenizer_3</code> and <code>text_encoder_3</code>. If not defined, <code>prompt</code> is
will be used instead.`,name:"prompt_3"},{anchor:"diffusers.HiDreamImagePipeline.__call__.prompt_4",description:`<strong>prompt_4</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to be sent to <code>tokenizer_4</code> and <code>text_encoder_4</code>. If not defined, <code>prompt</code> is
will be used instead.`,name:"prompt_4"},{anchor:"diffusers.HiDreamImagePipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) &#x2014;
The height in pixels of the generated image. This is set to 1024 by default for the best results.`,name:"height"},{anchor:"diffusers.HiDreamImagePipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) &#x2014;
The width in pixels of the generated image. This is set to 1024 by default for the best results.`,name:"width"},{anchor:"diffusers.HiDreamImagePipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 50) &#x2014;
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.HiDreamImagePipeline.__call__.sigmas",description:`<strong>sigmas</strong> (<code>List[float]</code>, <em>optional</em>) &#x2014;
Custom sigmas to use for the denoising process with schedulers which support a <code>sigmas</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.`,name:"sigmas"},{anchor:"diffusers.HiDreamImagePipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 3.5) &#x2014;
Embedded guiddance scale is enabled by setting <code>guidance_scale</code> &gt; 1. Higher <code>guidance_scale</code> encourages
a model to generate images more aligned with <code>prompt</code> at the expense of lower image quality.</p>
<p>Guidance-distilled models approximates true classifer-free guidance for <code>guidance_scale</code> &gt; 1. Refer to
the <a href="https://huggingface.co/papers/2210.03142" rel="nofollow">paper</a> to learn more.`,name:"guidance_scale"},{anchor:"diffusers.HiDreamImagePipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
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>true_cfg_scale</code> is
not greater than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.HiDreamImagePipeline.__call__.negative_prompt_2",description:`<strong>negative_prompt_2</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation to be sent to <code>tokenizer_2</code> and
<code>text_encoder_2</code>. If not defined, <code>negative_prompt</code> is used in all the text-encoders.`,name:"negative_prompt_2"},{anchor:"diffusers.HiDreamImagePipeline.__call__.negative_prompt_3",description:`<strong>negative_prompt_3</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation to be sent to <code>tokenizer_3</code> and
<code>text_encoder_3</code>. If not defined, <code>negative_prompt</code> is used in all the text-encoders.`,name:"negative_prompt_3"},{anchor:"diffusers.HiDreamImagePipeline.__call__.negative_prompt_4",description:`<strong>negative_prompt_4</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation to be sent to <code>tokenizer_4</code> and
<code>text_encoder_4</code>. If not defined, <code>negative_prompt</code> is used in all the text-encoders.`,name:"negative_prompt_4"},{anchor:"diffusers.HiDreamImagePipeline.__call__.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of images to generate per prompt.`,name:"num_images_per_prompt"},{anchor:"diffusers.HiDreamImagePipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) &#x2014;
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.HiDreamImagePipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
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.HiDreamImagePipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
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.HiDreamImagePipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
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.HiDreamImagePipeline.__call__.pooled_prompt_embeds",description:`<strong>pooled_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated pooled text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting.
If not provided, pooled text embeddings will be generated from <code>prompt</code> input argument.`,name:"pooled_prompt_embeds"},{anchor:"diffusers.HiDreamImagePipeline.__call__.negative_pooled_prompt_embeds",description:`<strong>negative_pooled_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative pooled text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, pooled negative_prompt_embeds will be generated from <code>negative_prompt</code>
input argument.`,name:"negative_pooled_prompt_embeds"},{anchor:"diffusers.HiDreamImagePipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;pil&quot;</code>) &#x2014;
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.HiDreamImagePipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return a <code>~pipelines.flux.FluxPipelineOutput</code> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.HiDreamImagePipeline.__call__.attention_kwargs",description:`<strong>attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
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.HiDreamImagePipeline.__call__.callback_on_step_end",description:`<strong>callback_on_step_end</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
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.HiDreamImagePipeline.__call__.callback_on_step_end_tensor_inputs",description:`<strong>callback_on_step_end_tensor_inputs</strong> (<code>List</code>, <em>optional</em>) &#x2014;
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.HiDreamImagePipeline.__call__.max_sequence_length",description:"<strong>max_sequence_length</strong> (<code>int</code> defaults to 128) &#x2014; Maximum sequence length to use with the <code>prompt</code>.",name:"max_sequence_length"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/hidream_image/pipeline_hidream_image.py#L728",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>~pipelines.hidream_image.HiDreamImagePipelineOutput</code> if <code>return_dict</code> is True, otherwise a <code>tuple</code>. 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><code>~pipelines.hidream_image.HiDreamImagePipelineOutput</code> or <code>tuple</code></p>
`}}),C=new Qe({props:{anchor:"diffusers.HiDreamImagePipeline.__call__.example",$$slots:{default:[Ke]},$$scope:{ctx:Q}}}),z=new X({props:{name:"disable_vae_slicing",anchor:"diffusers.HiDreamImagePipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/hidream_image/pipeline_hidream_image.py#L533"}}),W=new X({props:{name:"disable_vae_tiling",anchor:"diffusers.HiDreamImagePipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/hidream_image/pipeline_hidream_image.py#L560"}}),B=new X({props:{name:"enable_vae_slicing",anchor:"diffusers.HiDreamImagePipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/hidream_image/pipeline_hidream_image.py#L520"}}),R=new X({props:{name:"enable_vae_tiling",anchor:"diffusers.HiDreamImagePipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/hidream_image/pipeline_hidream_image.py#L546"}}),A=new ve({props:{title:"HiDreamImagePipelineOutput",local:"diffusers.pipelines.hidream_image.pipeline_output.HiDreamImagePipelineOutput",headingTag:"h2"}}),S=new X({props:{name:"class diffusers.pipelines.hidream_image.pipeline_output.HiDreamImagePipelineOutput",anchor:"diffusers.pipelines.hidream_image.pipeline_output.HiDreamImagePipelineOutput",parameters:[{name:"images",val:": typing.Union[typing.List[PIL.Image.Image], numpy.ndarray]"}],parametersDescription:[{anchor:"diffusers.pipelines.hidream_image.pipeline_output.HiDreamImagePipelineOutput.images",description:`<strong>images</strong> (<code>List[PIL.Image.Image]</code> or <code>np.ndarray</code>) &#x2014;
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/main/src/diffusers/pipelines/hidream_image/pipeline_output.py#L25"}}),O=new qe({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/hidream.md"}}),{c(){o=l("meta"),$=a(),c=l("p"),v=a(),_(w.$$.fragment),m=a(),T=l("p"),T.innerHTML=ke,ie=a(),_(U.$$.fragment),oe=a(),_(E.$$.fragment),se=a(),N=l("p"),N.innerHTML=Le,re=a(),F=l("table"),F.innerHTML=je,le=a(),_(Z.$$.fragment),pe=a(),d=l("div"),_(V.$$.fragment),we=a(),x=l("div"),_(G.$$.fragment),Te=a(),q=l("p"),q.textContent=Ee,Ie=a(),_(C.$$.fragment),$e=a(),P=l("div"),_(z.$$.fragment),xe=a(),Y=l("p"),Y.innerHTML=Ne,Me=a(),k=l("div"),_(W.$$.fragment),He=a(),K=l("p"),K.innerHTML=Fe,De=a(),L=l("div"),_(B.$$.fragment),Je=a(),ee=l("p"),ee.textContent=Ze,Ue=a(),j=l("div"),_(R.$$.fragment),Ce=a(),te=l("p"),te.textContent=Ve,me=a(),_(A.$$.fragment),de=a(),M=l("div"),_(S.$$.fragment),Pe=a(),ne=l("p"),ne.textContent=Ge,ce=a(),_(O.$$.fragment),ge=a(),ae=l("p"),this.h()},l(e){const t=Se("svelte-u9bgzb",document.head);o=p(t,"META",{name:!0,content:!0}),t.forEach(n),$=i(e),c=p(e,"P",{}),D(c).forEach(n),v=i(e),u(w.$$.fragment,e),m=i(e),T=p(e,"P",{"data-svelte-h":!0}),I(T)!=="svelte-1afylb8"&&(T.innerHTML=ke),ie=i(e),u(U.$$.fragment,e),oe=i(e),u(E.$$.fragment,e),se=i(e),N=p(e,"P",{"data-svelte-h":!0}),I(N)!=="svelte-nosn57"&&(N.innerHTML=Le),re=i(e),F=p(e,"TABLE",{"data-svelte-h":!0}),I(F)!=="svelte-1qjrcq9"&&(F.innerHTML=je),le=i(e),u(Z.$$.fragment,e),pe=i(e),d=p(e,"DIV",{class:!0});var g=D(d);u(V.$$.fragment,g),we=i(g),x=p(g,"DIV",{class:!0});var H=D(x);u(G.$$.fragment,H),Te=i(H),q=p(H,"P",{"data-svelte-h":!0}),I(q)!=="svelte-v78lg8"&&(q.textContent=Ee),Ie=i(H),u(C.$$.fragment,H),H.forEach(n),$e=i(g),P=p(g,"DIV",{class:!0});var ue=D(P);u(z.$$.fragment,ue),xe=i(ue),Y=p(ue,"P",{"data-svelte-h":!0}),I(Y)!=="svelte-1s3c06i"&&(Y.innerHTML=Ne),ue.forEach(n),Me=i(g),k=p(g,"DIV",{class:!0});var fe=D(k);u(W.$$.fragment,fe),He=i(fe),K=p(fe,"P",{"data-svelte-h":!0}),I(K)!=="svelte-pkn4ui"&&(K.innerHTML=Fe),fe.forEach(n),De=i(g),L=p(g,"DIV",{class:!0});var he=D(L);u(B.$$.fragment,he),Je=i(he),ee=p(he,"P",{"data-svelte-h":!0}),I(ee)!=="svelte-14bnrb6"&&(ee.textContent=Ze),he.forEach(n),Ue=i(g),j=p(g,"DIV",{class:!0});var be=D(j);u(R.$$.fragment,be),Ce=i(be),te=p(be,"P",{"data-svelte-h":!0}),I(te)!=="svelte-1xwrf7t"&&(te.textContent=Ve),be.forEach(n),g.forEach(n),me=i(e),u(A.$$.fragment,e),de=i(e),M=p(e,"DIV",{class:!0});var ye=D(M);u(S.$$.fragment,ye),Pe=i(ye),ne=p(ye,"P",{"data-svelte-h":!0}),I(ne)!=="svelte-gyvvvk"&&(ne.textContent=Ge),ye.forEach(n),ce=i(e),u(O.$$.fragment,e),ge=i(e),ae=p(e,"P",{}),D(ae).forEach(n),this.h()},h(){J(o,"name","hf:doc:metadata"),J(o,"content",tt),J(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(d,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,t){s(document.head,o),r(e,$,t),r(e,c,t),r(e,v,t),f(w,e,t),r(e,m,t),r(e,T,t),r(e,ie,t),f(U,e,t),r(e,oe,t),f(E,e,t),r(e,se,t),r(e,N,t),r(e,re,t),r(e,F,t),r(e,le,t),f(Z,e,t),r(e,pe,t),r(e,d,t),f(V,d,null),s(d,we),s(d,x),f(G,x,null),s(x,Te),s(x,q),s(x,Ie),f(C,x,null),s(d,$e),s(d,P),f(z,P,null),s(P,xe),s(P,Y),s(d,Me),s(d,k),f(W,k,null),s(k,He),s(k,K),s(d,De),s(d,L),f(B,L,null),s(L,Je),s(L,ee),s(d,Ue),s(d,j),f(R,j,null),s(j,Ce),s(j,te),r(e,me,t),f(A,e,t),r(e,de,t),r(e,M,t),f(S,M,null),s(M,Pe),s(M,ne),r(e,ce,t),f(O,e,t),r(e,ge,t),r(e,ae,t),_e=!0},p(e,[t]){const g={};t&2&&(g.$$scope={dirty:t,ctx:e}),U.$set(g);const H={};t&2&&(H.$$scope={dirty:t,ctx:e}),C.$set(H)},i(e){_e||(h(w.$$.fragment,e),h(U.$$.fragment,e),h(E.$$.fragment,e),h(Z.$$.fragment,e),h(V.$$.fragment,e),h(G.$$.fragment,e),h(C.$$.fragment,e),h(z.$$.fragment,e),h(W.$$.fragment,e),h(B.$$.fragment,e),h(R.$$.fragment,e),h(A.$$.fragment,e),h(S.$$.fragment,e),h(O.$$.fragment,e),_e=!0)},o(e){b(w.$$.fragment,e),b(U.$$.fragment,e),b(E.$$.fragment,e),b(Z.$$.fragment,e),b(V.$$.fragment,e),b(G.$$.fragment,e),b(C.$$.fragment,e),b(z.$$.fragment,e),b(W.$$.fragment,e),b(B.$$.fragment,e),b(R.$$.fragment,e),b(A.$$.fragment,e),b(S.$$.fragment,e),b(O.$$.fragment,e),_e=!1},d(e){e&&(n($),n(c),n(v),n(m),n(T),n(ie),n(oe),n(se),n(N),n(re),n(F),n(le),n(pe),n(d),n(me),n(de),n(M),n(ce),n(ge),n(ae)),n(o),y(w,e),y(U,e),y(E,e),y(Z,e),y(V),y(G),y(C),y(z),y(W),y(B),y(R),y(A,e),y(S),y(O,e)}}}const tt='{"title":"HiDreamImage","local":"hidreamimage","sections":[{"title":"Available models","local":"available-models","sections":[],"depth":2},{"title":"HiDreamImagePipeline","local":"diffusers.HiDreamImagePipeline","sections":[],"depth":2},{"title":"HiDreamImagePipelineOutput","local":"diffusers.pipelines.hidream_image.pipeline_output.HiDreamImagePipelineOutput","sections":[],"depth":2}],"depth":1}';function nt(Q){return Be(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class mt extends Re{constructor(o){super(),Ae(this,o,nt,et,We,{})}}export{mt as component};
