Buckets:
| import{s as Re,o as Ae,n as ze}from"../chunks/scheduler.8c3d61f6.js";import{S as Fe,i as Be,g as l,s as a,r as _,A as Xe,h as p,f as n,c as s,j as H,u,x as I,k as D,y as o,a as r,v as f,d as h,t as b,w as y}from"../chunks/index.da70eac4.js";import{T as Se}from"../chunks/Tip.1d9b8c37.js";import{D as Q}from"../chunks/Docstring.567bc132.js";import{C as Qe}from"../chunks/CodeBlock.a9c4becf.js";import{E as Ye}from"../chunks/ExampleCodeBlock.15b54358.js";import{H as ve,E as qe}from"../chunks/index.5d4ab994.js";function Oe(Y){let i,$='Make sure to check out the Schedulers <a href="../../using-diffusers/schedulers">guide</a> to learn how to explore the tradeoff between scheduler speed and quality, and see the <a href="../../using-diffusers/loading#reuse-a-pipeline">reuse components across pipelines</a> section to learn how to efficiently load the same components into multiple pipelines.';return{c(){i=l("p"),i.innerHTML=$},l(c){i=p(c,"P",{"data-svelte-h":!0}),I(i)!=="svelte-1qn15hi"&&(i.innerHTML=$)},m(c,v){r(c,i,v)},p:ze,d(c){c&&n(i)}}}function Ke(Y){let i,$="Examples:",c,v,M;return v=new Qe({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwUHJlVHJhaW5lZFRva2VuaXplckZhc3QlMkMlMjBMbGFtYUZvckNhdXNhbExNJTBBZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFVuaVBDTXVsdGlzdGVwU2NoZWR1bGVyJTJDJTIwSGlEcmVhbUltYWdlUGlwZWxpbmUlMEElMEFzY2hlZHVsZXIlMjAlM0QlMjBVbmlQQ011bHRpc3RlcFNjaGVkdWxlciglMEElMjAlMjAlMjAlMjBmbG93X3NoaWZ0JTNEMy4wJTJDJTIwcHJlZGljdGlvbl90eXBlJTNEJTIyZmxvd19wcmVkaWN0aW9uJTIyJTJDJTIwdXNlX2Zsb3dfc2lnbWFzJTNEVHJ1ZSUwQSklMEElMEF0b2tlbml6ZXJfNCUyMCUzRCUyMFByZVRyYWluZWRUb2tlbml6ZXJGYXN0LmZyb21fcHJldHJhaW5lZCglMjJtZXRhLWxsYW1hJTJGTWV0YS1MbGFtYS0zLjEtOEItSW5zdHJ1Y3QlMjIpJTBBdGV4dF9lbmNvZGVyXzQlMjAlM0QlMjBMbGFtYUZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJtZXRhLWxsYW1hJTJGTWV0YS1MbGFtYS0zLjEtOEItSW5zdHJ1Y3QlMjIlMkMlMEElMjAlMjAlMjAlMjBvdXRwdXRfaGlkZGVuX3N0YXRlcyUzRFRydWUlMkMlMEElMjAlMjAlMjAlMjBvdXRwdXRfYXR0ZW50aW9ucyUzRFRydWUlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2JTJDJTBBKSUwQSUwQXBpcGUlMjAlM0QlMjBIaURyZWFtSW1hZ2VQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIySGlEcmVhbS1haSUyRkhpRHJlYW0tSTEtRnVsbCUyMiUyQyUwQSUyMCUyMCUyMCUyMHNjaGVkdWxlciUzRHNjaGVkdWxlciUyQyUwQSUyMCUyMCUyMCUyMHRva2VuaXplcl80JTNEdG9rZW5pemVyXzQlMkMlMEElMjAlMjAlMjAlMjB0ZXh0X2VuY29kZXJfNCUzRHRleHRfZW5jb2Rlcl80JTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5iZmxvYXQxNiUyQyUwQSklMEFwaXBlLmVuYWJsZV9tb2RlbF9jcHVfb2ZmbG9hZCgpJTBBJTBBaW1hZ2UlMjAlM0QlMjBwaXBlKCUwQSUyMCUyMCUyMCUyMCdBJTIwY2F0JTIwaG9sZGluZyUyMGElMjBzaWduJTIwdGhhdCUyMHNheXMlMjAlMjJIaS1EcmVhbXMuYWklMjIuJyUyQyUwQSUyMCUyMCUyMCUyMGhlaWdodCUzRDEwMjQlMkMlMEElMjAlMjAlMjAlMjB3aWR0aCUzRDEwMjQlMkMlMEElMjAlMjAlMjAlMjBndWlkYW5jZV9zY2FsZSUzRDUuMCUyQyUwQSUyMCUyMCUyMCUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0Q1MCUyQyUwQSUyMCUyMCUyMCUyMGdlbmVyYXRvciUzRHRvcmNoLkdlbmVyYXRvciglMjJjdWRhJTIyKS5tYW51YWxfc2VlZCgwKSUyQyUwQSkuaW1hZ2VzJTVCMCU1RCUwQWltYWdlLnNhdmUoJTIyb3V0cHV0LnBuZyUyMik=",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> PreTrainedTokenizerFast, LlamaForCausalLM | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> UniPCMultistepScheduler, HiDreamImagePipeline | |
| <span class="hljs-meta">>>> </span>scheduler = UniPCMultistepScheduler( | |
| <span class="hljs-meta">... </span> flow_shift=<span class="hljs-number">3.0</span>, prediction_type=<span class="hljs-string">"flow_prediction"</span>, use_flow_sigmas=<span class="hljs-literal">True</span> | |
| <span class="hljs-meta">... </span>) | |
| <span class="hljs-meta">>>> </span>tokenizer_4 = PreTrainedTokenizerFast.from_pretrained(<span class="hljs-string">"meta-llama/Meta-Llama-3.1-8B-Instruct"</span>) | |
| <span class="hljs-meta">>>> </span>text_encoder_4 = LlamaForCausalLM.from_pretrained( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"meta-llama/Meta-Llama-3.1-8B-Instruct"</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">>>> </span>pipe = HiDreamImagePipeline.from_pretrained( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"HiDream-ai/HiDream-I1-Full"</span>, | |
| <span class="hljs-meta">... </span> scheduler=scheduler, | |
| <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">>>> </span>pipe.enable_model_cpu_offload() | |
| <span class="hljs-meta">>>> </span>image = pipe( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">'A cat holding a sign that says "Hi-Dreams.ai".'</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">"cuda"</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">>>> </span>image.save(<span class="hljs-string">"output.png"</span>)`,wrap:!1}}),{c(){i=l("p"),i.textContent=$,c=a(),_(v.$$.fragment)},l(d){i=p(d,"P",{"data-svelte-h":!0}),I(i)!=="svelte-kvfsh7"&&(i.textContent=$),c=s(d),u(v.$$.fragment,d)},m(d,w){r(d,i,w),r(d,c,w),f(v,d,w),M=!0},p:ze,i(d){M||(h(v.$$.fragment,d),M=!0)},o(d){b(v.$$.fragment,d),M=!1},d(d){d&&(n(i),n(c)),y(v,d)}}}function et(Y){let i,$,c,v,M,d,w,Ce='<a href="https://huggingface.co/HiDream-ai" rel="nofollow">HiDream-I1</a> by HiDream.ai',se,k,ie,E,oe,N,Je='The following models are available for the <a href="text-to-image"><code>HiDreamImagePipeline</code></a> pipeline:',re,V,Le='<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,W,pe,m,Z,Me,T,G,we,q,Ee="Function invoked when calling the pipeline for generation.",Ie,U,$e,P,z,Te,O,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.`,xe,C,R,je,K,Ve=`Disable tiled VAE decoding. If <code>enable_vae_tiling</code> was previously enabled, this method will go back to | |
| computing decoding in one step.`,He,J,A,De,ee,We=`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.`,ke,L,F,Ue,te,Ze=`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.`,de,B,me,x,X,Pe,ne,Ge="Output class for HiDreamImage pipelines.",ce,S,ge,ae,_e;return M=new ve({props:{title:"HiDreamImage",local:"hidreamimage",headingTag:"h1"}}),k=new Se({props:{$$slots:{default:[Oe]},$$scope:{ctx:Y}}}),E=new ve({props:{title:"Available models",local:"available-models",headingTag:"h2"}}),W=new ve({props:{title:"HiDreamImagePipeline",local:"diffusers.HiDreamImagePipeline",headingTag:"h2"}}),Z=new Q({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/vr_11335/src/diffusers/pipelines/hidream_image/pipeline_hidream_image.py#L149"}}),G=new Q({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",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",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"}],parametersDescription:[{anchor:"diffusers.HiDreamImagePipeline.__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.HiDreamImagePipeline.__call__.prompt_2",description:`<strong>prompt_2</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) — | |
| 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>) — | |
| 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>) — | |
| 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) — | |
| 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) — | |
| 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) — | |
| 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>) — | |
| 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) — | |
| Guidance scale as defined in <a href="https://arxiv.org/abs/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://arxiv.org/pdf/2205.11487.pdf" 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.HiDreamImagePipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) — | |
| The prompt or prompts not to guide the image generation. If not defined, one has to pass | |
| <code>negative_prompt_embeds</code> instead. Ignored when not using guidance (i.e., ignored if <code>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>) — | |
| 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>) — | |
| 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>) — | |
| 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) — | |
| 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>) — | |
| 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>) — | |
| 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 ge 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>"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.HiDreamImagePipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether or not to return a <code>~pipelines.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>) — | |
| 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>) — | |
| 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>) — | |
| 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) — Maximum sequence length to use with the <code>prompt</code>.",name:"max_sequence_length"}],source:"https://github.com/huggingface/diffusers/blob/vr_11335/src/diffusers/pipelines/hidream_image/pipeline_hidream_image.py#L525",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> | |
| `}}),U=new Ye({props:{anchor:"diffusers.HiDreamImagePipeline.__call__.example",$$slots:{default:[Ke]},$$scope:{ctx:Y}}}),z=new Q({props:{name:"disable_vae_slicing",anchor:"diffusers.HiDreamImagePipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_11335/src/diffusers/pipelines/hidream_image/pipeline_hidream_image.py#L457"}}),R=new Q({props:{name:"disable_vae_tiling",anchor:"diffusers.HiDreamImagePipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_11335/src/diffusers/pipelines/hidream_image/pipeline_hidream_image.py#L472"}}),A=new Q({props:{name:"enable_vae_slicing",anchor:"diffusers.HiDreamImagePipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_11335/src/diffusers/pipelines/hidream_image/pipeline_hidream_image.py#L450"}}),F=new Q({props:{name:"enable_vae_tiling",anchor:"diffusers.HiDreamImagePipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_11335/src/diffusers/pipelines/hidream_image/pipeline_hidream_image.py#L464"}}),B=new ve({props:{title:"HiDreamImagePipelineOutput",local:"diffusers.pipelines.hidream_image.pipeline_output.HiDreamImagePipelineOutput",headingTag:"h2"}}),X=new Q({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>) — | |
| 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_11335/src/diffusers/pipelines/hidream_image/pipeline_output.py#L10"}}),S=new qe({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/hidream.md"}}),{c(){i=l("meta"),$=a(),c=l("p"),v=a(),_(M.$$.fragment),d=a(),w=l("p"),w.innerHTML=Ce,se=a(),_(k.$$.fragment),ie=a(),_(E.$$.fragment),oe=a(),N=l("p"),N.innerHTML=Je,re=a(),V=l("table"),V.innerHTML=Le,le=a(),_(W.$$.fragment),pe=a(),m=l("div"),_(Z.$$.fragment),Me=a(),T=l("div"),_(G.$$.fragment),we=a(),q=l("p"),q.textContent=Ee,Ie=a(),_(U.$$.fragment),$e=a(),P=l("div"),_(z.$$.fragment),Te=a(),O=l("p"),O.innerHTML=Ne,xe=a(),C=l("div"),_(R.$$.fragment),je=a(),K=l("p"),K.innerHTML=Ve,He=a(),J=l("div"),_(A.$$.fragment),De=a(),ee=l("p"),ee.textContent=We,ke=a(),L=l("div"),_(F.$$.fragment),Ue=a(),te=l("p"),te.textContent=Ze,de=a(),_(B.$$.fragment),me=a(),x=l("div"),_(X.$$.fragment),Pe=a(),ne=l("p"),ne.textContent=Ge,ce=a(),_(S.$$.fragment),ge=a(),ae=l("p"),this.h()},l(e){const t=Xe("svelte-u9bgzb",document.head);i=p(t,"META",{name:!0,content:!0}),t.forEach(n),$=s(e),c=p(e,"P",{}),H(c).forEach(n),v=s(e),u(M.$$.fragment,e),d=s(e),w=p(e,"P",{"data-svelte-h":!0}),I(w)!=="svelte-1afylb8"&&(w.innerHTML=Ce),se=s(e),u(k.$$.fragment,e),ie=s(e),u(E.$$.fragment,e),oe=s(e),N=p(e,"P",{"data-svelte-h":!0}),I(N)!=="svelte-nosn57"&&(N.innerHTML=Je),re=s(e),V=p(e,"TABLE",{"data-svelte-h":!0}),I(V)!=="svelte-1qjrcq9"&&(V.innerHTML=Le),le=s(e),u(W.$$.fragment,e),pe=s(e),m=p(e,"DIV",{class:!0});var g=H(m);u(Z.$$.fragment,g),Me=s(g),T=p(g,"DIV",{class:!0});var j=H(T);u(G.$$.fragment,j),we=s(j),q=p(j,"P",{"data-svelte-h":!0}),I(q)!=="svelte-v78lg8"&&(q.textContent=Ee),Ie=s(j),u(U.$$.fragment,j),j.forEach(n),$e=s(g),P=p(g,"DIV",{class:!0});var ue=H(P);u(z.$$.fragment,ue),Te=s(ue),O=p(ue,"P",{"data-svelte-h":!0}),I(O)!=="svelte-1s3c06i"&&(O.innerHTML=Ne),ue.forEach(n),xe=s(g),C=p(g,"DIV",{class:!0});var fe=H(C);u(R.$$.fragment,fe),je=s(fe),K=p(fe,"P",{"data-svelte-h":!0}),I(K)!=="svelte-pkn4ui"&&(K.innerHTML=Ve),fe.forEach(n),He=s(g),J=p(g,"DIV",{class:!0});var he=H(J);u(A.$$.fragment,he),De=s(he),ee=p(he,"P",{"data-svelte-h":!0}),I(ee)!=="svelte-14bnrb6"&&(ee.textContent=We),he.forEach(n),ke=s(g),L=p(g,"DIV",{class:!0});var be=H(L);u(F.$$.fragment,be),Ue=s(be),te=p(be,"P",{"data-svelte-h":!0}),I(te)!=="svelte-1xwrf7t"&&(te.textContent=Ze),be.forEach(n),g.forEach(n),de=s(e),u(B.$$.fragment,e),me=s(e),x=p(e,"DIV",{class:!0});var ye=H(x);u(X.$$.fragment,ye),Pe=s(ye),ne=p(ye,"P",{"data-svelte-h":!0}),I(ne)!=="svelte-gyvvvk"&&(ne.textContent=Ge),ye.forEach(n),ce=s(e),u(S.$$.fragment,e),ge=s(e),ae=p(e,"P",{}),H(ae).forEach(n),this.h()},h(){D(i,"name","hf:doc:metadata"),D(i,"content",tt),D(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),D(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),D(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),D(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),D(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),D(m,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),D(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,t){o(document.head,i),r(e,$,t),r(e,c,t),r(e,v,t),f(M,e,t),r(e,d,t),r(e,w,t),r(e,se,t),f(k,e,t),r(e,ie,t),f(E,e,t),r(e,oe,t),r(e,N,t),r(e,re,t),r(e,V,t),r(e,le,t),f(W,e,t),r(e,pe,t),r(e,m,t),f(Z,m,null),o(m,Me),o(m,T),f(G,T,null),o(T,we),o(T,q),o(T,Ie),f(U,T,null),o(m,$e),o(m,P),f(z,P,null),o(P,Te),o(P,O),o(m,xe),o(m,C),f(R,C,null),o(C,je),o(C,K),o(m,He),o(m,J),f(A,J,null),o(J,De),o(J,ee),o(m,ke),o(m,L),f(F,L,null),o(L,Ue),o(L,te),r(e,de,t),f(B,e,t),r(e,me,t),r(e,x,t),f(X,x,null),o(x,Pe),o(x,ne),r(e,ce,t),f(S,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}),k.$set(g);const j={};t&2&&(j.$$scope={dirty:t,ctx:e}),U.$set(j)},i(e){_e||(h(M.$$.fragment,e),h(k.$$.fragment,e),h(E.$$.fragment,e),h(W.$$.fragment,e),h(Z.$$.fragment,e),h(G.$$.fragment,e),h(U.$$.fragment,e),h(z.$$.fragment,e),h(R.$$.fragment,e),h(A.$$.fragment,e),h(F.$$.fragment,e),h(B.$$.fragment,e),h(X.$$.fragment,e),h(S.$$.fragment,e),_e=!0)},o(e){b(M.$$.fragment,e),b(k.$$.fragment,e),b(E.$$.fragment,e),b(W.$$.fragment,e),b(Z.$$.fragment,e),b(G.$$.fragment,e),b(U.$$.fragment,e),b(z.$$.fragment,e),b(R.$$.fragment,e),b(A.$$.fragment,e),b(F.$$.fragment,e),b(B.$$.fragment,e),b(X.$$.fragment,e),b(S.$$.fragment,e),_e=!1},d(e){e&&(n($),n(c),n(v),n(d),n(w),n(se),n(ie),n(oe),n(N),n(re),n(V),n(le),n(pe),n(m),n(de),n(me),n(x),n(ce),n(ge),n(ae)),n(i),y(M,e),y(k,e),y(E,e),y(W,e),y(Z),y(G),y(U),y(z),y(R),y(A),y(F),y(B,e),y(X),y(S,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(Y){return Ae(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class dt extends Fe{constructor(i){super(),Be(this,i,nt,et,Re,{})}}export{dt as component}; | |
Xet Storage Details
- Size:
- 30 kB
- Xet hash:
- 78f1e79cedab965f59310da965033d4aa42cce4a68ead6a546977ff369962f57
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.