import{s as We,o as Be,n as Re}from"../chunks/scheduler.53228c21.js";import{S as Oe,i as Ae,e as r,s as a,c as g,h as Se,a as l,d as t,b as i,f as M,g as _,j as T,k as H,l as o,m as s,n as u,t as f,o as h,p as b}from"../chunks/index.100fac89.js";import{D as S}from"../chunks/Docstring.d46840f1.js";import{C as Xe}from"../chunks/CodeBlock.d30a6509.js";import{E as qe}from"../chunks/ExampleCodeBlock.220b4f6e.js";import{H as ve,E as Qe}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.3fcbbc76.js";function Ye(ae){let m,k="Examples:",I,y,v;return y=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(){m=r("p"),m.textContent=k,I=a(),g(y.$$.fragment)},l(p){m=l(p,"P",{"data-svelte-h":!0}),T(m)!=="svelte-kvfsh7"&&(m.textContent=k),I=i(p),_(y.$$.fragment,p)},m(p,w){s(p,m,w),s(p,I,w),u(y,p,w),v=!0},p:Re,i(p){v||(f(y.$$.fragment,p),v=!0)},o(p){h(y.$$.fragment,p),v=!1},d(p){p&&(t(m),t(I)),b(y,p)}}}function Ke(ae){let m,k,I,y,v,p,w,ke='<a href="https://huggingface.co/HiDream-ai" rel="nofollow">HiDream-I1</a> by HiDream.ai',ie,L,Le="<p>[!TIP][Caching](../../optimization/cache) may also speed up inference by storing and reusing intermediate outputs.</p>",oe,j,se,E,je='The following models are available for the <a href="/docs/diffusers/main/en/api/pipelines/hidream#diffusers.HiDreamImagePipeline">HiDreamImagePipeline</a> pipeline:',re,N,Ee='<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,F,pe,d,Z,we,x,V,Te,X,Ne="Function invoked when calling the pipeline for generation.",Ie,D,xe,J,G,$e,q,Fe=`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,U,z,He,Q,Ze=`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,C,W,Je,Y,Ve=`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,P,B,Ce,K,Ge=`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,R,de,$,O,Pe,ee,ze="Output class for HiDreamImage pipelines.",ce,A,ge,ne,_e;return v=new ve({props:{title:"HiDreamImage",local:"hidreamimage",headingTag:"h1"}}),j=new ve({props:{title:"Available models",local:"available-models",headingTag:"h2"}}),F=new ve({props:{title:"HiDreamImagePipeline",local:"diffusers.HiDreamImagePipeline",headingTag:"h2"}}),Z=new S({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"}}),V=new S({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>
`}}),D=new qe({props:{anchor:"diffusers.HiDreamImagePipeline.__call__.example",$$slots:{default:[Ye]},$$scope:{ctx:ae}}}),G=new S({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"}}),z=new S({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"}}),W=new S({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"}}),B=new S({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"}}),R=new ve({props:{title:"HiDreamImagePipelineOutput",local:"diffusers.pipelines.hidream_image.pipeline_output.HiDreamImagePipelineOutput",headingTag:"h2"}}),O=new S({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"}}),A=new Qe({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/hidream.md"}}),{c(){m=r("meta"),k=a(),I=r("p"),y=a(),g(v.$$.fragment),p=a(),w=r("p"),w.innerHTML=ke,ie=a(),L=r("blockquote"),L.innerHTML=Le,oe=a(),g(j.$$.fragment),se=a(),E=r("p"),E.innerHTML=je,re=a(),N=r("table"),N.innerHTML=Ee,le=a(),g(F.$$.fragment),pe=a(),d=r("div"),g(Z.$$.fragment),we=a(),x=r("div"),g(V.$$.fragment),Te=a(),X=r("p"),X.textContent=Ne,Ie=a(),g(D.$$.fragment),xe=a(),J=r("div"),g(G.$$.fragment),$e=a(),q=r("p"),q.innerHTML=Fe,Me=a(),U=r("div"),g(z.$$.fragment),He=a(),Q=r("p"),Q.innerHTML=Ze,De=a(),C=r("div"),g(W.$$.fragment),Je=a(),Y=r("p"),Y.textContent=Ve,Ue=a(),P=r("div"),g(B.$$.fragment),Ce=a(),K=r("p"),K.textContent=Ge,me=a(),g(R.$$.fragment),de=a(),$=r("div"),g(O.$$.fragment),Pe=a(),ee=r("p"),ee.textContent=ze,ce=a(),g(A.$$.fragment),ge=a(),ne=r("p"),this.h()},l(e){const n=Se("svelte-u9bgzb",document.head);m=l(n,"META",{name:!0,content:!0}),n.forEach(t),k=i(e),I=l(e,"P",{}),M(I).forEach(t),y=i(e),_(v.$$.fragment,e),p=i(e),w=l(e,"P",{"data-svelte-h":!0}),T(w)!=="svelte-1afylb8"&&(w.innerHTML=ke),ie=i(e),L=l(e,"BLOCKQUOTE",{"data-svelte-h":!0}),T(L)!=="svelte-41zj9c"&&(L.innerHTML=Le),oe=i(e),_(j.$$.fragment,e),se=i(e),E=l(e,"P",{"data-svelte-h":!0}),T(E)!=="svelte-1gw3duc"&&(E.innerHTML=je),re=i(e),N=l(e,"TABLE",{"data-svelte-h":!0}),T(N)!=="svelte-1qjrcq9"&&(N.innerHTML=Ee),le=i(e),_(F.$$.fragment,e),pe=i(e),d=l(e,"DIV",{class:!0});var c=M(d);_(Z.$$.fragment,c),we=i(c),x=l(c,"DIV",{class:!0});var te=M(x);_(V.$$.fragment,te),Te=i(te),X=l(te,"P",{"data-svelte-h":!0}),T(X)!=="svelte-v78lg8"&&(X.textContent=Ne),Ie=i(te),_(D.$$.fragment,te),te.forEach(t),xe=i(c),J=l(c,"DIV",{class:!0});var ue=M(J);_(G.$$.fragment,ue),$e=i(ue),q=l(ue,"P",{"data-svelte-h":!0}),T(q)!=="svelte-1s3c06i"&&(q.innerHTML=Fe),ue.forEach(t),Me=i(c),U=l(c,"DIV",{class:!0});var fe=M(U);_(z.$$.fragment,fe),He=i(fe),Q=l(fe,"P",{"data-svelte-h":!0}),T(Q)!=="svelte-pkn4ui"&&(Q.innerHTML=Ze),fe.forEach(t),De=i(c),C=l(c,"DIV",{class:!0});var he=M(C);_(W.$$.fragment,he),Je=i(he),Y=l(he,"P",{"data-svelte-h":!0}),T(Y)!=="svelte-14bnrb6"&&(Y.textContent=Ve),he.forEach(t),Ue=i(c),P=l(c,"DIV",{class:!0});var be=M(P);_(B.$$.fragment,be),Ce=i(be),K=l(be,"P",{"data-svelte-h":!0}),T(K)!=="svelte-1xwrf7t"&&(K.textContent=Ge),be.forEach(t),c.forEach(t),me=i(e),_(R.$$.fragment,e),de=i(e),$=l(e,"DIV",{class:!0});var ye=M($);_(O.$$.fragment,ye),Pe=i(ye),ee=l(ye,"P",{"data-svelte-h":!0}),T(ee)!=="svelte-gyvvvk"&&(ee.textContent=ze),ye.forEach(t),ce=i(e),_(A.$$.fragment,e),ge=i(e),ne=l(e,"P",{}),M(ne).forEach(t),this.h()},h(){H(m,"name","hf:doc:metadata"),H(m,"content",et),H(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),H(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),H(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),H(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),H(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),H(d,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),H($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,n){o(document.head,m),s(e,k,n),s(e,I,n),s(e,y,n),u(v,e,n),s(e,p,n),s(e,w,n),s(e,ie,n),s(e,L,n),s(e,oe,n),u(j,e,n),s(e,se,n),s(e,E,n),s(e,re,n),s(e,N,n),s(e,le,n),u(F,e,n),s(e,pe,n),s(e,d,n),u(Z,d,null),o(d,we),o(d,x),u(V,x,null),o(x,Te),o(x,X),o(x,Ie),u(D,x,null),o(d,xe),o(d,J),u(G,J,null),o(J,$e),o(J,q),o(d,Me),o(d,U),u(z,U,null),o(U,He),o(U,Q),o(d,De),o(d,C),u(W,C,null),o(C,Je),o(C,Y),o(d,Ue),o(d,P),u(B,P,null),o(P,Ce),o(P,K),s(e,me,n),u(R,e,n),s(e,de,n),s(e,$,n),u(O,$,null),o($,Pe),o($,ee),s(e,ce,n),u(A,e,n),s(e,ge,n),s(e,ne,n),_e=!0},p(e,[n]){const c={};n&2&&(c.$$scope={dirty:n,ctx:e}),D.$set(c)},i(e){_e||(f(v.$$.fragment,e),f(j.$$.fragment,e),f(F.$$.fragment,e),f(Z.$$.fragment,e),f(V.$$.fragment,e),f(D.$$.fragment,e),f(G.$$.fragment,e),f(z.$$.fragment,e),f(W.$$.fragment,e),f(B.$$.fragment,e),f(R.$$.fragment,e),f(O.$$.fragment,e),f(A.$$.fragment,e),_e=!0)},o(e){h(v.$$.fragment,e),h(j.$$.fragment,e),h(F.$$.fragment,e),h(Z.$$.fragment,e),h(V.$$.fragment,e),h(D.$$.fragment,e),h(G.$$.fragment,e),h(z.$$.fragment,e),h(W.$$.fragment,e),h(B.$$.fragment,e),h(R.$$.fragment,e),h(O.$$.fragment,e),h(A.$$.fragment,e),_e=!1},d(e){e&&(t(k),t(I),t(y),t(p),t(w),t(ie),t(L),t(oe),t(se),t(E),t(re),t(N),t(le),t(pe),t(d),t(me),t(de),t($),t(ce),t(ge),t(ne)),t(m),b(v,e),b(j,e),b(F,e),b(Z),b(V),b(D),b(G),b(z),b(W),b(B),b(R,e),b(O),b(A,e)}}}const et='{"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 tt(ae){return Be(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class lt extends Oe{constructor(m){super(),Ae(this,m,tt,Ke,We,{})}}export{lt as component};
