Buckets:
| import{s as Fe,o as Re,n as ze}from"../chunks/scheduler.8c3d61f6.js";import{S as Ae,i as Be,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 $,k as j,y as s,a as r,v as f,d as h,t as b,w as v}from"../chunks/index.da70eac4.js";import{T as Xe}from"../chunks/Tip.1d9b8c37.js";import{D as Y}from"../chunks/Docstring.0b9cc58b.js";import{C as Ye}from"../chunks/CodeBlock.a9c4becf.js";import{E as Qe}from"../chunks/ExampleCodeBlock.ba0ba69d.js";import{H as ye,E as Oe}from"../chunks/index.a831177d.js";function qe(Q){let o,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(){o=l("p"),o.innerHTML=I},l(c){o=p(c,"P",{"data-svelte-h":!0}),$(o)!=="svelte-1qn15hi"&&(o.innerHTML=I)},m(c,y){r(c,o,y)},p:ze,d(c){c&&n(o)}}}function Ke(Q){let o,I="Examples:",c,y,M;return y=new Ye({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwUHJlVHJhaW5lZFRva2VuaXplckZhc3QlMkMlMjBMbGFtYUZvckNhdXNhbExNJTBBZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFVuaVBDTXVsdGlzdGVwU2NoZWR1bGVyJTJDJTIwSGlEcmVhbUltYWdlUGlwZWxpbmUlMEElMEElMEF0b2tlbml6ZXJfNCUyMCUzRCUyMFByZVRyYWluZWRUb2tlbml6ZXJGYXN0LmZyb21fcHJldHJhaW5lZCglMjJtZXRhLWxsYW1hJTJGTWV0YS1MbGFtYS0zLjEtOEItSW5zdHJ1Y3QlMjIpJTBBdGV4dF9lbmNvZGVyXzQlMjAlM0QlMjBMbGFtYUZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJtZXRhLWxsYW1hJTJGTWV0YS1MbGFtYS0zLjEtOEItSW5zdHJ1Y3QlMjIlMkMlMEElMjAlMjAlMjAlMjBvdXRwdXRfaGlkZGVuX3N0YXRlcyUzRFRydWUlMkMlMEElMjAlMjAlMjAlMjBvdXRwdXRfYXR0ZW50aW9ucyUzRFRydWUlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2JTJDJTBBKSUwQSUwQXBpcGUlMjAlM0QlMjBIaURyZWFtSW1hZ2VQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIySGlEcmVhbS1haSUyRkhpRHJlYW0tSTEtRnVsbCUyMiUyQyUwQSUyMCUyMCUyMCUyMHRva2VuaXplcl80JTNEdG9rZW5pemVyXzQlMkMlMEElMjAlMjAlMjAlMjB0ZXh0X2VuY29kZXJfNCUzRHRleHRfZW5jb2Rlcl80JTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5iZmxvYXQxNiUyQyUwQSklMEFwaXBlLmVuYWJsZV9tb2RlbF9jcHVfb2ZmbG9hZCgpJTBBJTBBaW1hZ2UlMjAlM0QlMjBwaXBlKCUwQSUyMCUyMCUyMCUyMCdBJTIwY2F0JTIwaG9sZGluZyUyMGElMjBzaWduJTIwdGhhdCUyMHNheXMlMjAlMjJIaS1EcmVhbXMuYWklMjIuJyUyQyUwQSUyMCUyMCUyMCUyMGhlaWdodCUzRDEwMjQlMkMlMEElMjAlMjAlMjAlMjB3aWR0aCUzRDEwMjQlMkMlMEElMjAlMjAlMjAlMjBndWlkYW5jZV9zY2FsZSUzRDUuMCUyQyUwQSUyMCUyMCUyMCUyMG51bV9pbmZlcmVuY2Vfc3RlcHMlM0Q1MCUyQyUwQSUyMCUyMCUyMCUyMGdlbmVyYXRvciUzRHRvcmNoLkdlbmVyYXRvciglMjJjdWRhJTIyKS5tYW51YWxfc2VlZCgwKSUyQyUwQSkuaW1hZ2VzJTVCMCU1RCUwQWltYWdlLnNhdmUoJTIyb3V0cHV0LnBuZyUyMik=",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>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> 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(){o=l("p"),o.textContent=I,c=a(),_(y.$$.fragment)},l(d){o=p(d,"P",{"data-svelte-h":!0}),$(o)!=="svelte-kvfsh7"&&(o.textContent=I),c=i(d),u(y.$$.fragment,d)},m(d,w){r(d,o,w),r(d,c,w),f(y,d,w),M=!0},p:ze,i(d){M||(h(y.$$.fragment,d),M=!0)},o(d){b(y.$$.fragment,d),M=!1},d(d){d&&(n(o),n(c)),v(y,d)}}}function et(Q){let o,I,c,y,M,d,w,Ce='<a href="https://huggingface.co/HiDream-ai" rel="nofollow">HiDream-I1</a> by HiDream.ai',ie,P,oe,E,se,N,Le='The following models are available for the <a href="text-to-image"><code>HiDreamImagePipeline</code></a> pipeline:',re,V,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,W,pe,m,Z,Me,x,G,we,O,Ee="Function invoked when calling the pipeline for generation.",$e,k,Ie,U,z,xe,q,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.`,Te,C,F,He,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.`,De,L,R,je,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.`,Pe,J,A,ke,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,T,S,Ue,ne,Ge="Output class for HiDreamImage pipelines.",ce,X,ge,ae,_e;return M=new ye({props:{title:"HiDreamImage",local:"hidreamimage",headingTag:"h1"}}),P=new Xe({props:{$$slots:{default:[qe]},$$scope:{ctx:Q}}}),E=new ye({props:{title:"Available models",local:"available-models",headingTag:"h2"}}),W=new ye({props:{title:"HiDreamImagePipeline",local:"diffusers.HiDreamImagePipeline",headingTag:"h2"}}),Z=new Y({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_11452/src/diffusers/pipelines/hidream_image/pipeline_hidream_image.py#L146"}}),G=new Y({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>) — | |
| 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_11452/src/diffusers/pipelines/hidream_image/pipeline_hidream_image.py#L690",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> | |
| `}}),k=new Qe({props:{anchor:"diffusers.HiDreamImagePipeline.__call__.example",$$slots:{default:[Ke]},$$scope:{ctx:Q}}}),z=new Y({props:{name:"disable_vae_slicing",anchor:"diffusers.HiDreamImagePipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_11452/src/diffusers/pipelines/hidream_image/pipeline_hidream_image.py#L513"}}),F=new Y({props:{name:"disable_vae_tiling",anchor:"diffusers.HiDreamImagePipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_11452/src/diffusers/pipelines/hidream_image/pipeline_hidream_image.py#L528"}}),R=new Y({props:{name:"enable_vae_slicing",anchor:"diffusers.HiDreamImagePipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_11452/src/diffusers/pipelines/hidream_image/pipeline_hidream_image.py#L506"}}),A=new Y({props:{name:"enable_vae_tiling",anchor:"diffusers.HiDreamImagePipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_11452/src/diffusers/pipelines/hidream_image/pipeline_hidream_image.py#L520"}}),B=new ye({props:{title:"HiDreamImagePipelineOutput",local:"diffusers.pipelines.hidream_image.pipeline_output.HiDreamImagePipelineOutput",headingTag:"h2"}}),S=new Y({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_11452/src/diffusers/pipelines/hidream_image/pipeline_output.py#L10"}}),X=new Oe({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/hidream.md"}}),{c(){o=l("meta"),I=a(),c=l("p"),y=a(),_(M.$$.fragment),d=a(),w=l("p"),w.innerHTML=Ce,ie=a(),_(P.$$.fragment),oe=a(),_(E.$$.fragment),se=a(),N=l("p"),N.innerHTML=Le,re=a(),V=l("table"),V.innerHTML=Je,le=a(),_(W.$$.fragment),pe=a(),m=l("div"),_(Z.$$.fragment),Me=a(),x=l("div"),_(G.$$.fragment),we=a(),O=l("p"),O.textContent=Ee,$e=a(),_(k.$$.fragment),Ie=a(),U=l("div"),_(z.$$.fragment),xe=a(),q=l("p"),q.innerHTML=Ne,Te=a(),C=l("div"),_(F.$$.fragment),He=a(),K=l("p"),K.innerHTML=Ve,De=a(),L=l("div"),_(R.$$.fragment),je=a(),ee=l("p"),ee.textContent=We,Pe=a(),J=l("div"),_(A.$$.fragment),ke=a(),te=l("p"),te.textContent=Ze,de=a(),_(B.$$.fragment),me=a(),T=l("div"),_(S.$$.fragment),Ue=a(),ne=l("p"),ne.textContent=Ge,ce=a(),_(X.$$.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=i(e),c=p(e,"P",{}),D(c).forEach(n),y=i(e),u(M.$$.fragment,e),d=i(e),w=p(e,"P",{"data-svelte-h":!0}),$(w)!=="svelte-1afylb8"&&(w.innerHTML=Ce),ie=i(e),u(P.$$.fragment,e),oe=i(e),u(E.$$.fragment,e),se=i(e),N=p(e,"P",{"data-svelte-h":!0}),$(N)!=="svelte-nosn57"&&(N.innerHTML=Le),re=i(e),V=p(e,"TABLE",{"data-svelte-h":!0}),$(V)!=="svelte-1qjrcq9"&&(V.innerHTML=Je),le=i(e),u(W.$$.fragment,e),pe=i(e),m=p(e,"DIV",{class:!0});var g=D(m);u(Z.$$.fragment,g),Me=i(g),x=p(g,"DIV",{class:!0});var H=D(x);u(G.$$.fragment,H),we=i(H),O=p(H,"P",{"data-svelte-h":!0}),$(O)!=="svelte-v78lg8"&&(O.textContent=Ee),$e=i(H),u(k.$$.fragment,H),H.forEach(n),Ie=i(g),U=p(g,"DIV",{class:!0});var ue=D(U);u(z.$$.fragment,ue),xe=i(ue),q=p(ue,"P",{"data-svelte-h":!0}),$(q)!=="svelte-1s3c06i"&&(q.innerHTML=Ne),ue.forEach(n),Te=i(g),C=p(g,"DIV",{class:!0});var fe=D(C);u(F.$$.fragment,fe),He=i(fe),K=p(fe,"P",{"data-svelte-h":!0}),$(K)!=="svelte-pkn4ui"&&(K.innerHTML=Ve),fe.forEach(n),De=i(g),L=p(g,"DIV",{class:!0});var he=D(L);u(R.$$.fragment,he),je=i(he),ee=p(he,"P",{"data-svelte-h":!0}),$(ee)!=="svelte-14bnrb6"&&(ee.textContent=We),he.forEach(n),Pe=i(g),J=p(g,"DIV",{class:!0});var be=D(J);u(A.$$.fragment,be),ke=i(be),te=p(be,"P",{"data-svelte-h":!0}),$(te)!=="svelte-1xwrf7t"&&(te.textContent=Ze),be.forEach(n),g.forEach(n),de=i(e),u(B.$$.fragment,e),me=i(e),T=p(e,"DIV",{class:!0});var ve=D(T);u(S.$$.fragment,ve),Ue=i(ve),ne=p(ve,"P",{"data-svelte-h":!0}),$(ne)!=="svelte-gyvvvk"&&(ne.textContent=Ge),ve.forEach(n),ce=i(e),u(X.$$.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(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(C,"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(m,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(T,"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,I,t),r(e,c,t),r(e,y,t),f(M,e,t),r(e,d,t),r(e,w,t),r(e,ie,t),f(P,e,t),r(e,oe,t),f(E,e,t),r(e,se,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),s(m,Me),s(m,x),f(G,x,null),s(x,we),s(x,O),s(x,$e),f(k,x,null),s(m,Ie),s(m,U),f(z,U,null),s(U,xe),s(U,q),s(m,Te),s(m,C),f(F,C,null),s(C,He),s(C,K),s(m,De),s(m,L),f(R,L,null),s(L,je),s(L,ee),s(m,Pe),s(m,J),f(A,J,null),s(J,ke),s(J,te),r(e,de,t),f(B,e,t),r(e,me,t),r(e,T,t),f(S,T,null),s(T,Ue),s(T,ne),r(e,ce,t),f(X,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}),P.$set(g);const H={};t&2&&(H.$$scope={dirty:t,ctx:e}),k.$set(H)},i(e){_e||(h(M.$$.fragment,e),h(P.$$.fragment,e),h(E.$$.fragment,e),h(W.$$.fragment,e),h(Z.$$.fragment,e),h(G.$$.fragment,e),h(k.$$.fragment,e),h(z.$$.fragment,e),h(F.$$.fragment,e),h(R.$$.fragment,e),h(A.$$.fragment,e),h(B.$$.fragment,e),h(S.$$.fragment,e),h(X.$$.fragment,e),_e=!0)},o(e){b(M.$$.fragment,e),b(P.$$.fragment,e),b(E.$$.fragment,e),b(W.$$.fragment,e),b(Z.$$.fragment,e),b(G.$$.fragment,e),b(k.$$.fragment,e),b(z.$$.fragment,e),b(F.$$.fragment,e),b(R.$$.fragment,e),b(A.$$.fragment,e),b(B.$$.fragment,e),b(S.$$.fragment,e),b(X.$$.fragment,e),_e=!1},d(e){e&&(n(I),n(c),n(y),n(d),n(w),n(ie),n(oe),n(se),n(N),n(re),n(V),n(le),n(pe),n(m),n(de),n(me),n(T),n(ce),n(ge),n(ae)),n(o),v(M,e),v(P,e),v(E,e),v(W,e),v(Z),v(G),v(k),v(z),v(F),v(R),v(A),v(B,e),v(S),v(X,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 Re(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class dt extends Ae{constructor(o){super(),Be(this,o,nt,et,Fe,{})}}export{dt as component}; | |
Xet Storage Details
- Size:
- 29.6 kB
- Xet hash:
- 774dc1778c3b0d16b354cce2a86c2c6aaa0ee29f81eaf184aa7a9195a8b24be1
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.