import{s as ja,o as Ua,n as fa}from"../chunks/scheduler.53228c21.js";import{S as Za,i as _a,e as i,s,c,q as Ja,H as Ia,h as Ga,a as p,d as a,b as n,f as U,g as m,j as y,r as Ta,v as Wa,k as I,l as o,m as t,n as d,t as M,o as u,p as h}from"../chunks/index.100fac89.js";import{D as C}from"../chunks/Docstring.d46840f1.js";import{C as Ae}from"../chunks/CodeBlock.d30a6509.js";import{E as wa}from"../chunks/ExampleCodeBlock.220b4f6e.js";import{H as Z,E as Ba}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.3fcbbc76.js";function Ca(Ue){let g,G="Examples:",b,T,w;return T=new Ae({props:{code:" ",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> diffusers <span class="hljs-keyword">import</span> VisualClozePipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image

<span class="hljs-meta">&gt;&gt;&gt; </span>image_paths = [
<span class="hljs-meta">... </span>    <span class="hljs-comment"># in-context examples</span>
<span class="hljs-meta">... </span>    [
<span class="hljs-meta">... </span>        load_image(
<span class="hljs-meta">... </span>            <span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/visualcloze/visualcloze_mask2image_incontext-example-1_mask.jpg&quot;</span>
<span class="hljs-meta">... </span>        ),
<span class="hljs-meta">... </span>        load_image(
<span class="hljs-meta">... </span>            <span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/visualcloze/visualcloze_mask2image_incontext-example-1_image.jpg&quot;</span>
<span class="hljs-meta">... </span>        ),
<span class="hljs-meta">... </span>    ],
<span class="hljs-meta">... </span>    <span class="hljs-comment"># query with the target image</span>
<span class="hljs-meta">... </span>    [
<span class="hljs-meta">... </span>        load_image(
<span class="hljs-meta">... </span>            <span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/visualcloze/visualcloze_mask2image_query_mask.jpg&quot;</span>
<span class="hljs-meta">... </span>        ),
<span class="hljs-meta">... </span>        <span class="hljs-literal">None</span>,  <span class="hljs-comment"># No image needed for the target image</span>
<span class="hljs-meta">... </span>    ],
<span class="hljs-meta">... </span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>task_prompt = <span class="hljs-string">&quot;In each row, a logical task is demonstrated to achieve [IMAGE2] an aesthetically pleasing photograph based on [IMAGE1] sam 2-generated masks with rich color coding.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>content_prompt = <span class="hljs-string">&quot;Majestic photo of a golden eagle perched on a rocky outcrop in a mountainous landscape. The eagle is positioned in the right foreground, facing left, with its sharp beak and keen eyes prominently visible. Its plumage is a mix of dark brown and golden hues, with intricate feather details. The background features a soft-focus view of snow-capped mountains under a cloudy sky, creating a serene and grandiose atmosphere. The foreground includes rugged rocks and patches of green moss. Photorealistic, medium depth of field, soft natural lighting, cool color palette, high contrast, sharp focus on the eagle, blurred background, tranquil, majestic, wildlife photography.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = VisualClozePipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;VisualCloze/VisualClozePipeline-384&quot;</span>, resolution=<span class="hljs-number">384</span>, torch_dtype=torch.bfloat16
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(
<span class="hljs-meta">... </span>    task_prompt=task_prompt,
<span class="hljs-meta">... </span>    content_prompt=content_prompt,
<span class="hljs-meta">... </span>    image=image_paths,
<span class="hljs-meta">... </span>    upsampling_width=<span class="hljs-number">1344</span>,
<span class="hljs-meta">... </span>    upsampling_height=<span class="hljs-number">768</span>,
<span class="hljs-meta">... </span>    upsampling_strength=<span class="hljs-number">0.4</span>,
<span class="hljs-meta">... </span>    guidance_scale=<span class="hljs-number">30</span>,
<span class="hljs-meta">... </span>    num_inference_steps=<span class="hljs-number">30</span>,
<span class="hljs-meta">... </span>    max_sequence_length=<span class="hljs-number">512</span>,
<span class="hljs-meta">... </span>    generator=torch.Generator(<span class="hljs-string">&quot;cpu&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-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image.save(<span class="hljs-string">&quot;visualcloze.png&quot;</span>)`,wrap:!1}}),{c(){g=i("p"),g.textContent=G,b=s(),c(T.$$.fragment)},l(r){g=p(r,"P",{"data-svelte-h":!0}),y(g)!=="svelte-kvfsh7"&&(g.textContent=G),b=n(r),m(T.$$.fragment,r)},m(r,j){t(r,g,j),t(r,b,j),d(T,r,j),w=!0},p:fa,i(r){w||(M(T.$$.fragment,r),w=!0)},o(r){u(T.$$.fragment,r),w=!1},d(r){r&&(a(g),a(b)),h(T,r)}}}function Va(Ue){let g,G="Examples:",b,T,w;return T=new Ae({props:{code:" ",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> diffusers <span class="hljs-keyword">import</span> VisualClozeGenerationPipeline, FluxFillPipeline <span class="hljs-keyword">as</span> VisualClozeUpsamplingPipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image

<span class="hljs-meta">&gt;&gt;&gt; </span>image_paths = [
<span class="hljs-meta">... </span>    <span class="hljs-comment"># in-context examples</span>
<span class="hljs-meta">... </span>    [
<span class="hljs-meta">... </span>        load_image(
<span class="hljs-meta">... </span>            <span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/visualcloze/visualcloze_mask2image_incontext-example-1_mask.jpg&quot;</span>
<span class="hljs-meta">... </span>        ),
<span class="hljs-meta">... </span>        load_image(
<span class="hljs-meta">... </span>            <span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/visualcloze/visualcloze_mask2image_incontext-example-1_image.jpg&quot;</span>
<span class="hljs-meta">... </span>        ),
<span class="hljs-meta">... </span>    ],
<span class="hljs-meta">... </span>    <span class="hljs-comment"># query with the target image</span>
<span class="hljs-meta">... </span>    [
<span class="hljs-meta">... </span>        load_image(
<span class="hljs-meta">... </span>            <span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/visualcloze/visualcloze_mask2image_query_mask.jpg&quot;</span>
<span class="hljs-meta">... </span>        ),
<span class="hljs-meta">... </span>        <span class="hljs-literal">None</span>,  <span class="hljs-comment"># No image needed for the target image</span>
<span class="hljs-meta">... </span>    ],
<span class="hljs-meta">... </span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>task_prompt = <span class="hljs-string">&quot;In each row, a logical task is demonstrated to achieve [IMAGE2] an aesthetically pleasing photograph based on [IMAGE1] sam 2-generated masks with rich color coding.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>content_prompt = <span class="hljs-string">&quot;Majestic photo of a golden eagle perched on a rocky outcrop in a mountainous landscape. The eagle is positioned in the right foreground, facing left, with its sharp beak and keen eyes prominently visible. Its plumage is a mix of dark brown and golden hues, with intricate feather details. The background features a soft-focus view of snow-capped mountains under a cloudy sky, creating a serene and grandiose atmosphere. The foreground includes rugged rocks and patches of green moss. Photorealistic, medium depth of field, soft natural lighting, cool color palette, high contrast, sharp focus on the eagle, blurred background, tranquil, majestic, wildlife photography.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = VisualClozeGenerationPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;VisualCloze/VisualClozePipeline-384&quot;</span>, resolution=<span class="hljs-number">384</span>, torch_dtype=torch.bfloat16
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(
<span class="hljs-meta">... </span>    task_prompt=task_prompt,
<span class="hljs-meta">... </span>    content_prompt=content_prompt,
<span class="hljs-meta">... </span>    image=image_paths,
<span class="hljs-meta">... </span>    guidance_scale=<span class="hljs-number">30</span>,
<span class="hljs-meta">... </span>    num_inference_steps=<span class="hljs-number">30</span>,
<span class="hljs-meta">... </span>    max_sequence_length=<span class="hljs-number">512</span>,
<span class="hljs-meta">... </span>    generator=torch.Generator(<span class="hljs-string">&quot;cpu&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-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># optional, upsampling the generated image</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe_upsample = VisualClozeUpsamplingPipeline.from_pipe(pipe)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe_upsample.to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>mask_image = Image.new(<span class="hljs-string">&quot;RGB&quot;</span>, image.size, (<span class="hljs-number">255</span>, <span class="hljs-number">255</span>, <span class="hljs-number">255</span>))

<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe_upsample(
<span class="hljs-meta">... </span>    image=image,
<span class="hljs-meta">... </span>    mask_image=mask_image,
<span class="hljs-meta">... </span>    prompt=content_prompt,
<span class="hljs-meta">... </span>    width=<span class="hljs-number">1344</span>,
<span class="hljs-meta">... </span>    height=<span class="hljs-number">768</span>,
<span class="hljs-meta">... </span>    strength=<span class="hljs-number">0.4</span>,
<span class="hljs-meta">... </span>    guidance_scale=<span class="hljs-number">30</span>,
<span class="hljs-meta">... </span>    num_inference_steps=<span class="hljs-number">30</span>,
<span class="hljs-meta">... </span>    max_sequence_length=<span class="hljs-number">512</span>,
<span class="hljs-meta">... </span>    generator=torch.Generator(<span class="hljs-string">&quot;cpu&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;visualcloze.png&quot;</span>)`,wrap:!1}}),{c(){g=i("p"),g.textContent=G,b=s(),c(T.$$.fragment)},l(r){g=p(r,"P",{"data-svelte-h":!0}),y(g)!=="svelte-kvfsh7"&&(g.textContent=G),b=n(r),m(T.$$.fragment,r)},m(r,j){t(r,g,j),t(r,b,j),d(T,r,j),w=!0},p:fa,i(r){w||(M(T.$$.fragment,r),w=!0)},o(r){u(T.$$.fragment,r),w=!1},d(r){r&&(a(g),a(b)),h(T,r)}}}function ka(Ue){let g,G,b,T,w,r,j,Dl='<a href="https://huggingface.co/papers/2504.07960" rel="nofollow">VisualCloze: A Universal Image Generation Framework via Visual In-Context Learning</a> is an innovative in-context learning based universal image generation framework that offers key capabilities:',He,R,Kl="<li>Support for various in-domain tasks</li> <li>Generalization to unseen tasks through in-context learning</li> <li>Unify multiple tasks into one step and generate both target image and intermediate results</li> <li>Support reverse-engineering conditions from target images</li>",Qe,N,Se,F,Ol="The abstract from the paper is:",$e,A,ea='<em>Recent progress in diffusion models significantly advances various image generation tasks. However, the current mainstream approach remains focused on building task-specific models, which have limited efficiency when supporting a wide range of different needs. While universal models attempt to address this limitation, they face critical challenges, including generalizable task instruction, appropriate task distributions, and unified architectural design. To tackle these challenges, we propose VisualCloze, a universal image generation framework, which supports a wide range of in-domain tasks, generalization to unseen ones, unseen unification of multiple tasks, and reverse generation. Unlike existing methods that rely on language-based task instruction, leading to task ambiguity and weak generalization, we integrate visual in-context learning, allowing models to identify tasks from visual demonstrations. Meanwhile, the inherent sparsity of visual task distributions hampers the learning of transferable knowledge across tasks. To this end, we introduce Graph200K, a graph-structured dataset that establishes various interrelated tasks, enhancing task density and transferable knowledge. Furthermore, we uncover that our unified image generation formulation shared a consistent objective with image infilling, enabling us to leverage the strong generative priors of pre-trained infilling models without modifying the architectures. The codes, dataset, and models are available at <a href="https://visualcloze.github.io" rel="nofollow">https://visualcloze.github.io</a>.</em>',Le,E,Pe,H,qe,Q,la="VisualCloze is a two-stage cascade pipeline, containing <code>VisualClozeGenerationPipeline</code> and <code>VisualClozeUpsamplingPipeline</code>.",De,S,aa='<li>In <code>VisualClozeGenerationPipeline</code>, each image is downsampled before concatenating images into a grid layout, avoiding excessively high resolutions. VisualCloze releases two models suitable for diffusers, i.e., <a href="https://huggingface.co/VisualCloze/VisualClozePipeline-384" rel="nofollow">VisualClozePipeline-384</a> and <a href="https://huggingface.co/VisualCloze/VisualClozePipeline-384" rel="nofollow">VisualClozePipeline-512</a>, which downsample images to resolutions of 384 and 512, respectively.</li> <li><code>VisualClozeUpsamplingPipeline</code> uses <a href="https://huggingface.co/papers/2108.01073" rel="nofollow">SDEdit</a> to enable high-resolution image synthesis.</li>',Ke,$,sa="The <code>VisualClozePipeline</code> integrates both stages to support convenient end-to-end sampling, while also allowing users to utilize each pipeline independently as needed.",Oe,L,el,P,ll,q,na="<li>Task prompt: Required to describe the generation task intention</li> <li>Content prompt: Optional description or caption of the target image</li> <li>When content prompt is not needed, pass <code>None</code></li> <li>For batch inference, pass <code>List[str|None]</code></li>",al,D,sl,K,ta=`<li>Format: <code>List[List[Image|None]]</code></li> <li>Structure:
<ul><li>All rows except the last represent in-context examples</li> <li>Last row represents the current query (target image set to <code>None</code>)</li></ul></li> <li>For batch inference, pass <code>List[List[List[Image|None]]]</code></li>`,nl,O,tl,V,Ze,Wl,ee,_e,Bl,ol,ba='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mrow><mi>p</mi><mi>i</mi><mi>p</mi><mi>e</mi><mi mathvariant="normal">.</mi><mi>r</mi><mi>e</mi><mi>s</mi><mi>o</mi><mi>l</mi><mi>u</mi><mi>t</mi><mi>i</mi><mi>o</mi><mi>n</mi></mrow><mn>2</mn></msup></mrow><annotation encoding="application/x-tex">{pipe.resolution}^2</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1.0929em;vertical-align:-0.1944em;"></span><span class="mord"><span class="mord"><span class="mord mathnormal">p</span><span class="mord mathnormal">i</span><span class="mord mathnormal">p</span><span class="mord mathnormal">e</span><span class="mord">.</span><span class="mord mathnormal">reso</span><span class="mord mathnormal" style="margin-right:0.01968em;">l</span><span class="mord mathnormal">u</span><span class="mord mathnormal">t</span><span class="mord mathnormal">i</span><span class="mord mathnormal">o</span><span class="mord mathnormal">n</span></span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8984em;"><span style="top:-3.1473em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span></span></span></span>',Cl,Ie,oa="Upsampling in the second stage: 3x factor",Vl,Ge,ia="Custom resolution: Adjust using <code>upsampling_height</code> and <code>upsampling_width</code> parameters",il,le,pl,ae,pa='For comprehensive examples covering a wide range of tasks, please refer to the <a href="https://huggingface.co/spaces/VisualCloze/VisualCloze" rel="nofollow">Online Demo</a> and <a href="https://github.com/lzyhha/VisualCloze" rel="nofollow">GitHub Repository</a>. Below are simple examples for three cases: mask-to-image conversion, edge detection, and subject-driven generation.',rl,se,cl,ne,ml,te,dl,oe,Ml,ie,ul,pe,hl,re,gl,ce,yl,me,Jl,_,de,kl,We,ra=`The VisualCloze pipeline for image generation with visual context. Reference:
<a href="https://github.com/lzyhha/VisualCloze/tree/main" rel="nofollow">https://github.com/lzyhha/VisualCloze/tree/main</a>. This pipeline is designed to generate images based on visual
in-context examples.`,vl,W,Me,zl,Be,ca="Function invoked when calling the VisualCloze pipeline for generation.",xl,k,Tl,ue,wl,J,he,Yl,Ce,ma=`The VisualCloze pipeline for image generation with visual context. Reference:
<a href="https://github.com/lzyhha/VisualCloze/tree/main" rel="nofollow">https://github.com/lzyhha/VisualCloze/tree/main</a> This pipeline is designed to generate images based on visual
in-context examples.`,Xl,B,ge,Rl,Ve,da="Function invoked when calling the VisualCloze pipeline for generation.",Nl,v,Fl,z,ye,Al,ke,Ma=`Disable sliced VAE decoding. If <code>enable_vae_slicing</code> was previously enabled, this method will go back to
computing decoding in one step.`,El,x,Je,Hl,ve,ua=`Disable tiled VAE decoding. If <code>enable_vae_tiling</code> was previously enabled, this method will go back to
computing decoding in one step.`,Ql,Y,Te,Sl,ze,ha=`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.`,$l,X,we,Ll,xe,ga=`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.`,Pl,Ye,fe,fl,be,bl,Ee,jl;return w=new Z({props:{title:"VisualCloze",local:"visualcloze",headingTag:"h1"}}),N=new Z({props:{title:"Overview",local:"overview",headingTag:"h2"}}),E=new Z({props:{title:"Inference",local:"inference",headingTag:"h2"}}),H=new Z({props:{title:"Model loading",local:"model-loading",headingTag:"h3"}}),L=new Z({props:{title:"Input Specifications",local:"input-specifications",headingTag:"h3"}}),P=new Z({props:{title:"Task and Content Prompts",local:"task-and-content-prompts",headingTag:"h4"}}),D=new Z({props:{title:"Image Input Format",local:"image-input-format",headingTag:"h4"}}),O=new Z({props:{title:"Resolution Control",local:"resolution-control",headingTag:"h4"}}),le=new Z({props:{title:"Examples",local:"examples",headingTag:"h3"}}),se=new Z({props:{title:"Example for mask2image",local:"example-for-mask2image",headingTag:"h4"}}),ne=new Ae({props:{code:" ",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> VisualClozePipeline
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image

pipe = VisualClozePipeline.from_pretrained(<span class="hljs-string">&quot;VisualCloze/VisualClozePipeline-384&quot;</span>, resolution=<span class="hljs-number">384</span>, torch_dtype=torch.bfloat16)
pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-comment"># Load in-context images (make sure the paths are correct and accessible)</span>
image_paths = [
    <span class="hljs-comment"># in-context examples</span>
    [
        load_image(<span class="hljs-string">&#x27;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/visualcloze/visualcloze_mask2image_incontext-example-1_mask.jpg&#x27;</span>),
        load_image(<span class="hljs-string">&#x27;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/visualcloze/visualcloze_mask2image_incontext-example-1_image.jpg&#x27;</span>),
    ],
    <span class="hljs-comment"># query with the target image</span>
    [
        load_image(<span class="hljs-string">&#x27;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/visualcloze/visualcloze_mask2image_query_mask.jpg&#x27;</span>),
        <span class="hljs-literal">None</span>, <span class="hljs-comment"># No image needed for the target image</span>
    ],
]

<span class="hljs-comment"># Task and content prompt</span>
task_prompt = <span class="hljs-string">&quot;In each row, a logical task is demonstrated to achieve [IMAGE2] an aesthetically pleasing photograph based on [IMAGE1] sam 2-generated masks with rich color coding.&quot;</span>
content_prompt = <span class="hljs-string">&quot;&quot;&quot;Majestic photo of a golden eagle perched on a rocky outcrop in a mountainous landscape. 
The eagle is positioned in the right foreground, facing left, with its sharp beak and keen eyes prominently visible. 
Its plumage is a mix of dark brown and golden hues, with intricate feather details. 
The background features a soft-focus view of snow-capped mountains under a cloudy sky, creating a serene and grandiose atmosphere. 
The foreground includes rugged rocks and patches of green moss. Photorealistic, medium depth of field, 
soft natural lighting, cool color palette, high contrast, sharp focus on the eagle, blurred background, 
tranquil, majestic, wildlife photography.&quot;&quot;&quot;</span>

<span class="hljs-comment"># Run the pipeline</span>
image_result = pipe(
    task_prompt=task_prompt,
    content_prompt=content_prompt,
    image=image_paths,
    upsampling_width=<span class="hljs-number">1344</span>,
    upsampling_height=<span class="hljs-number">768</span>,
    upsampling_strength=<span class="hljs-number">0.4</span>,
    guidance_scale=<span class="hljs-number">30</span>,
    num_inference_steps=<span class="hljs-number">30</span>,
    max_sequence_length=<span class="hljs-number">512</span>,
    generator=torch.Generator(<span class="hljs-string">&quot;cpu&quot;</span>).manual_seed(<span class="hljs-number">0</span>)
).images[<span class="hljs-number">0</span>][<span class="hljs-number">0</span>]

<span class="hljs-comment"># Save the resulting image</span>
image_result.save(<span class="hljs-string">&quot;visualcloze.png&quot;</span>)`,wrap:!1}}),te=new Z({props:{title:"Example for edge-detection",local:"example-for-edge-detection",headingTag:"h4"}}),oe=new Ae({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwVmlzdWFsQ2xvemVQaXBlbGluZSUwQWZyb20lMjBkaWZmdXNlcnMudXRpbHMlMjBpbXBvcnQlMjBsb2FkX2ltYWdlJTBBJTBBcGlwZSUyMCUzRCUyMFZpc3VhbENsb3plUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUyMlZpc3VhbENsb3plJTJGVmlzdWFsQ2xvemVQaXBlbGluZS0zODQlMjIlMkMlMjByZXNvbHV0aW9uJTNEMzg0JTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5iZmxvYXQxNiklMEFwaXBlLnRvKCUyMmN1ZGElMjIpJTBBJTBBJTIzJTIwTG9hZCUyMGluLWNvbnRleHQlMjBpbWFnZXMlMjAobWFrZSUyMHN1cmUlMjB0aGUlMjBwYXRocyUyMGFyZSUyMGNvcnJlY3QlMjBhbmQlMjBhY2Nlc3NpYmxlKSUwQWltYWdlX3BhdGhzJTIwJTNEJTIwJTVCJTBBJTIwJTIwJTIwJTIwJTIzJTIwaW4tY29udGV4dCUyMGV4YW1wbGVzJTBBJTIwJTIwJTIwJTIwJTVCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwbG9hZF9pbWFnZSgnaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRhdGFzZXRzJTJGaHVnZ2luZ2ZhY2UlMkZkb2N1bWVudGF0aW9uLWltYWdlcyUyRnJlc29sdmUlMkZtYWluJTJGZGlmZnVzZXJzJTJGdmlzdWFsY2xvemUlMkZ2aXN1YWxjbG96ZV9lZGdlZGV0ZWN0aW9uX2luY29udGV4dC1leGFtcGxlLTFfaW1hZ2UuanBnJyklMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBsb2FkX2ltYWdlKCdodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGZGF0YXNldHMlMkZodWdnaW5nZmFjZSUyRmRvY3VtZW50YXRpb24taW1hZ2VzJTJGcmVzb2x2ZSUyRm1haW4lMkZkaWZmdXNlcnMlMkZ2aXN1YWxjbG96ZSUyRnZpc3VhbGNsb3plX2VkZ2VkZXRlY3Rpb25faW5jb250ZXh0LWV4YW1wbGUtMV9lZGdlLmpwZycpJTJDJTBBJTIwJTIwJTIwJTIwJTVEJTJDJTBBJTIwJTIwJTIwJTIwJTVCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwbG9hZF9pbWFnZSgnaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRhdGFzZXRzJTJGaHVnZ2luZ2ZhY2UlMkZkb2N1bWVudGF0aW9uLWltYWdlcyUyRnJlc29sdmUlMkZtYWluJTJGZGlmZnVzZXJzJTJGdmlzdWFsY2xvemUlMkZ2aXN1YWxjbG96ZV9lZGdlZGV0ZWN0aW9uX2luY29udGV4dC1leGFtcGxlLTJfaW1hZ2UuanBnJyklMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBsb2FkX2ltYWdlKCdodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGZGF0YXNldHMlMkZodWdnaW5nZmFjZSUyRmRvY3VtZW50YXRpb24taW1hZ2VzJTJGcmVzb2x2ZSUyRm1haW4lMkZkaWZmdXNlcnMlMkZ2aXN1YWxjbG96ZSUyRnZpc3VhbGNsb3plX2VkZ2VkZXRlY3Rpb25faW5jb250ZXh0LWV4YW1wbGUtMl9lZGdlLmpwZycpJTJDJTBBJTIwJTIwJTIwJTIwJTVEJTJDJTBBJTIwJTIwJTIwJTIwJTIzJTIwcXVlcnklMjB3aXRoJTIwdGhlJTIwdGFyZ2V0JTIwaW1hZ2UlMEElMjAlMjAlMjAlMjAlNUIlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBsb2FkX2ltYWdlKCdodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGZGF0YXNldHMlMkZodWdnaW5nZmFjZSUyRmRvY3VtZW50YXRpb24taW1hZ2VzJTJGcmVzb2x2ZSUyRm1haW4lMkZkaWZmdXNlcnMlMkZ2aXN1YWxjbG96ZSUyRnZpc3VhbGNsb3plX2VkZ2VkZXRlY3Rpb25fcXVlcnlfaW1hZ2UuanBnJyklMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBOb25lJTJDJTIwJTIzJTIwTm8lMjBpbWFnZSUyMG5lZWRlZCUyMGZvciUyMHRoZSUyMHRhcmdldCUyMGltYWdlJTBBJTIwJTIwJTIwJTIwJTVEJTJDJTBBJTVEJTBBJTBBJTIzJTIwVGFzayUyMGFuZCUyMGNvbnRlbnQlMjBwcm9tcHQlMEF0YXNrX3Byb21wdCUyMCUzRCUyMCUyMkVhY2glMjByb3clMjBpbGx1c3RyYXRlcyUyMGElMjBwYXRod2F5JTIwZnJvbSUyMCU1QklNQUdFMSU1RCUyMGElMjBzaGFycCUyMGFuZCUyMGJlYXV0aWZ1bGx5JTIwY29tcG9zZWQlMjBwaG90b2dyYXBoJTIwdG8lMjAlNUJJTUFHRTIlNUQlMjBlZGdlJTIwbWFwJTIwd2l0aCUyMG5hdHVyYWwlMjB3ZWxsLWNvbm5lY3RlZCUyMG91dGxpbmVzJTIwdXNpbmclMjBhJTIwY2xlYXIlMjBsb2dpY2FsJTIwdGFzay4lMjIlMEFjb250ZW50X3Byb21wdCUyMCUzRCUyMCUyMiUyMiUwQSUwQSUyMyUyMFJ1biUyMHRoZSUyMHBpcGVsaW5lJTBBaW1hZ2VfcmVzdWx0JTIwJTNEJTIwcGlwZSglMEElMjAlMjAlMjAlMjB0YXNrX3Byb21wdCUzRHRhc2tfcHJvbXB0JTJDJTBBJTIwJTIwJTIwJTIwY29udGVudF9wcm9tcHQlM0Rjb250ZW50X3Byb21wdCUyQyUwQSUyMCUyMCUyMCUyMGltYWdlJTNEaW1hZ2VfcGF0aHMlMkMlMEElMjAlMjAlMjAlMjB1cHNhbXBsaW5nX3dpZHRoJTNEODY0JTJDJTBBJTIwJTIwJTIwJTIwdXBzYW1wbGluZ19oZWlnaHQlM0QxMTUyJTJDJTBBJTIwJTIwJTIwJTIwdXBzYW1wbGluZ19zdHJlbmd0aCUzRDAuNCUyQyUwQSUyMCUyMCUyMCUyMGd1aWRhbmNlX3NjYWxlJTNEMzAlMkMlMEElMjAlMjAlMjAlMjBudW1faW5mZXJlbmNlX3N0ZXBzJTNEMzAlMkMlMEElMjAlMjAlMjAlMjBtYXhfc2VxdWVuY2VfbGVuZ3RoJTNENTEyJTJDJTBBJTIwJTIwJTIwJTIwZ2VuZXJhdG9yJTNEdG9yY2guR2VuZXJhdG9yKCUyMmNwdSUyMikubWFudWFsX3NlZWQoMCklMEEpLmltYWdlcyU1QjAlNUQlNUIwJTVEJTBBJTBBJTIzJTIwU2F2ZSUyMHRoZSUyMHJlc3VsdGluZyUyMGltYWdlJTBBaW1hZ2VfcmVzdWx0LnNhdmUoJTIydmlzdWFsY2xvemUucG5nJTIyKQ==",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> VisualClozePipeline
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image

pipe = VisualClozePipeline.from_pretrained(<span class="hljs-string">&quot;VisualCloze/VisualClozePipeline-384&quot;</span>, resolution=<span class="hljs-number">384</span>, torch_dtype=torch.bfloat16)
pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-comment"># Load in-context images (make sure the paths are correct and accessible)</span>
image_paths = [
    <span class="hljs-comment"># in-context examples</span>
    [
        load_image(<span class="hljs-string">&#x27;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/visualcloze/visualcloze_edgedetection_incontext-example-1_image.jpg&#x27;</span>),
        load_image(<span class="hljs-string">&#x27;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/visualcloze/visualcloze_edgedetection_incontext-example-1_edge.jpg&#x27;</span>),
    ],
    [
        load_image(<span class="hljs-string">&#x27;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/visualcloze/visualcloze_edgedetection_incontext-example-2_image.jpg&#x27;</span>),
        load_image(<span class="hljs-string">&#x27;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/visualcloze/visualcloze_edgedetection_incontext-example-2_edge.jpg&#x27;</span>),
    ],
    <span class="hljs-comment"># query with the target image</span>
    [
        load_image(<span class="hljs-string">&#x27;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/visualcloze/visualcloze_edgedetection_query_image.jpg&#x27;</span>),
        <span class="hljs-literal">None</span>, <span class="hljs-comment"># No image needed for the target image</span>
    ],
]

<span class="hljs-comment"># Task and content prompt</span>
task_prompt = <span class="hljs-string">&quot;Each row illustrates a pathway from [IMAGE1] a sharp and beautifully composed photograph to [IMAGE2] edge map with natural well-connected outlines using a clear logical task.&quot;</span>
content_prompt = <span class="hljs-string">&quot;&quot;</span>

<span class="hljs-comment"># Run the pipeline</span>
image_result = pipe(
    task_prompt=task_prompt,
    content_prompt=content_prompt,
    image=image_paths,
    upsampling_width=<span class="hljs-number">864</span>,
    upsampling_height=<span class="hljs-number">1152</span>,
    upsampling_strength=<span class="hljs-number">0.4</span>,
    guidance_scale=<span class="hljs-number">30</span>,
    num_inference_steps=<span class="hljs-number">30</span>,
    max_sequence_length=<span class="hljs-number">512</span>,
    generator=torch.Generator(<span class="hljs-string">&quot;cpu&quot;</span>).manual_seed(<span class="hljs-number">0</span>)
).images[<span class="hljs-number">0</span>][<span class="hljs-number">0</span>]

<span class="hljs-comment"># Save the resulting image</span>
image_result.save(<span class="hljs-string">&quot;visualcloze.png&quot;</span>)`,wrap:!1}}),ie=new Z({props:{title:"Example for subject-driven generation",local:"example-for-subject-driven-generation",headingTag:"h4"}}),pe=new Ae({props:{code:" ",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> VisualClozePipeline
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image

pipe = VisualClozePipeline.from_pretrained(<span class="hljs-string">&quot;VisualCloze/VisualClozePipeline-384&quot;</span>, resolution=<span class="hljs-number">384</span>, torch_dtype=torch.bfloat16)
pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-comment"># Load in-context images (make sure the paths are correct and accessible)</span>
image_paths = [
    <span class="hljs-comment"># in-context examples</span>
    [
        load_image(<span class="hljs-string">&#x27;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/visualcloze/visualcloze_subjectdriven_incontext-example-1_reference.jpg&#x27;</span>),
        load_image(<span class="hljs-string">&#x27;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/visualcloze/visualcloze_subjectdriven_incontext-example-1_depth.jpg&#x27;</span>),
        load_image(<span class="hljs-string">&#x27;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/visualcloze/visualcloze_subjectdriven_incontext-example-1_image.jpg&#x27;</span>),
    ],
    [
        load_image(<span class="hljs-string">&#x27;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/visualcloze/visualcloze_subjectdriven_incontext-example-2_reference.jpg&#x27;</span>),
        load_image(<span class="hljs-string">&#x27;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/visualcloze/visualcloze_subjectdriven_incontext-example-2_depth.jpg&#x27;</span>),
        load_image(<span class="hljs-string">&#x27;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/visualcloze/visualcloze_subjectdriven_incontext-example-2_image.jpg&#x27;</span>),
    ],
    <span class="hljs-comment"># query with the target image</span>
    [
        load_image(<span class="hljs-string">&#x27;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/visualcloze/visualcloze_subjectdriven_query_reference.jpg&#x27;</span>),
        load_image(<span class="hljs-string">&#x27;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/visualcloze/visualcloze_subjectdriven_query_depth.jpg&#x27;</span>),
        <span class="hljs-literal">None</span>, <span class="hljs-comment"># No image needed for the target image</span>
    ],
]

<span class="hljs-comment"># Task and content prompt</span>
task_prompt = <span class="hljs-string">&quot;&quot;&quot;Each row describes a process that begins with [IMAGE1] an image containing the key object, 
[IMAGE2] depth map revealing gray-toned spatial layers and results in 
[IMAGE3] an image with artistic qualitya high-quality image with exceptional detail.&quot;&quot;&quot;</span>
content_prompt = <span class="hljs-string">&quot;&quot;&quot;A vintage porcelain collector&#x27;s item. Beneath a blossoming cherry tree in early spring, 
this treasure is photographed up close, with soft pink petals drifting through the air and vibrant blossoms framing the scene.&quot;&quot;&quot;</span>

<span class="hljs-comment"># Run the pipeline</span>
image_result = pipe(
    task_prompt=task_prompt,
    content_prompt=content_prompt,
    image=image_paths,
    upsampling_width=<span class="hljs-number">1024</span>,
    upsampling_height=<span class="hljs-number">1024</span>,
    upsampling_strength=<span class="hljs-number">0.2</span>,
    guidance_scale=<span class="hljs-number">30</span>,
    num_inference_steps=<span class="hljs-number">30</span>,
    max_sequence_length=<span class="hljs-number">512</span>,
    generator=torch.Generator(<span class="hljs-string">&quot;cpu&quot;</span>).manual_seed(<span class="hljs-number">0</span>)
).images[<span class="hljs-number">0</span>][<span class="hljs-number">0</span>]

<span class="hljs-comment"># Save the resulting image</span>
image_result.save(<span class="hljs-string">&quot;visualcloze.png&quot;</span>)`,wrap:!1}}),re=new Z({props:{title:"Utilize each pipeline independently",local:"utilize-each-pipeline-independently",headingTag:"h4"}}),ce=new Ae({props:{code:" ",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> VisualClozeGenerationPipeline, FluxFillPipeline <span class="hljs-keyword">as</span> VisualClozeUpsamplingPipeline
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image
<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image

pipe = VisualClozeGenerationPipeline.from_pretrained(
    <span class="hljs-string">&quot;VisualCloze/VisualClozePipeline-384&quot;</span>, resolution=<span class="hljs-number">384</span>, torch_dtype=torch.bfloat16
)
pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

image_paths = [
    <span class="hljs-comment"># in-context examples</span>
    [
        load_image(
            <span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/visualcloze/visualcloze_mask2image_incontext-example-1_mask.jpg&quot;</span>
        ),
        load_image(
            <span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/visualcloze/visualcloze_mask2image_incontext-example-1_image.jpg&quot;</span>
        ),
    ],
    <span class="hljs-comment"># query with the target image</span>
    [
        load_image(
            <span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/visualcloze/visualcloze_mask2image_query_mask.jpg&quot;</span>
        ),
        <span class="hljs-literal">None</span>,  <span class="hljs-comment"># No image needed for the target image</span>
    ],
]
task_prompt = <span class="hljs-string">&quot;In each row, a logical task is demonstrated to achieve [IMAGE2] an aesthetically pleasing photograph based on [IMAGE1] sam 2-generated masks with rich color coding.&quot;</span>
content_prompt = <span class="hljs-string">&quot;Majestic photo of a golden eagle perched on a rocky outcrop in a mountainous landscape. The eagle is positioned in the right foreground, facing left, with its sharp beak and keen eyes prominently visible. Its plumage is a mix of dark brown and golden hues, with intricate feather details. The background features a soft-focus view of snow-capped mountains under a cloudy sky, creating a serene and grandiose atmosphere. The foreground includes rugged rocks and patches of green moss. Photorealistic, medium depth of field, soft natural lighting, cool color palette, high contrast, sharp focus on the eagle, blurred background, tranquil, majestic, wildlife photography.&quot;</span>

<span class="hljs-comment"># Stage 1: Generate initial image</span>
image = pipe(
    task_prompt=task_prompt,
    content_prompt=content_prompt,
    image=image_paths,
    guidance_scale=<span class="hljs-number">30</span>,
    num_inference_steps=<span class="hljs-number">30</span>,
    max_sequence_length=<span class="hljs-number">512</span>,
    generator=torch.Generator(<span class="hljs-string">&quot;cpu&quot;</span>).manual_seed(<span class="hljs-number">0</span>),
).images[<span class="hljs-number">0</span>][<span class="hljs-number">0</span>]

<span class="hljs-comment"># Stage 2 (optional): Upsample the generated image</span>
pipe_upsample = VisualClozeUpsamplingPipeline.from_pipe(pipe)
pipe_upsample.to(<span class="hljs-string">&quot;cuda&quot;</span>)

mask_image = Image.new(<span class="hljs-string">&quot;RGB&quot;</span>, image.size, (<span class="hljs-number">255</span>, <span class="hljs-number">255</span>, <span class="hljs-number">255</span>))

image = pipe_upsample(
    image=image,
    mask_image=mask_image,
    prompt=content_prompt,
    width=<span class="hljs-number">1344</span>,
    height=<span class="hljs-number">768</span>,
    strength=<span class="hljs-number">0.4</span>,
    guidance_scale=<span class="hljs-number">30</span>,
    num_inference_steps=<span class="hljs-number">30</span>,
    max_sequence_length=<span class="hljs-number">512</span>,
    generator=torch.Generator(<span class="hljs-string">&quot;cpu&quot;</span>).manual_seed(<span class="hljs-number">0</span>),
).images[<span class="hljs-number">0</span>]

image.save(<span class="hljs-string">&quot;visualcloze.png&quot;</span>)`,wrap:!1}}),me=new Z({props:{title:"VisualClozePipeline",local:"diffusers.VisualClozePipeline",headingTag:"h2"}}),de=new C({props:{name:"class diffusers.VisualClozePipeline",anchor:"diffusers.VisualClozePipeline",parameters:[{name:"scheduler",val:": FlowMatchEulerDiscreteScheduler"},{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"text_encoder_2",val:": T5EncoderModel"},{name:"tokenizer_2",val:": T5TokenizerFast"},{name:"transformer",val:": FluxTransformer2DModel"},{name:"resolution",val:": int = 384"}],parametersDescription:[{anchor:"diffusers.VisualClozePipeline.transformer",description:`<strong>transformer</strong> (<a href="/docs/diffusers/main/en/api/models/flux_transformer#diffusers.FluxTransformer2DModel">FluxTransformer2DModel</a>) &#x2014;
Conditional Transformer (MMDiT) architecture to denoise the encoded image latents.`,name:"transformer"},{anchor:"diffusers.VisualClozePipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/flow_match_euler_discrete#diffusers.FlowMatchEulerDiscreteScheduler">FlowMatchEulerDiscreteScheduler</a>) &#x2014;
A scheduler to be used in combination with <code>transformer</code> to denoise the encoded image latents.`,name:"scheduler"},{anchor:"diffusers.VisualClozePipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/main/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.VisualClozePipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) &#x2014;
<a href="https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel" rel="nofollow">CLIP</a>, specifically
the <a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a> variant.`,name:"text_encoder"},{anchor:"diffusers.VisualClozePipeline.text_encoder_2",description:`<strong>text_encoder_2</strong> (<code>T5EncoderModel</code>) &#x2014;
<a href="https://huggingface.co/docs/transformers/en/model_doc/t5#transformers.T5EncoderModel" rel="nofollow">T5</a>, specifically
the <a href="https://huggingface.co/google/t5-v1_1-xxl" rel="nofollow">google/t5-v1_1-xxl</a> variant.`,name:"text_encoder_2"},{anchor:"diffusers.VisualClozePipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
Tokenizer of class
<a href="https://huggingface.co/docs/transformers/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.VisualClozePipeline.tokenizer_2",description:`<strong>tokenizer_2</strong> (<code>T5TokenizerFast</code>) &#x2014;
Second Tokenizer of class
<a href="https://huggingface.co/docs/transformers/en/model_doc/t5#transformers.T5TokenizerFast" rel="nofollow">T5TokenizerFast</a>.`,name:"tokenizer_2"},{anchor:"diffusers.VisualClozePipeline.resolution",description:`<strong>resolution</strong> (<code>int</code>, <em>optional</em>, defaults to 384) &#x2014;
The resolution of each image when concatenating images from the query and in-context examples.`,name:"resolution"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/visualcloze/pipeline_visualcloze_combined.py#L89"}}),Me=new C({props:{name:"__call__",anchor:"diffusers.VisualClozePipeline.__call__",parameters:[{name:"task_prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"content_prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"image",val:": typing.Optional[torch.FloatTensor] = None"},{name:"upsampling_height",val:": typing.Optional[int] = None"},{name:"upsampling_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 = 30.0"},{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:"pooled_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"joint_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 = 512"},{name:"upsampling_strength",val:": float = 1.0"}],parametersDescription:[{anchor:"diffusers.VisualClozePipeline.__call__.task_prompt",description:`<strong>task_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to define the task intention.`,name:"task_prompt"},{anchor:"diffusers.VisualClozePipeline.__call__.content_prompt",description:`<strong>content_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to define the content or caption of the target image to be generated.`,name:"content_prompt"},{anchor:"diffusers.VisualClozePipeline.__call__.image",description:`<strong>image</strong> (<code>torch.Tensor</code>, <code>PIL.Image.Image</code>, <code>np.ndarray</code>, <code>List[torch.Tensor]</code>, <code>List[PIL.Image.Image]</code>, or <code>List[np.ndarray]</code>) &#x2014;
<code>Image</code>, numpy array or tensor representing an image batch to be used as the starting point. For both
numpy array and pytorch tensor, the expected value range is between <code>[0, 1]</code> If it&#x2019;s a tensor or a list
or tensors, the expected shape should be <code>(B, C, H, W)</code> or <code>(C, H, W)</code>. If it is a numpy array or a
list of arrays, the expected shape should be <code>(B, H, W, C)</code> or <code>(H, W, C)</code>.`,name:"image"},{anchor:"diffusers.VisualClozePipeline.__call__.upsampling_height",description:`<strong>upsampling_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 (i.e., output image) after upsampling via SDEdit. By
default, the image is upsampled by a factor of three, and the base resolution is determined by the
resolution parameter of the pipeline. When only one of <code>upsampling_height</code> or <code>upsampling_width</code> is
specified, the other will be automatically set based on the aspect ratio.`,name:"upsampling_height"},{anchor:"diffusers.VisualClozePipeline.__call__.upsampling_width",description:`<strong>upsampling_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 (i.e., output image) after upsampling via SDEdit. By
default, the image is upsampled by a factor of three, and the base resolution is determined by the
resolution parameter of the pipeline. When only one of <code>upsampling_height</code> or <code>upsampling_width</code> is
specified, the other will be automatically set based on the aspect ratio.`,name:"upsampling_width"},{anchor:"diffusers.VisualClozePipeline.__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.VisualClozePipeline.__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.VisualClozePipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 30.0) &#x2014;
Guidance scale as defined in <a href="https://huggingface.co/papers/2207.12598" rel="nofollow">Classifier-Free Diffusion
Guidance</a>. <code>guidance_scale</code> is defined as <code>w</code> of equation 2.
of <a href="https://huggingface.co/papers/2205.11487" rel="nofollow">Imagen Paper</a>. Guidance scale is enabled by setting
<code>guidance_scale &gt; 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.VisualClozePipeline.__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.VisualClozePipeline.__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.VisualClozePipeline.__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.VisualClozePipeline.__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.VisualClozePipeline.__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.VisualClozePipeline.__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.VisualClozePipeline.__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.VisualClozePipeline.__call__.joint_attention_kwargs",description:`<strong>joint_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:"joint_attention_kwargs"},{anchor:"diffusers.VisualClozePipeline.__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.VisualClozePipeline.__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.VisualClozePipeline.__call__.max_sequence_length",description:"<strong>max_sequence_length</strong> (<code>int</code> defaults to 512) &#x2014; Maximum sequence length to use with the <code>prompt</code>.",name:"max_sequence_length"},{anchor:"diffusers.VisualClozePipeline.__call__.upsampling_strength",description:`<strong>upsampling_strength</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
Indicates extent to transform the reference <code>image</code> when upsampling the results. Must be between 0 and
<ol>
<li>The generated image is used as a starting point and more noise is added the higher the
<code>upsampling_strength</code>. The number of denoising steps depends on the amount of noise initially added.
When <code>upsampling_strength</code> is 1, added noise is maximum and the denoising process runs for the full
number of iterations specified in <code>num_inference_steps</code>. A value of 0 skips the upsampling step and
output the results at the resolution of <code>self.resolution</code>.</li>
</ol>`,name:"upsampling_strength"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/visualcloze/pipeline_visualcloze_combined.py#L249",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>~pipelines.flux.FluxPipelineOutput</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.flux.FluxPipelineOutput</code> or <code>tuple</code></p>
`}}),k=new wa({props:{anchor:"diffusers.VisualClozePipeline.__call__.example",$$slots:{default:[Ca]},$$scope:{ctx:Ue}}}),ue=new Z({props:{title:"VisualClozeGenerationPipeline",local:"diffusers.VisualClozeGenerationPipeline",headingTag:"h2"}}),he=new C({props:{name:"class diffusers.VisualClozeGenerationPipeline",anchor:"diffusers.VisualClozeGenerationPipeline",parameters:[{name:"scheduler",val:": FlowMatchEulerDiscreteScheduler"},{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"text_encoder_2",val:": T5EncoderModel"},{name:"tokenizer_2",val:": T5TokenizerFast"},{name:"transformer",val:": FluxTransformer2DModel"},{name:"resolution",val:": int = 384"}],parametersDescription:[{anchor:"diffusers.VisualClozeGenerationPipeline.transformer",description:`<strong>transformer</strong> (<a href="/docs/diffusers/main/en/api/models/flux_transformer#diffusers.FluxTransformer2DModel">FluxTransformer2DModel</a>) &#x2014;
Conditional Transformer (MMDiT) architecture to denoise the encoded image latents.`,name:"transformer"},{anchor:"diffusers.VisualClozeGenerationPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/flow_match_euler_discrete#diffusers.FlowMatchEulerDiscreteScheduler">FlowMatchEulerDiscreteScheduler</a>) &#x2014;
A scheduler to be used in combination with <code>transformer</code> to denoise the encoded image latents.`,name:"scheduler"},{anchor:"diffusers.VisualClozeGenerationPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/main/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.VisualClozeGenerationPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) &#x2014;
<a href="https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel" rel="nofollow">CLIP</a>, specifically
the <a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a> variant.`,name:"text_encoder"},{anchor:"diffusers.VisualClozeGenerationPipeline.text_encoder_2",description:`<strong>text_encoder_2</strong> (<code>T5EncoderModel</code>) &#x2014;
<a href="https://huggingface.co/docs/transformers/en/model_doc/t5#transformers.T5EncoderModel" rel="nofollow">T5</a>, specifically
the <a href="https://huggingface.co/google/t5-v1_1-xxl" rel="nofollow">google/t5-v1_1-xxl</a> variant.`,name:"text_encoder_2"},{anchor:"diffusers.VisualClozeGenerationPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
Tokenizer of class
<a href="https://huggingface.co/docs/transformers/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.VisualClozeGenerationPipeline.tokenizer_2",description:`<strong>tokenizer_2</strong> (<code>T5TokenizerFast</code>) &#x2014;
Second Tokenizer of class
<a href="https://huggingface.co/docs/transformers/en/model_doc/t5#transformers.T5TokenizerFast" rel="nofollow">T5TokenizerFast</a>.`,name:"tokenizer_2"},{anchor:"diffusers.VisualClozeGenerationPipeline.resolution",description:`<strong>resolution</strong> (<code>int</code>, <em>optional</em>, defaults to 384) &#x2014;
The resolution of each image when concatenating images from the query and in-context examples.`,name:"resolution"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/visualcloze/pipeline_visualcloze_generation.py#L119"}}),ge=new C({props:{name:"__call__",anchor:"diffusers.VisualClozeGenerationPipeline.__call__",parameters:[{name:"task_prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"content_prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"image",val:": typing.Optional[torch.FloatTensor] = None"},{name:"num_inference_steps",val:": int = 50"},{name:"sigmas",val:": typing.Optional[typing.List[float]] = None"},{name:"guidance_scale",val:": float = 30.0"},{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:"pooled_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"joint_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 = 512"}],parametersDescription:[{anchor:"diffusers.VisualClozeGenerationPipeline.__call__.task_prompt",description:`<strong>task_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to define the task intention.`,name:"task_prompt"},{anchor:"diffusers.VisualClozeGenerationPipeline.__call__.content_prompt",description:`<strong>content_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to define the content or caption of the target image to be generated.`,name:"content_prompt"},{anchor:"diffusers.VisualClozeGenerationPipeline.__call__.image",description:`<strong>image</strong> (<code>torch.Tensor</code>, <code>PIL.Image.Image</code>, <code>np.ndarray</code>, <code>List[torch.Tensor]</code>, <code>List[PIL.Image.Image]</code>, or <code>List[np.ndarray]</code>) &#x2014;
<code>Image</code>, numpy array or tensor representing an image batch to be used as the starting point. For both
numpy array and pytorch tensor, the expected value range is between <code>[0, 1]</code> If it&#x2019;s a tensor or a list
or tensors, the expected shape should be <code>(B, C, H, W)</code> or <code>(C, H, W)</code>. If it is a numpy array or a
list of arrays, the expected shape should be <code>(B, H, W, C)</code> or <code>(H, W, C)</code>.`,name:"image"},{anchor:"diffusers.VisualClozeGenerationPipeline.__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.VisualClozeGenerationPipeline.__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.VisualClozeGenerationPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 30.0) &#x2014;
Guidance scale as defined in <a href="https://huggingface.co/papers/2207.12598" rel="nofollow">Classifier-Free Diffusion
Guidance</a>. <code>guidance_scale</code> is defined as <code>w</code> of equation 2.
of <a href="https://huggingface.co/papers/2205.11487" rel="nofollow">Imagen Paper</a>. Guidance scale is enabled by setting
<code>guidance_scale &gt; 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.VisualClozeGenerationPipeline.__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.VisualClozeGenerationPipeline.__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.VisualClozeGenerationPipeline.__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.VisualClozeGenerationPipeline.__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.VisualClozeGenerationPipeline.__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.VisualClozeGenerationPipeline.__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.VisualClozeGenerationPipeline.__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.VisualClozeGenerationPipeline.__call__.joint_attention_kwargs",description:`<strong>joint_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:"joint_attention_kwargs"},{anchor:"diffusers.VisualClozeGenerationPipeline.__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.VisualClozeGenerationPipeline.__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.VisualClozeGenerationPipeline.__call__.max_sequence_length",description:"<strong>max_sequence_length</strong> (<code>int</code> defaults to 512) &#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/visualcloze/pipeline_visualcloze_generation.py#L708",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>~pipelines.flux.FluxPipelineOutput</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.flux.FluxPipelineOutput</code> or <code>tuple</code></p>
`}}),v=new wa({props:{anchor:"diffusers.VisualClozeGenerationPipeline.__call__.example",$$slots:{default:[Va]},$$scope:{ctx:Ue}}}),ye=new C({props:{name:"disable_vae_slicing",anchor:"diffusers.VisualClozeGenerationPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/visualcloze/pipeline_visualcloze_generation.py#L536"}}),Je=new C({props:{name:"disable_vae_tiling",anchor:"diffusers.VisualClozeGenerationPipeline.disable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/visualcloze/pipeline_visualcloze_generation.py#L563"}}),Te=new C({props:{name:"enable_vae_slicing",anchor:"diffusers.VisualClozeGenerationPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/visualcloze/pipeline_visualcloze_generation.py#L523"}}),we=new C({props:{name:"enable_vae_tiling",anchor:"diffusers.VisualClozeGenerationPipeline.enable_vae_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/visualcloze/pipeline_visualcloze_generation.py#L549"}}),fe=new C({props:{name:"encode_prompt",anchor:"diffusers.VisualClozeGenerationPipeline.encode_prompt",parameters:[{name:"layout_prompt",val:": typing.Union[str, typing.List[str]]"},{name:"task_prompt",val:": typing.Union[str, typing.List[str]]"},{name:"content_prompt",val:": typing.Union[str, typing.List[str]]"},{name:"device",val:": typing.Optional[torch.device] = None"},{name:"num_images_per_prompt",val:": int = 1"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"pooled_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"max_sequence_length",val:": int = 512"},{name:"lora_scale",val:": typing.Optional[float] = None"}],parametersDescription:[{anchor:"diffusers.VisualClozeGenerationPipeline.encode_prompt.layout_prompt",description:`<strong>layout_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to define the number of in-context examples and the number of images involved in
the task.`,name:"layout_prompt"},{anchor:"diffusers.VisualClozeGenerationPipeline.encode_prompt.task_prompt",description:`<strong>task_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to define the task intention.`,name:"task_prompt"},{anchor:"diffusers.VisualClozeGenerationPipeline.encode_prompt.content_prompt",description:`<strong>content_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to define the content or caption of the target image to be generated.`,name:"content_prompt"},{anchor:"diffusers.VisualClozeGenerationPipeline.encode_prompt.device",description:`<strong>device</strong> &#x2014; (<code>torch.device</code>):
torch device`,name:"device"},{anchor:"diffusers.VisualClozeGenerationPipeline.encode_prompt.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>) &#x2014;
number of images that should be generated per prompt`,name:"num_images_per_prompt"},{anchor:"diffusers.VisualClozeGenerationPipeline.encode_prompt.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.VisualClozeGenerationPipeline.encode_prompt.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.VisualClozeGenerationPipeline.encode_prompt.lora_scale",description:`<strong>lora_scale</strong> (<code>float</code>, <em>optional</em>) &#x2014;
A lora scale that will be applied to all LoRA layers of the text encoder if LoRA layers are loaded.`,name:"lora_scale"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/visualcloze/pipeline_visualcloze_generation.py#L288"}}),be=new Ba({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/pipelines/visualcloze.md"}}),{c(){g=i("meta"),G=s(),b=i("p"),T=s(),c(w.$$.fragment),r=s(),j=i("p"),j.innerHTML=Dl,He=s(),R=i("ol"),R.innerHTML=Kl,Qe=s(),c(N.$$.fragment),Se=s(),F=i("p"),F.textContent=Ol,$e=s(),A=i("p"),A.innerHTML=ea,Le=s(),c(E.$$.fragment),Pe=s(),c(H.$$.fragment),qe=s(),Q=i("p"),Q.innerHTML=la,De=s(),S=i("ul"),S.innerHTML=aa,Ke=s(),$=i("p"),$.innerHTML=sa,Oe=s(),c(L.$$.fragment),el=s(),c(P.$$.fragment),ll=s(),q=i("ul"),q.innerHTML=na,al=s(),c(D.$$.fragment),sl=s(),K=i("ul"),K.innerHTML=ta,nl=s(),c(O.$$.fragment),tl=s(),V=i("ul"),Ze=i("li"),Wl=Ja(`Default behavior:
`),ee=i("ul"),_e=i("li"),Bl=Ja("Initial generation in the first stage: area of "),ol=new Ia(!1),Cl=s(),Ie=i("li"),Ie.textContent=oa,Vl=s(),Ge=i("li"),Ge.innerHTML=ia,il=s(),c(le.$$.fragment),pl=s(),ae=i("p"),ae.innerHTML=pa,rl=s(),c(se.$$.fragment),cl=s(),c(ne.$$.fragment),ml=s(),c(te.$$.fragment),dl=s(),c(oe.$$.fragment),Ml=s(),c(ie.$$.fragment),ul=s(),c(pe.$$.fragment),hl=s(),c(re.$$.fragment),gl=s(),c(ce.$$.fragment),yl=s(),c(me.$$.fragment),Jl=s(),_=i("div"),c(de.$$.fragment),kl=s(),We=i("p"),We.innerHTML=ra,vl=s(),W=i("div"),c(Me.$$.fragment),zl=s(),Be=i("p"),Be.textContent=ca,xl=s(),c(k.$$.fragment),Tl=s(),c(ue.$$.fragment),wl=s(),J=i("div"),c(he.$$.fragment),Yl=s(),Ce=i("p"),Ce.innerHTML=ma,Xl=s(),B=i("div"),c(ge.$$.fragment),Rl=s(),Ve=i("p"),Ve.textContent=da,Nl=s(),c(v.$$.fragment),Fl=s(),z=i("div"),c(ye.$$.fragment),Al=s(),ke=i("p"),ke.innerHTML=Ma,El=s(),x=i("div"),c(Je.$$.fragment),Hl=s(),ve=i("p"),ve.innerHTML=ua,Ql=s(),Y=i("div"),c(Te.$$.fragment),Sl=s(),ze=i("p"),ze.textContent=ha,$l=s(),X=i("div"),c(we.$$.fragment),Ll=s(),xe=i("p"),xe.textContent=ga,Pl=s(),Ye=i("div"),c(fe.$$.fragment),fl=s(),c(be.$$.fragment),bl=s(),Ee=i("p"),this.h()},l(e){const l=Ga("svelte-u9bgzb",document.head);g=p(l,"META",{name:!0,content:!0}),l.forEach(a),G=n(e),b=p(e,"P",{}),U(b).forEach(a),T=n(e),m(w.$$.fragment,e),r=n(e),j=p(e,"P",{"data-svelte-h":!0}),y(j)!=="svelte-12h8xk0"&&(j.innerHTML=Dl),He=n(e),R=p(e,"OL",{"data-svelte-h":!0}),y(R)!=="svelte-14ytbhu"&&(R.innerHTML=Kl),Qe=n(e),m(N.$$.fragment,e),Se=n(e),F=p(e,"P",{"data-svelte-h":!0}),y(F)!=="svelte-1cwsb16"&&(F.textContent=Ol),$e=n(e),A=p(e,"P",{"data-svelte-h":!0}),y(A)!=="svelte-5csvlm"&&(A.innerHTML=ea),Le=n(e),m(E.$$.fragment,e),Pe=n(e),m(H.$$.fragment,e),qe=n(e),Q=p(e,"P",{"data-svelte-h":!0}),y(Q)!=="svelte-16qb420"&&(Q.innerHTML=la),De=n(e),S=p(e,"UL",{"data-svelte-h":!0}),y(S)!=="svelte-1wbjiaa"&&(S.innerHTML=aa),Ke=n(e),$=p(e,"P",{"data-svelte-h":!0}),y($)!=="svelte-4c50zb"&&($.innerHTML=sa),Oe=n(e),m(L.$$.fragment,e),el=n(e),m(P.$$.fragment,e),ll=n(e),q=p(e,"UL",{"data-svelte-h":!0}),y(q)!=="svelte-igjn4e"&&(q.innerHTML=na),al=n(e),m(D.$$.fragment,e),sl=n(e),K=p(e,"UL",{"data-svelte-h":!0}),y(K)!=="svelte-13lelip"&&(K.innerHTML=ta),nl=n(e),m(O.$$.fragment,e),tl=n(e),V=p(e,"UL",{});var je=U(V);Ze=p(je,"LI",{});var Xe=U(Ze);Wl=Ta(Xe,`Default behavior:
`),ee=p(Xe,"UL",{});var Ul=U(ee);_e=p(Ul,"LI",{});var ql=U(_e);Bl=Ta(ql,"Initial generation in the first stage: area of "),ol=Wa(ql,!1),ql.forEach(a),Cl=n(Ul),Ie=p(Ul,"LI",{"data-svelte-h":!0}),y(Ie)!=="svelte-uk6xos"&&(Ie.textContent=oa),Ul.forEach(a),Xe.forEach(a),Vl=n(je),Ge=p(je,"LI",{"data-svelte-h":!0}),y(Ge)!=="svelte-1wh8nkg"&&(Ge.innerHTML=ia),je.forEach(a),il=n(e),m(le.$$.fragment,e),pl=n(e),ae=p(e,"P",{"data-svelte-h":!0}),y(ae)!=="svelte-9tmo9c"&&(ae.innerHTML=pa),rl=n(e),m(se.$$.fragment,e),cl=n(e),m(ne.$$.fragment,e),ml=n(e),m(te.$$.fragment,e),dl=n(e),m(oe.$$.fragment,e),Ml=n(e),m(ie.$$.fragment,e),ul=n(e),m(pe.$$.fragment,e),hl=n(e),m(re.$$.fragment,e),gl=n(e),m(ce.$$.fragment,e),yl=n(e),m(me.$$.fragment,e),Jl=n(e),_=p(e,"DIV",{class:!0});var Re=U(_);m(de.$$.fragment,Re),kl=n(Re),We=p(Re,"P",{"data-svelte-h":!0}),y(We)!=="svelte-s68q88"&&(We.innerHTML=ra),vl=n(Re),W=p(Re,"DIV",{class:!0});var Ne=U(W);m(Me.$$.fragment,Ne),zl=n(Ne),Be=p(Ne,"P",{"data-svelte-h":!0}),y(Be)!=="svelte-1iwtzit"&&(Be.textContent=ca),xl=n(Ne),m(k.$$.fragment,Ne),Ne.forEach(a),Re.forEach(a),Tl=n(e),m(ue.$$.fragment,e),wl=n(e),J=p(e,"DIV",{class:!0});var f=U(J);m(he.$$.fragment,f),Yl=n(f),Ce=p(f,"P",{"data-svelte-h":!0}),y(Ce)!=="svelte-145x6hk"&&(Ce.innerHTML=ma),Xl=n(f),B=p(f,"DIV",{class:!0});var Fe=U(B);m(ge.$$.fragment,Fe),Rl=n(Fe),Ve=p(Fe,"P",{"data-svelte-h":!0}),y(Ve)!=="svelte-1iwtzit"&&(Ve.textContent=da),Nl=n(Fe),m(v.$$.fragment,Fe),Fe.forEach(a),Fl=n(f),z=p(f,"DIV",{class:!0});var Zl=U(z);m(ye.$$.fragment,Zl),Al=n(Zl),ke=p(Zl,"P",{"data-svelte-h":!0}),y(ke)!=="svelte-1s3c06i"&&(ke.innerHTML=Ma),Zl.forEach(a),El=n(f),x=p(f,"DIV",{class:!0});var _l=U(x);m(Je.$$.fragment,_l),Hl=n(_l),ve=p(_l,"P",{"data-svelte-h":!0}),y(ve)!=="svelte-pkn4ui"&&(ve.innerHTML=ua),_l.forEach(a),Ql=n(f),Y=p(f,"DIV",{class:!0});var Il=U(Y);m(Te.$$.fragment,Il),Sl=n(Il),ze=p(Il,"P",{"data-svelte-h":!0}),y(ze)!=="svelte-14bnrb6"&&(ze.textContent=ha),Il.forEach(a),$l=n(f),X=p(f,"DIV",{class:!0});var Gl=U(X);m(we.$$.fragment,Gl),Ll=n(Gl),xe=p(Gl,"P",{"data-svelte-h":!0}),y(xe)!=="svelte-1xwrf7t"&&(xe.textContent=ga),Gl.forEach(a),Pl=n(f),Ye=p(f,"DIV",{class:!0});var ya=U(Ye);m(fe.$$.fragment,ya),ya.forEach(a),f.forEach(a),fl=n(e),m(be.$$.fragment,e),bl=n(e),Ee=p(e,"P",{}),U(Ee).forEach(a),this.h()},h(){I(g,"name","hf:doc:metadata"),I(g,"content",va),ol.a=null,I(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(_,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(Ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,l){o(document.head,g),t(e,G,l),t(e,b,l),t(e,T,l),d(w,e,l),t(e,r,l),t(e,j,l),t(e,He,l),t(e,R,l),t(e,Qe,l),d(N,e,l),t(e,Se,l),t(e,F,l),t(e,$e,l),t(e,A,l),t(e,Le,l),d(E,e,l),t(e,Pe,l),d(H,e,l),t(e,qe,l),t(e,Q,l),t(e,De,l),t(e,S,l),t(e,Ke,l),t(e,$,l),t(e,Oe,l),d(L,e,l),t(e,el,l),d(P,e,l),t(e,ll,l),t(e,q,l),t(e,al,l),d(D,e,l),t(e,sl,l),t(e,K,l),t(e,nl,l),d(O,e,l),t(e,tl,l),t(e,V,l),o(V,Ze),o(Ze,Wl),o(Ze,ee),o(ee,_e),o(_e,Bl),ol.m(ba,_e),o(ee,Cl),o(ee,Ie),o(V,Vl),o(V,Ge),t(e,il,l),d(le,e,l),t(e,pl,l),t(e,ae,l),t(e,rl,l),d(se,e,l),t(e,cl,l),d(ne,e,l),t(e,ml,l),d(te,e,l),t(e,dl,l),d(oe,e,l),t(e,Ml,l),d(ie,e,l),t(e,ul,l),d(pe,e,l),t(e,hl,l),d(re,e,l),t(e,gl,l),d(ce,e,l),t(e,yl,l),d(me,e,l),t(e,Jl,l),t(e,_,l),d(de,_,null),o(_,kl),o(_,We),o(_,vl),o(_,W),d(Me,W,null),o(W,zl),o(W,Be),o(W,xl),d(k,W,null),t(e,Tl,l),d(ue,e,l),t(e,wl,l),t(e,J,l),d(he,J,null),o(J,Yl),o(J,Ce),o(J,Xl),o(J,B),d(ge,B,null),o(B,Rl),o(B,Ve),o(B,Nl),d(v,B,null),o(J,Fl),o(J,z),d(ye,z,null),o(z,Al),o(z,ke),o(J,El),o(J,x),d(Je,x,null),o(x,Hl),o(x,ve),o(J,Ql),o(J,Y),d(Te,Y,null),o(Y,Sl),o(Y,ze),o(J,$l),o(J,X),d(we,X,null),o(X,Ll),o(X,xe),o(J,Pl),o(J,Ye),d(fe,Ye,null),t(e,fl,l),d(be,e,l),t(e,bl,l),t(e,Ee,l),jl=!0},p(e,[l]){const je={};l&2&&(je.$$scope={dirty:l,ctx:e}),k.$set(je);const Xe={};l&2&&(Xe.$$scope={dirty:l,ctx:e}),v.$set(Xe)},i(e){jl||(M(w.$$.fragment,e),M(N.$$.fragment,e),M(E.$$.fragment,e),M(H.$$.fragment,e),M(L.$$.fragment,e),M(P.$$.fragment,e),M(D.$$.fragment,e),M(O.$$.fragment,e),M(le.$$.fragment,e),M(se.$$.fragment,e),M(ne.$$.fragment,e),M(te.$$.fragment,e),M(oe.$$.fragment,e),M(ie.$$.fragment,e),M(pe.$$.fragment,e),M(re.$$.fragment,e),M(ce.$$.fragment,e),M(me.$$.fragment,e),M(de.$$.fragment,e),M(Me.$$.fragment,e),M(k.$$.fragment,e),M(ue.$$.fragment,e),M(he.$$.fragment,e),M(ge.$$.fragment,e),M(v.$$.fragment,e),M(ye.$$.fragment,e),M(Je.$$.fragment,e),M(Te.$$.fragment,e),M(we.$$.fragment,e),M(fe.$$.fragment,e),M(be.$$.fragment,e),jl=!0)},o(e){u(w.$$.fragment,e),u(N.$$.fragment,e),u(E.$$.fragment,e),u(H.$$.fragment,e),u(L.$$.fragment,e),u(P.$$.fragment,e),u(D.$$.fragment,e),u(O.$$.fragment,e),u(le.$$.fragment,e),u(se.$$.fragment,e),u(ne.$$.fragment,e),u(te.$$.fragment,e),u(oe.$$.fragment,e),u(ie.$$.fragment,e),u(pe.$$.fragment,e),u(re.$$.fragment,e),u(ce.$$.fragment,e),u(me.$$.fragment,e),u(de.$$.fragment,e),u(Me.$$.fragment,e),u(k.$$.fragment,e),u(ue.$$.fragment,e),u(he.$$.fragment,e),u(ge.$$.fragment,e),u(v.$$.fragment,e),u(ye.$$.fragment,e),u(Je.$$.fragment,e),u(Te.$$.fragment,e),u(we.$$.fragment,e),u(fe.$$.fragment,e),u(be.$$.fragment,e),jl=!1},d(e){e&&(a(G),a(b),a(T),a(r),a(j),a(He),a(R),a(Qe),a(Se),a(F),a($e),a(A),a(Le),a(Pe),a(qe),a(Q),a(De),a(S),a(Ke),a($),a(Oe),a(el),a(ll),a(q),a(al),a(sl),a(K),a(nl),a(tl),a(V),a(il),a(pl),a(ae),a(rl),a(cl),a(ml),a(dl),a(Ml),a(ul),a(hl),a(gl),a(yl),a(Jl),a(_),a(Tl),a(wl),a(J),a(fl),a(bl),a(Ee)),a(g),h(w,e),h(N,e),h(E,e),h(H,e),h(L,e),h(P,e),h(D,e),h(O,e),h(le,e),h(se,e),h(ne,e),h(te,e),h(oe,e),h(ie,e),h(pe,e),h(re,e),h(ce,e),h(me,e),h(de),h(Me),h(k),h(ue,e),h(he),h(ge),h(v),h(ye),h(Je),h(Te),h(we),h(fe),h(be,e)}}}const va='{"title":"VisualCloze","local":"visualcloze","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Inference","local":"inference","sections":[{"title":"Model loading","local":"model-loading","sections":[],"depth":3},{"title":"Input Specifications","local":"input-specifications","sections":[{"title":"Task and Content Prompts","local":"task-and-content-prompts","sections":[],"depth":4},{"title":"Image Input Format","local":"image-input-format","sections":[],"depth":4},{"title":"Resolution Control","local":"resolution-control","sections":[],"depth":4}],"depth":3},{"title":"Examples","local":"examples","sections":[{"title":"Example for mask2image","local":"example-for-mask2image","sections":[],"depth":4},{"title":"Example for edge-detection","local":"example-for-edge-detection","sections":[],"depth":4},{"title":"Example for subject-driven generation","local":"example-for-subject-driven-generation","sections":[],"depth":4},{"title":"Utilize each pipeline independently","local":"utilize-each-pipeline-independently","sections":[],"depth":4}],"depth":3}],"depth":2},{"title":"VisualClozePipeline","local":"diffusers.VisualClozePipeline","sections":[],"depth":2},{"title":"VisualClozeGenerationPipeline","local":"diffusers.VisualClozeGenerationPipeline","sections":[],"depth":2}],"depth":1}';function za(Ue){return Ua(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Aa extends Za{constructor(g){super(),_a(this,g,za,ka,ja,{})}}export{Aa as component};
