import{s as za,f as Aa,o as Na,n as P}from"../chunks/scheduler.9bc65507.js";import{S as Ra,i as Ya,g as o,s as i,u as M,A as Ea,h as r,f as t,c,j as u,v as y,y as f,k as h,o as a,a as p,w as _,d as w,t as T,x as j}from"../chunks/index.78c82d43.js";import{T as cs}from"../chunks/Tip.87d55b76.js";import{D as U}from"../chunks/Docstring.4e7352e2.js";import{C as Mt}from"../chunks/CodeBlock.73e038be.js";import{I as z}from"../chunks/IconCopyLink.bedaa44d.js";import{E as gt}from"../chunks/ExampleCodeBlock.872b014d.js";function Qa(J){let n,b="Example:",d,m,g;return m=new Mt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFhDTElQVGV4dE1vZGVsJTJDJTIwWENMSVBUZXh0Q29uZmlnJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMFhDTElQVGV4dE1vZGVsJTIwd2l0aCUyMG1pY3Jvc29mdCUyRnhjbGlwLWJhc2UtcGF0Y2gzMiUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBYQ0xJUFRleHRDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBYQ0xJUFRleHRDb25maWclMjBmcm9tJTIwdGhlJTIwbWljcm9zb2Z0JTJGeGNsaXAtYmFzZS1wYXRjaDMyJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBYQ0xJUFRleHRNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> XCLIPTextModel, XCLIPTextConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a XCLIPTextModel with microsoft/xclip-base-patch32 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = XCLIPTextConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a XCLIPTextConfig from the microsoft/xclip-base-patch32 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XCLIPTextModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`,wrap:!1}}),{c(){n=o("p"),n.textContent=b,d=i(),M(m.$$.fragment)},l(s){n=r(s,"P",{"data-svelte-h":!0}),f(n)!=="svelte-11lpom8"&&(n.textContent=b),d=c(s),y(m.$$.fragment,s)},m(s,C){p(s,n,C),p(s,d,C),_(m,s,C),g=!0},p:P,i(s){g||(w(m.$$.fragment,s),g=!0)},o(s){T(m.$$.fragment,s),g=!1},d(s){s&&(t(n),t(d)),j(m,s)}}}function Fa(J){let n,b="Example:",d,m,g;return m=new Mt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFhDTElQVmlzaW9uTW9kZWwlMkMlMjBYQ0xJUFZpc2lvbkNvbmZpZyUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBYQ0xJUFZpc2lvbk1vZGVsJTIwd2l0aCUyMG1pY3Jvc29mdCUyRnhjbGlwLWJhc2UtcGF0Y2gzMiUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBYQ0xJUFZpc2lvbkNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMFhDTElQVmlzaW9uTW9kZWwlMjBtb2RlbCUyMGZyb20lMjB0aGUlMjBtaWNyb3NvZnQlMkZ4Y2xpcC1iYXNlLXBhdGNoMzIlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMFhDTElQVmlzaW9uTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> XCLIPVisionModel, XCLIPVisionConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a XCLIPVisionModel with microsoft/xclip-base-patch32 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = XCLIPVisionConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a XCLIPVisionModel model from the microsoft/xclip-base-patch32 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XCLIPVisionModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`,wrap:!1}}),{c(){n=o("p"),n.textContent=b,d=i(),M(m.$$.fragment)},l(s){n=r(s,"P",{"data-svelte-h":!0}),f(n)!=="svelte-11lpom8"&&(n.textContent=b),d=c(s),y(m.$$.fragment,s)},m(s,C){p(s,n,C),p(s,d,C),_(m,s,C),g=!0},p:P,i(s){g||(w(m.$$.fragment,s),g=!0)},o(s){T(m.$$.fragment,s),g=!1},d(s){s&&(t(n),t(d)),j(m,s)}}}function Sa(J){let n,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=o("p"),n.innerHTML=b},l(d){n=r(d,"P",{"data-svelte-h":!0}),f(n)!=="svelte-fincs2"&&(n.innerHTML=b)},m(d,m){p(d,n,m)},p:P,d(d){d&&t(n)}}}function Ha(J){let n,b="Examples:",d,m,g;return m=new Mt({props:{code:" ",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> av
<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">import</span> numpy <span class="hljs-keyword">as</span> np

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, AutoModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> hf_hub_download

<span class="hljs-meta">&gt;&gt;&gt; </span>np.random.seed(<span class="hljs-number">0</span>)


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">read_video_pyav</span>(<span class="hljs-params">container, indices</span>):
<span class="hljs-meta">... </span>    <span class="hljs-string">&#x27;&#x27;&#x27;
<span class="hljs-meta">... </span>    Decode the video with PyAV decoder.
<span class="hljs-meta">... </span>    Args:
<span class="hljs-meta">... </span>        container (\`av.container.input.InputContainer\`): PyAV container.
<span class="hljs-meta">... </span>        indices (\`List[int]\`): List of frame indices to decode.
<span class="hljs-meta">... </span>    Returns:
<span class="hljs-meta">... </span>        result (np.ndarray): np array of decoded frames of shape (num_frames, height, width, 3).
<span class="hljs-meta">... </span>    &#x27;&#x27;&#x27;</span>
<span class="hljs-meta">... </span>    frames = []
<span class="hljs-meta">... </span>    container.seek(<span class="hljs-number">0</span>)
<span class="hljs-meta">... </span>    start_index = indices[<span class="hljs-number">0</span>]
<span class="hljs-meta">... </span>    end_index = indices[-<span class="hljs-number">1</span>]
<span class="hljs-meta">... </span>    <span class="hljs-keyword">for</span> i, frame <span class="hljs-keyword">in</span> <span class="hljs-built_in">enumerate</span>(container.decode(video=<span class="hljs-number">0</span>)):
<span class="hljs-meta">... </span>        <span class="hljs-keyword">if</span> i &gt; end_index:
<span class="hljs-meta">... </span>            <span class="hljs-keyword">break</span>
<span class="hljs-meta">... </span>        <span class="hljs-keyword">if</span> i &gt;= start_index <span class="hljs-keyword">and</span> i <span class="hljs-keyword">in</span> indices:
<span class="hljs-meta">... </span>            frames.append(frame)
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> np.stack([x.to_ndarray(<span class="hljs-built_in">format</span>=<span class="hljs-string">&quot;rgb24&quot;</span>) <span class="hljs-keyword">for</span> x <span class="hljs-keyword">in</span> frames])


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">sample_frame_indices</span>(<span class="hljs-params">clip_len, frame_sample_rate, seg_len</span>):
<span class="hljs-meta">... </span>    <span class="hljs-string">&#x27;&#x27;&#x27;
<span class="hljs-meta">... </span>    Sample a given number of frame indices from the video.
<span class="hljs-meta">... </span>    Args:
<span class="hljs-meta">... </span>        clip_len (\`int\`): Total number of frames to sample.
<span class="hljs-meta">... </span>        frame_sample_rate (\`int\`): Sample every n-th frame.
<span class="hljs-meta">... </span>        seg_len (\`int\`): Maximum allowed index of sample&#x27;s last frame.
<span class="hljs-meta">... </span>    Returns:
<span class="hljs-meta">... </span>        indices (\`List[int]\`): List of sampled frame indices
<span class="hljs-meta">... </span>    &#x27;&#x27;&#x27;</span>
<span class="hljs-meta">... </span>    converted_len = <span class="hljs-built_in">int</span>(clip_len * frame_sample_rate)
<span class="hljs-meta">... </span>    end_idx = np.random.randint(converted_len, seg_len)
<span class="hljs-meta">... </span>    start_idx = end_idx - converted_len
<span class="hljs-meta">... </span>    indices = np.linspace(start_idx, end_idx, num=clip_len)
<span class="hljs-meta">... </span>    indices = np.clip(indices, start_idx, end_idx - <span class="hljs-number">1</span>).astype(np.int64)
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> indices


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># video clip consists of 300 frames (10 seconds at 30 FPS)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>file_path = hf_hub_download(
<span class="hljs-meta">... </span>    repo_id=<span class="hljs-string">&quot;nielsr/video-demo&quot;</span>, filename=<span class="hljs-string">&quot;eating_spaghetti.mp4&quot;</span>, repo_type=<span class="hljs-string">&quot;dataset&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>container = av.<span class="hljs-built_in">open</span>(file_path)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># sample 8 frames</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>indices = sample_frame_indices(clip_len=<span class="hljs-number">8</span>, frame_sample_rate=<span class="hljs-number">1</span>, seg_len=container.streams.video[<span class="hljs-number">0</span>].frames)
<span class="hljs-meta">&gt;&gt;&gt; </span>video = read_video_pyav(container, indices)

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/xclip-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModel.from_pretrained(<span class="hljs-string">&quot;microsoft/xclip-base-patch32&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(
<span class="hljs-meta">... </span>    text=[<span class="hljs-string">&quot;playing sports&quot;</span>, <span class="hljs-string">&quot;eating spaghetti&quot;</span>, <span class="hljs-string">&quot;go shopping&quot;</span>],
<span class="hljs-meta">... </span>    videos=<span class="hljs-built_in">list</span>(video),
<span class="hljs-meta">... </span>    return_tensors=<span class="hljs-string">&quot;pt&quot;</span>,
<span class="hljs-meta">... </span>    padding=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># forward pass</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>logits_per_video = outputs.logits_per_video  <span class="hljs-comment"># this is the video-text similarity score</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>probs = logits_per_video.softmax(dim=<span class="hljs-number">1</span>)  <span class="hljs-comment"># we can take the softmax to get the label probabilities</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(probs)
tensor([[<span class="hljs-number">1.9496e-04</span>, <span class="hljs-number">9.9960e-01</span>, <span class="hljs-number">2.0825e-04</span>]])`,wrap:!1}}),{c(){n=o("p"),n.textContent=b,d=i(),M(m.$$.fragment)},l(s){n=r(s,"P",{"data-svelte-h":!0}),f(n)!=="svelte-kvfsh7"&&(n.textContent=b),d=c(s),y(m.$$.fragment,s)},m(s,C){p(s,n,C),p(s,d,C),_(m,s,C),g=!0},p:P,i(s){g||(w(m.$$.fragment,s),g=!0)},o(s){T(m.$$.fragment,s),g=!1},d(s){s&&(t(n),t(d)),j(m,s)}}}function qa(J){let n,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=o("p"),n.innerHTML=b},l(d){n=r(d,"P",{"data-svelte-h":!0}),f(n)!=="svelte-fincs2"&&(n.innerHTML=b)},m(d,m){p(d,n,m)},p:P,d(d){d&&t(n)}}}function Da(J){let n,b="Examples:",d,m,g;return m=new Mt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBBdXRvTW9kZWwlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZ4Y2xpcC1iYXNlLXBhdGNoMzIlMjIpJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRnhjbGlwLWJhc2UtcGF0Y2gzMiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTVCJTIyYSUyMHBob3RvJTIwb2YlMjBhJTIwY2F0JTIyJTJDJTIwJTIyYSUyMHBob3RvJTIwb2YlMjBhJTIwZG9nJTIyJTVEJTJDJTIwcGFkZGluZyUzRFRydWUlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQXRleHRfZmVhdHVyZXMlMjAlM0QlMjBtb2RlbC5nZXRfdGV4dF9mZWF0dXJlcygqKmlucHV0cyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AutoModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/xclip-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModel.from_pretrained(<span class="hljs-string">&quot;microsoft/xclip-base-patch32&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([<span class="hljs-string">&quot;a photo of a cat&quot;</span>, <span class="hljs-string">&quot;a photo of a dog&quot;</span>], padding=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>text_features = model.get_text_features(**inputs)`,wrap:!1}}),{c(){n=o("p"),n.textContent=b,d=i(),M(m.$$.fragment)},l(s){n=r(s,"P",{"data-svelte-h":!0}),f(n)!=="svelte-kvfsh7"&&(n.textContent=b),d=c(s),y(m.$$.fragment,s)},m(s,C){p(s,n,C),p(s,d,C),_(m,s,C),g=!0},p:P,i(s){g||(w(m.$$.fragment,s),g=!0)},o(s){T(m.$$.fragment,s),g=!1},d(s){s&&(t(n),t(d)),j(m,s)}}}function Ka(J){let n,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=o("p"),n.innerHTML=b},l(d){n=r(d,"P",{"data-svelte-h":!0}),f(n)!=="svelte-fincs2"&&(n.innerHTML=b)},m(d,m){p(d,n,m)},p:P,d(d){d&&t(n)}}}function Oa(J){let n,b="Examples:",d,m,g;return m=new Mt({props:{code:" ",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> av
<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">import</span> numpy <span class="hljs-keyword">as</span> np

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, AutoModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> hf_hub_download

<span class="hljs-meta">&gt;&gt;&gt; </span>np.random.seed(<span class="hljs-number">0</span>)


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">read_video_pyav</span>(<span class="hljs-params">container, indices</span>):
<span class="hljs-meta">... </span>    <span class="hljs-string">&#x27;&#x27;&#x27;
<span class="hljs-meta">... </span>    Decode the video with PyAV decoder.
<span class="hljs-meta">... </span>    Args:
<span class="hljs-meta">... </span>        container (\`av.container.input.InputContainer\`): PyAV container.
<span class="hljs-meta">... </span>        indices (\`List[int]\`): List of frame indices to decode.
<span class="hljs-meta">... </span>    Returns:
<span class="hljs-meta">... </span>        result (np.ndarray): np array of decoded frames of shape (num_frames, height, width, 3).
<span class="hljs-meta">... </span>    &#x27;&#x27;&#x27;</span>
<span class="hljs-meta">... </span>    frames = []
<span class="hljs-meta">... </span>    container.seek(<span class="hljs-number">0</span>)
<span class="hljs-meta">... </span>    start_index = indices[<span class="hljs-number">0</span>]
<span class="hljs-meta">... </span>    end_index = indices[-<span class="hljs-number">1</span>]
<span class="hljs-meta">... </span>    <span class="hljs-keyword">for</span> i, frame <span class="hljs-keyword">in</span> <span class="hljs-built_in">enumerate</span>(container.decode(video=<span class="hljs-number">0</span>)):
<span class="hljs-meta">... </span>        <span class="hljs-keyword">if</span> i &gt; end_index:
<span class="hljs-meta">... </span>            <span class="hljs-keyword">break</span>
<span class="hljs-meta">... </span>        <span class="hljs-keyword">if</span> i &gt;= start_index <span class="hljs-keyword">and</span> i <span class="hljs-keyword">in</span> indices:
<span class="hljs-meta">... </span>            frames.append(frame)
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> np.stack([x.to_ndarray(<span class="hljs-built_in">format</span>=<span class="hljs-string">&quot;rgb24&quot;</span>) <span class="hljs-keyword">for</span> x <span class="hljs-keyword">in</span> frames])


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">sample_frame_indices</span>(<span class="hljs-params">clip_len, frame_sample_rate, seg_len</span>):
<span class="hljs-meta">... </span>    <span class="hljs-string">&#x27;&#x27;&#x27;
<span class="hljs-meta">... </span>    Sample a given number of frame indices from the video.
<span class="hljs-meta">... </span>    Args:
<span class="hljs-meta">... </span>        clip_len (\`int\`): Total number of frames to sample.
<span class="hljs-meta">... </span>        frame_sample_rate (\`int\`): Sample every n-th frame.
<span class="hljs-meta">... </span>        seg_len (\`int\`): Maximum allowed index of sample&#x27;s last frame.
<span class="hljs-meta">... </span>    Returns:
<span class="hljs-meta">... </span>        indices (\`List[int]\`): List of sampled frame indices
<span class="hljs-meta">... </span>    &#x27;&#x27;&#x27;</span>
<span class="hljs-meta">... </span>    converted_len = <span class="hljs-built_in">int</span>(clip_len * frame_sample_rate)
<span class="hljs-meta">... </span>    end_idx = np.random.randint(converted_len, seg_len)
<span class="hljs-meta">... </span>    start_idx = end_idx - converted_len
<span class="hljs-meta">... </span>    indices = np.linspace(start_idx, end_idx, num=clip_len)
<span class="hljs-meta">... </span>    indices = np.clip(indices, start_idx, end_idx - <span class="hljs-number">1</span>).astype(np.int64)
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> indices


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># video clip consists of 300 frames (10 seconds at 30 FPS)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>file_path = hf_hub_download(
<span class="hljs-meta">... </span>    repo_id=<span class="hljs-string">&quot;nielsr/video-demo&quot;</span>, filename=<span class="hljs-string">&quot;eating_spaghetti.mp4&quot;</span>, repo_type=<span class="hljs-string">&quot;dataset&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>container = av.<span class="hljs-built_in">open</span>(file_path)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># sample 8 frames</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>indices = sample_frame_indices(clip_len=<span class="hljs-number">8</span>, frame_sample_rate=<span class="hljs-number">1</span>, seg_len=container.streams.video[<span class="hljs-number">0</span>].frames)
<span class="hljs-meta">&gt;&gt;&gt; </span>video = read_video_pyav(container, indices)

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/xclip-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModel.from_pretrained(<span class="hljs-string">&quot;microsoft/xclip-base-patch32&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(videos=<span class="hljs-built_in">list</span>(video), return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>video_features = model.get_video_features(**inputs)`,wrap:!1}}),{c(){n=o("p"),n.textContent=b,d=i(),M(m.$$.fragment)},l(s){n=r(s,"P",{"data-svelte-h":!0}),f(n)!=="svelte-kvfsh7"&&(n.textContent=b),d=c(s),y(m.$$.fragment,s)},m(s,C){p(s,n,C),p(s,d,C),_(m,s,C),g=!0},p:P,i(s){g||(w(m.$$.fragment,s),g=!0)},o(s){T(m.$$.fragment,s),g=!1},d(s){s&&(t(n),t(d)),j(m,s)}}}function eo(J){let n,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=o("p"),n.innerHTML=b},l(d){n=r(d,"P",{"data-svelte-h":!0}),f(n)!=="svelte-fincs2"&&(n.innerHTML=b)},m(d,m){p(d,n,m)},p:P,d(d){d&&t(n)}}}function to(J){let n,b="Examples:",d,m,g;return m=new Mt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBYQ0xJUFRleHRNb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwWENMSVBUZXh0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMm1pY3Jvc29mdCUyRnhjbGlwLWJhc2UtcGF0Y2gzMiUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJtaWNyb3NvZnQlMkZ4Y2xpcC1iYXNlLXBhdGNoMzIlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCU1QiUyMmElMjBwaG90byUyMG9mJTIwYSUyMGNhdCUyMiUyQyUyMCUyMmElMjBwaG90byUyMG9mJTIwYSUyMGRvZyUyMiU1RCUyQyUyMHBhZGRpbmclM0RUcnVlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbGFzdF9oaWRkZW5fc3RhdGUlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRlJTBBcG9vbGVkX291dHB1dCUyMCUzRCUyMG91dHB1dHMucG9vbGVyX291dHB1dCUyMCUyMCUyMyUyMHBvb2xlZCUyMChFT1MlMjB0b2tlbiklMjBzdGF0ZXM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, XCLIPTextModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = XCLIPTextModel.from_pretrained(<span class="hljs-string">&quot;microsoft/xclip-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/xclip-base-patch32&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([<span class="hljs-string">&quot;a photo of a cat&quot;</span>, <span class="hljs-string">&quot;a photo of a dog&quot;</span>], padding=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_state = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span>pooled_output = outputs.pooler_output  <span class="hljs-comment"># pooled (EOS token) states</span>`,wrap:!1}}),{c(){n=o("p"),n.textContent=b,d=i(),M(m.$$.fragment)},l(s){n=r(s,"P",{"data-svelte-h":!0}),f(n)!=="svelte-kvfsh7"&&(n.textContent=b),d=c(s),y(m.$$.fragment,s)},m(s,C){p(s,n,C),p(s,d,C),_(m,s,C),g=!0},p:P,i(s){g||(w(m.$$.fragment,s),g=!0)},o(s){T(m.$$.fragment,s),g=!1},d(s){s&&(t(n),t(d)),j(m,s)}}}function so(J){let n,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=o("p"),n.innerHTML=b},l(d){n=r(d,"P",{"data-svelte-h":!0}),f(n)!=="svelte-fincs2"&&(n.innerHTML=b)},m(d,m){p(d,n,m)},p:P,d(d){d&&t(n)}}}function no(J){let n,b="Examples:",d,m,g;return m=new Mt({props:{code:" ",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> av
<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">import</span> numpy <span class="hljs-keyword">as</span> np

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, XCLIPVisionModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> hf_hub_download

<span class="hljs-meta">&gt;&gt;&gt; </span>np.random.seed(<span class="hljs-number">0</span>)


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">read_video_pyav</span>(<span class="hljs-params">container, indices</span>):
<span class="hljs-meta">... </span>    <span class="hljs-string">&#x27;&#x27;&#x27;
<span class="hljs-meta">... </span>    Decode the video with PyAV decoder.
<span class="hljs-meta">... </span>    Args:
<span class="hljs-meta">... </span>        container (\`av.container.input.InputContainer\`): PyAV container.
<span class="hljs-meta">... </span>        indices (\`List[int]\`): List of frame indices to decode.
<span class="hljs-meta">... </span>    Returns:
<span class="hljs-meta">... </span>        result (np.ndarray): np array of decoded frames of shape (num_frames, height, width, 3).
<span class="hljs-meta">... </span>    &#x27;&#x27;&#x27;</span>
<span class="hljs-meta">... </span>    frames = []
<span class="hljs-meta">... </span>    container.seek(<span class="hljs-number">0</span>)
<span class="hljs-meta">... </span>    start_index = indices[<span class="hljs-number">0</span>]
<span class="hljs-meta">... </span>    end_index = indices[-<span class="hljs-number">1</span>]
<span class="hljs-meta">... </span>    <span class="hljs-keyword">for</span> i, frame <span class="hljs-keyword">in</span> <span class="hljs-built_in">enumerate</span>(container.decode(video=<span class="hljs-number">0</span>)):
<span class="hljs-meta">... </span>        <span class="hljs-keyword">if</span> i &gt; end_index:
<span class="hljs-meta">... </span>            <span class="hljs-keyword">break</span>
<span class="hljs-meta">... </span>        <span class="hljs-keyword">if</span> i &gt;= start_index <span class="hljs-keyword">and</span> i <span class="hljs-keyword">in</span> indices:
<span class="hljs-meta">... </span>            frames.append(frame)
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> np.stack([x.to_ndarray(<span class="hljs-built_in">format</span>=<span class="hljs-string">&quot;rgb24&quot;</span>) <span class="hljs-keyword">for</span> x <span class="hljs-keyword">in</span> frames])


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">sample_frame_indices</span>(<span class="hljs-params">clip_len, frame_sample_rate, seg_len</span>):
<span class="hljs-meta">... </span>    <span class="hljs-string">&#x27;&#x27;&#x27;
<span class="hljs-meta">... </span>    Sample a given number of frame indices from the video.
<span class="hljs-meta">... </span>    Args:
<span class="hljs-meta">... </span>        clip_len (\`int\`): Total number of frames to sample.
<span class="hljs-meta">... </span>        frame_sample_rate (\`int\`): Sample every n-th frame.
<span class="hljs-meta">... </span>        seg_len (\`int\`): Maximum allowed index of sample&#x27;s last frame.
<span class="hljs-meta">... </span>    Returns:
<span class="hljs-meta">... </span>        indices (\`List[int]\`): List of sampled frame indices
<span class="hljs-meta">... </span>    &#x27;&#x27;&#x27;</span>
<span class="hljs-meta">... </span>    converted_len = <span class="hljs-built_in">int</span>(clip_len * frame_sample_rate)
<span class="hljs-meta">... </span>    end_idx = np.random.randint(converted_len, seg_len)
<span class="hljs-meta">... </span>    start_idx = end_idx - converted_len
<span class="hljs-meta">... </span>    indices = np.linspace(start_idx, end_idx, num=clip_len)
<span class="hljs-meta">... </span>    indices = np.clip(indices, start_idx, end_idx - <span class="hljs-number">1</span>).astype(np.int64)
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> indices


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># video clip consists of 300 frames (10 seconds at 30 FPS)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>file_path = hf_hub_download(
<span class="hljs-meta">... </span>    repo_id=<span class="hljs-string">&quot;nielsr/video-demo&quot;</span>, filename=<span class="hljs-string">&quot;eating_spaghetti.mp4&quot;</span>, repo_type=<span class="hljs-string">&quot;dataset&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>container = av.<span class="hljs-built_in">open</span>(file_path)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># sample 16 frames</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>indices = sample_frame_indices(clip_len=<span class="hljs-number">8</span>, frame_sample_rate=<span class="hljs-number">1</span>, seg_len=container.streams.video[<span class="hljs-number">0</span>].frames)
<span class="hljs-meta">&gt;&gt;&gt; </span>video = read_video_pyav(container, indices)

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;microsoft/xclip-base-patch32&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XCLIPVisionModel.from_pretrained(<span class="hljs-string">&quot;microsoft/xclip-base-patch32&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>pixel_values = processor(videos=<span class="hljs-built_in">list</span>(video), return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).pixel_values

<span class="hljs-meta">&gt;&gt;&gt; </span>batch_size, num_frames, num_channels, height, width = pixel_values.shape
<span class="hljs-meta">&gt;&gt;&gt; </span>pixel_values = pixel_values.reshape(-<span class="hljs-number">1</span>, num_channels, height, width)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(pixel_values)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_state = outputs.last_hidden_state`,wrap:!1}}),{c(){n=o("p"),n.textContent=b,d=i(),M(m.$$.fragment)},l(s){n=r(s,"P",{"data-svelte-h":!0}),f(n)!=="svelte-kvfsh7"&&(n.textContent=b),d=c(s),y(m.$$.fragment,s)},m(s,C){p(s,n,C),p(s,d,C),_(m,s,C),g=!0},p:P,i(s){g||(w(m.$$.fragment,s),g=!0)},o(s){T(m.$$.fragment,s),g=!1},d(s){s&&(t(n),t(d)),j(m,s)}}}function ao(J){let n,b,d,m,g,s,C,Ze,qs,yt,Yn="X-CLIP",ps,A,K,Et,Be,Ds,_t,En="Overview",ds,ke,Qn=`The X-CLIP model was proposed in <a href="https://arxiv.org/abs/2208.02816" rel="nofollow">Expanding Language-Image Pretrained Models for General Video Recognition</a> by Bolin Ni, Houwen Peng, Minghao Chen, Songyang Zhang, Gaofeng Meng, Jianlong Fu, Shiming Xiang, Haibin Ling.
X-CLIP is a minimal extension of <a href="clip">CLIP</a> for video. The model consists of a text encoder, a cross-frame vision encoder, a multi-frame integration Transformer, and a video-specific prompt generator.`,ms,We,Fn="The abstract from the paper is the following:",hs,$e,Sn="<em>Contrastive language-image pretraining has shown great success in learning visual-textual joint representation from web-scale data, demonstrating remarkable “zero-shot” generalization ability for various image tasks. However, how to effectively expand such new language-image pretraining methods to video domains is still an open problem. In this work, we present a simple yet effective approach that adapts the pretrained language-image models to video recognition directly, instead of pretraining a new model from scratch. More concretely, to capture the long-range dependencies of frames along the temporal dimension, we propose a cross-frame attention mechanism that explicitly exchanges information across frames. Such module is lightweight and can be plugged into pretrained language-image models seamlessly. Moreover, we propose a video-specific prompting scheme, which leverages video content information for generating discriminative textual prompts. Extensive experiments demonstrate that our approach is effective and can be generalized to different video recognition scenarios. In particular, under fully-supervised settings, our approach achieves a top-1 accuracy of 87.1% on Kinectics-400, while using 12 times fewer FLOPs compared with Swin-L and ViViT-H. In zero-shot experiments, our approach surpasses the current state-of-the-art methods by +7.6% and +14.9% in terms of top-1 accuracy under two popular protocols. In few-shot scenarios, our approach outperforms previous best methods by +32.1% and +23.1% when the labeled data is extremely limited.</em>",fs,Ge,Hn="Tips:",us,Pe,qn='<li>Usage of X-CLIP is identical to <a href="clip">CLIP</a>.</li>',gs,O,Dn,Ms,Le,Kn='X-CLIP architecture. Taken from the <a href="https://arxiv.org/abs/2208.02816">original paper.</a>',ys,Ve,On=`This model was contributed by <a href="https://huggingface.co/nielsr" rel="nofollow">nielsr</a>.
The original code can be found <a href="https://github.com/microsoft/VideoX/tree/master/X-CLIP" rel="nofollow">here</a>.`,_s,N,ee,Qt,ze,Ks,wt,ea="Resources",ws,Ae,ta="A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with X-CLIP.",Ts,Ne,sa='<li>Demo notebooks for X-CLIP can be found <a href="https://github.com/NielsRogge/Transformers-Tutorials/tree/master/X-CLIP" rel="nofollow">here</a>.</li>',js,Re,na="If you’re interested in submitting a resource to be included here, please feel free to open a Pull Request and we’ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.",bs,R,te,Ft,Ye,Os,Tt,aa="XCLIPProcessor",Cs,v,Ee,en,jt,oa="Constructs an X-CLIP processor which wraps a VideoMAE image processor and a CLIP tokenizer into a single processor.",tn,bt,ra=`<a href="/docs/transformers/v4.34.0/en/model_doc/xclip#transformers.XCLIPProcessor">XCLIPProcessor</a> offers all the functionalities of <a href="/docs/transformers/v4.34.0/en/model_doc/videomae#transformers.VideoMAEImageProcessor">VideoMAEImageProcessor</a> and <a href="/docs/transformers/v4.34.0/en/model_doc/clip#transformers.CLIPTokenizerFast">CLIPTokenizerFast</a>. See the
<code>__call__()</code> and <a href="/docs/transformers/v4.34.0/en/model_doc/xclip#transformers.XCLIPProcessor.decode">decode()</a> for more information.`,sn,se,Qe,nn,Ct,la=`This method forwards all its arguments to CLIPTokenizerFast’s <a href="/docs/transformers/v4.34.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.batch_decode">batch_decode()</a>. Please
refer to the docstring of this method for more information.`,an,ne,Fe,on,Jt,ia=`This method forwards all its arguments to CLIPTokenizerFast’s <a href="/docs/transformers/v4.34.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.decode">decode()</a>. Please refer to
the docstring of this method for more information.`,Js,Y,ae,St,Se,rn,vt,ca="XCLIPConfig",vs,x,He,ln,It,pa=`<a href="/docs/transformers/v4.34.0/en/model_doc/xclip#transformers.XCLIPConfig">XCLIPConfig</a> is the configuration class to store the configuration of a <a href="/docs/transformers/v4.34.0/en/model_doc/xclip#transformers.XCLIPModel">XCLIPModel</a>. It is used to
instantiate X-CLIP model according to the specified arguments, defining the text model and vision model configs.
Instantiating a configuration with the defaults will yield a similar configuration to that of the X-CLIP
<a href="https://huggingface.co/microsoft/xclip-base-patch32" rel="nofollow">microsoft/xclip-base-patch32</a> architecture.`,cn,Ut,da=`Configuration objects inherit from <a href="/docs/transformers/v4.34.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/v4.34.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,pn,oe,qe,dn,xt,ma=`Instantiate a <a href="/docs/transformers/v4.34.0/en/model_doc/xclip#transformers.XCLIPConfig">XCLIPConfig</a> (or a derived class) from xclip text model configuration and xclip vision model
configuration.`,Is,E,re,Ht,De,mn,Xt,ha="XCLIPTextConfig",Us,X,Ke,hn,Zt,fa=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.34.0/en/model_doc/xclip#transformers.XCLIPModel">XCLIPModel</a>. It is used to instantiate an X-CLIP
model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield a similar configuration to that of the X-CLIP
<a href="https://huggingface.co/microsoft/xclip-base-patch32" rel="nofollow">microsoft/xclip-base-patch32</a> architecture.`,fn,Bt,ua=`Configuration objects inherit from <a href="/docs/transformers/v4.34.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/v4.34.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,un,le,xs,Q,ie,qt,Oe,gn,kt,ga="XCLIPVisionConfig",Xs,Z,et,Mn,Wt,Ma=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.34.0/en/model_doc/xclip#transformers.XCLIPModel">XCLIPModel</a>. It is used to instantiate an X-CLIP
model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield a similar configuration to that of the X-CLIP
<a href="https://huggingface.co/microsoft/xclip-base-patch32" rel="nofollow">microsoft/xclip-base-patch32</a> architecture.`,yn,$t,ya=`Configuration objects inherit from <a href="/docs/transformers/v4.34.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/v4.34.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,_n,ce,Zs,F,pe,Dt,tt,wn,Gt,_a="XCLIPModel",Bs,I,st,Tn,Pt,wa=`This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,jn,B,nt,bn,Lt,Ta='The <a href="/docs/transformers/v4.34.0/en/model_doc/xclip#transformers.XCLIPModel">XCLIPModel</a> forward method, overrides the <code>__call__</code> special method.',Cn,de,Jn,me,vn,k,at,In,Vt,ja='The <a href="/docs/transformers/v4.34.0/en/model_doc/xclip#transformers.XCLIPModel">XCLIPModel</a> forward method, overrides the <code>__call__</code> special method.',Un,he,xn,fe,Xn,W,ot,Zn,zt,ba='The <a href="/docs/transformers/v4.34.0/en/model_doc/xclip#transformers.XCLIPModel">XCLIPModel</a> forward method, overrides the <code>__call__</code> special method.',Bn,ue,kn,ge,ks,S,Me,Kt,rt,Wn,At,Ca="XCLIPTextModel",Ws,H,lt,$n,$,it,Gn,Nt,Ja='The <a href="/docs/transformers/v4.34.0/en/model_doc/xclip#transformers.XCLIPTextModel">XCLIPTextModel</a> forward method, overrides the <code>__call__</code> special method.',Pn,ye,Ln,_e,$s,q,we,Ot,ct,Vn,Rt,va="XCLIPVisionModel",Gs,D,pt,zn,G,dt,An,Yt,Ia='The <a href="/docs/transformers/v4.34.0/en/model_doc/xclip#transformers.XCLIPVisionModel">XCLIPVisionModel</a> forward method, overrides the <code>__call__</code> special method.',Nn,Te,Rn,je,Ps,es,Ls;return Ze=new z({}),Be=new z({}),ze=new z({}),Ye=new z({}),Ee=new U({props:{name:"class transformers.XCLIPProcessor",anchor:"transformers.XCLIPProcessor",parameters:[{name:"image_processor",val:" = None"},{name:"tokenizer",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.XCLIPProcessor.image_processor",description:`<strong>image_processor</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/videomae#transformers.VideoMAEImageProcessor">VideoMAEImageProcessor</a>) &#x2014;
The image processor is a required input.`,name:"image_processor"},{anchor:"transformers.XCLIPProcessor.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/clip#transformers.CLIPTokenizerFast">CLIPTokenizerFast</a>) &#x2014;
The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/x_clip/processing_x_clip.py#L25"}}),Qe=new U({props:{name:"batch_decode",anchor:"transformers.XCLIPProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/x_clip/processing_x_clip.py#L115"}}),Fe=new U({props:{name:"decode",anchor:"transformers.XCLIPProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/x_clip/processing_x_clip.py#L122"}}),Se=new z({}),He=new U({props:{name:"class transformers.XCLIPConfig",anchor:"transformers.XCLIPConfig",parameters:[{name:"text_config",val:" = None"},{name:"vision_config",val:" = None"},{name:"projection_dim",val:" = 512"},{name:"prompt_layers",val:" = 2"},{name:"prompt_alpha",val:" = 0.1"},{name:"prompt_hidden_act",val:" = 'quick_gelu'"},{name:"prompt_num_attention_heads",val:" = 8"},{name:"prompt_attention_dropout",val:" = 0.0"},{name:"prompt_projection_dropout",val:" = 0.0"},{name:"logit_scale_init_value",val:" = 2.6592"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.XCLIPConfig.text_config",description:`<strong>text_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary of configuration options used to initialize <a href="/docs/transformers/v4.34.0/en/model_doc/xclip#transformers.XCLIPTextConfig">XCLIPTextConfig</a>.`,name:"text_config"},{anchor:"transformers.XCLIPConfig.vision_config",description:`<strong>vision_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary of configuration options used to initialize <a href="/docs/transformers/v4.34.0/en/model_doc/xclip#transformers.XCLIPVisionConfig">XCLIPVisionConfig</a>.`,name:"vision_config"},{anchor:"transformers.XCLIPConfig.projection_dim",description:`<strong>projection_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimentionality of text and vision projection layers.`,name:"projection_dim"},{anchor:"transformers.XCLIPConfig.prompt_layers",description:`<strong>prompt_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Number of layers in the video specific prompt generator.`,name:"prompt_layers"},{anchor:"transformers.XCLIPConfig.prompt_alpha",description:`<strong>prompt_alpha</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
Alpha value to use in the video specific prompt generator.`,name:"prompt_alpha"},{anchor:"transformers.XCLIPConfig.prompt_hidden_act",description:`<strong>prompt_hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;quick_gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the video specific prompt generator. If string,
<code>&quot;gelu&quot;</code>, <code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> \`<code>&quot;quick_gelu&quot;</code> are supported.`,name:"prompt_hidden_act"},{anchor:"transformers.XCLIPConfig.prompt_num_attention_heads",description:`<strong>prompt_num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
Number of attention heads in the cross-attention of the video specific prompt generator.`,name:"prompt_num_attention_heads"},{anchor:"transformers.XCLIPConfig.prompt_attention_dropout",description:`<strong>prompt_attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for the attention layers in the video specific prompt generator.`,name:"prompt_attention_dropout"},{anchor:"transformers.XCLIPConfig.prompt_projection_dropout",description:`<strong>prompt_projection_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for the projection layers in the video specific prompt generator.`,name:"prompt_projection_dropout"},{anchor:"transformers.XCLIPConfig.logit_scale_init_value",description:`<strong>logit_scale_init_value</strong> (<code>float</code>, <em>optional</em>, defaults to 2.6592) &#x2014;
The inital value of the <em>logit_scale</em> parameter. Default is used as per the original XCLIP implementation.`,name:"logit_scale_init_value"},{anchor:"transformers.XCLIPConfig.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Dictionary of keyword arguments.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/x_clip/configuration_x_clip.py#L264"}}),qe=new U({props:{name:"from_text_vision_configs",anchor:"transformers.XCLIPConfig.from_text_vision_configs",parameters:[{name:"text_config",val:": XCLIPTextConfig"},{name:"vision_config",val:": XCLIPVisionConfig"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/x_clip/configuration_x_clip.py#L407",returnDescription:`
<p>An instance of a configuration object</p>
`,returnType:`
<p><a
  href="/docs/transformers/v4.34.0/en/model_doc/xclip#transformers.XCLIPConfig"
>XCLIPConfig</a></p>
`}}),De=new z({}),Ke=new U({props:{name:"class transformers.XCLIPTextConfig",anchor:"transformers.XCLIPTextConfig",parameters:[{name:"vocab_size",val:" = 49408"},{name:"hidden_size",val:" = 512"},{name:"intermediate_size",val:" = 2048"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 8"},{name:"max_position_embeddings",val:" = 77"},{name:"hidden_act",val:" = 'quick_gelu'"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"attention_dropout",val:" = 0.0"},{name:"initializer_range",val:" = 0.02"},{name:"initializer_factor",val:" = 1.0"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.XCLIPTextConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 49408) &#x2014;
Vocabulary size of the X-CLIP text model. Defines the number of different tokens that can be represented by
the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.34.0/en/model_doc/xclip#transformers.XCLIPModel">XCLIPModel</a>.`,name:"vocab_size"},{anchor:"transformers.XCLIPTextConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.XCLIPTextConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.XCLIPTextConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.XCLIPTextConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.XCLIPTextConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 77) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.XCLIPTextConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;quick_gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> \`<code>&quot;quick_gelu&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.XCLIPTextConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-5) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.XCLIPTextConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.XCLIPTextConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.XCLIPTextConfig.initializer_factor",description:`<strong>initializer_factor</strong> (\`float&#x201C;, <em>optional</em>, defaults to 1) &#x2014;
A factor for initializing all weight matrices (should be kept to 1, used internally for initialization
testing).`,name:"initializer_factor"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/x_clip/configuration_x_clip.py#L31"}}),le=new gt({props:{anchor:"transformers.XCLIPTextConfig.example",$$slots:{default:[Qa]},$$scope:{ctx:J}}}),Oe=new z({}),et=new U({props:{name:"class transformers.XCLIPVisionConfig",anchor:"transformers.XCLIPVisionConfig",parameters:[{name:"hidden_size",val:" = 768"},{name:"intermediate_size",val:" = 3072"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"mit_hidden_size",val:" = 512"},{name:"mit_intermediate_size",val:" = 2048"},{name:"mit_num_hidden_layers",val:" = 1"},{name:"mit_num_attention_heads",val:" = 8"},{name:"num_channels",val:" = 3"},{name:"image_size",val:" = 224"},{name:"patch_size",val:" = 32"},{name:"num_frames",val:" = 8"},{name:"hidden_act",val:" = 'quick_gelu'"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"attention_dropout",val:" = 0.0"},{name:"initializer_range",val:" = 0.02"},{name:"initializer_factor",val:" = 1.0"},{name:"drop_path_rate",val:" = 0.0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.XCLIPVisionConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.XCLIPVisionConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.XCLIPVisionConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.XCLIPVisionConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.XCLIPVisionConfig.mit_hidden_size",description:`<strong>mit_hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimensionality of the encoder layers of the Multiframe Integration Transformer (MIT).`,name:"mit_hidden_size"},{anchor:"transformers.XCLIPVisionConfig.mit_intermediate_size",description:`<strong>mit_intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Multiframe Integration Transformer
(MIT).`,name:"mit_intermediate_size"},{anchor:"transformers.XCLIPVisionConfig.mit_num_hidden_layers",description:`<strong>mit_num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of hidden layers in the Multiframe Integration Transformer (MIT).`,name:"mit_num_hidden_layers"},{anchor:"transformers.XCLIPVisionConfig.mit_num_attention_heads",description:`<strong>mit_num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
Number of attention heads for each attention layer in the Multiframe Integration Transformer (MIT).`,name:"mit_num_attention_heads"},{anchor:"transformers.XCLIPVisionConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 224) &#x2014;
The size (resolution) of each image.`,name:"image_size"},{anchor:"transformers.XCLIPVisionConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
The size (resolution) of each patch.`,name:"patch_size"},{anchor:"transformers.XCLIPVisionConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;quick_gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code>, <code>&quot;gelu_new&quot;</code> and \`<code>&quot;quick_gelu&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.XCLIPVisionConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-5) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.XCLIPVisionConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.XCLIPVisionConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.XCLIPVisionConfig.initializer_factor",description:`<strong>initializer_factor</strong> (\`float&#x201C;, <em>optional</em>, defaults to 1) &#x2014;
A factor for initializing all weight matrices (should be kept to 1, used internally for initialization
testing).`,name:"initializer_factor"},{anchor:"transformers.XCLIPVisionConfig.drop_path_rate",description:`<strong>drop_path_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Stochastic depth rate.`,name:"drop_path_rate"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/x_clip/configuration_x_clip.py#L137"}}),ce=new gt({props:{anchor:"transformers.XCLIPVisionConfig.example",$$slots:{default:[Fa]},$$scope:{ctx:J}}}),tt=new z({}),st=new U({props:{name:"class transformers.XCLIPModel",anchor:"transformers.XCLIPModel",parameters:[{name:"config",val:": XCLIPConfig"}],parametersDescription:[{anchor:"transformers.XCLIPModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.34.0/en/model_doc/xclip#transformers.XCLIPConfig">XCLIPConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.34.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/x_clip/modeling_x_clip.py#L1292"}}),nt=new U({props:{name:"forward",anchor:"transformers.XCLIPModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"return_loss",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.XCLIPModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.34.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.34.0/en/model_doc/vits#transformers.VitsTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.XCLIPModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.XCLIPModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.XCLIPModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/v4.34.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTFeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.XCLIPModel.forward.return_loss",description:`<strong>return_loss</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the contrastive loss.`,name:"return_loss"},{anchor:"transformers.XCLIPModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.XCLIPModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.XCLIPModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/x_clip/modeling_x_clip.py#L1501",returnDescription:`
<p>A <code>transformers.models.x_clip.modeling_x_clip.XCLIPOutput</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.x_clip.configuration_x_clip.XCLIPConfig'&gt;</code>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>return_loss</code> is <code>True</code>) — Contrastive loss for video-text similarity.</li>
<li><strong>logits_per_video</strong> (<code>torch.FloatTensor</code> of shape <code>(video_batch_size, text_batch_size)</code>) — The scaled dot product scores between <code>video_embeds</code> and <code>text_embeds</code>. This represents the video-text
similarity scores.</li>
<li><strong>logits_per_text</strong> (<code>torch.FloatTensor</code> of shape <code>(text_batch_size, video_batch_size)</code>) — The scaled dot product scores between <code>text_embeds</code> and <code>video_embeds</code>. This represents the text-video
similarity scores.</li>
<li><strong>text_embeds(<code>torch.FloatTensor</code></strong> of shape <code>(batch_size, output_dim</code>) — The text embeddings obtained by applying the projection layer to the pooled output of <a
  href="/docs/transformers/v4.34.0/en/model_doc/xclip#transformers.XCLIPTextModel"
>XCLIPTextModel</a>.</li>
<li><strong>video_embeds(<code>torch.FloatTensor</code></strong> of shape <code>(batch_size, output_dim</code>) — The video embeddings obtained by applying the projection layer to the pooled output of
<a
  href="/docs/transformers/v4.34.0/en/model_doc/xclip#transformers.XCLIPVisionModel"
>XCLIPVisionModel</a>.</li>
<li><strong>text_model_output</strong> (<code>BaseModelOutputWithPooling</code>) — The output of the <a
  href="/docs/transformers/v4.34.0/en/model_doc/xclip#transformers.XCLIPTextModel"
>XCLIPTextModel</a>.</li>
<li><strong>vision_model_output</strong> (<code>BaseModelOutputWithPooling</code>) — The output of the <a
  href="/docs/transformers/v4.34.0/en/model_doc/xclip#transformers.XCLIPVisionModel"
>XCLIPVisionModel</a>.</li>
<li><strong>mit_output</strong> (<code>BaseModelOutputWithPooling</code>) — The output of <code>XCLIPMultiframeIntegrationTransformer</code> (MIT for short).</li>
</ul>
`,returnType:`
<p><code>transformers.models.x_clip.modeling_x_clip.XCLIPOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),de=new cs({props:{$$slots:{default:[Sa]},$$scope:{ctx:J}}}),me=new gt({props:{anchor:"transformers.XCLIPModel.forward.example",$$slots:{default:[Ha]},$$scope:{ctx:J}}}),at=new U({props:{name:"get_text_features",anchor:"transformers.XCLIPModel.get_text_features",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.XCLIPModel.get_text_features.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.34.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.34.0/en/model_doc/vits#transformers.VitsTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.XCLIPModel.get_text_features.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.XCLIPModel.get_text_features.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.XCLIPModel.get_text_features.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.XCLIPModel.get_text_features.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.XCLIPModel.get_text_features.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/x_clip/modeling_x_clip.py#L1339",returnDescription:`
<p>The text embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/v4.34.0/en/model_doc/xclip#transformers.XCLIPTextModel"
>XCLIPTextModel</a>.</p>
`,returnType:`
<p>text_features (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),he=new cs({props:{$$slots:{default:[qa]},$$scope:{ctx:J}}}),fe=new gt({props:{anchor:"transformers.XCLIPModel.get_text_features.example",$$slots:{default:[Da]},$$scope:{ctx:J}}}),ot=new U({props:{name:"get_video_features",anchor:"transformers.XCLIPModel.get_video_features",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.XCLIPModel.get_video_features.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/v4.34.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTFeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.XCLIPModel.get_video_features.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.XCLIPModel.get_video_features.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.XCLIPModel.get_video_features.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/x_clip/modeling_x_clip.py#L1386",returnDescription:`
<p>The video embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/v4.34.0/en/model_doc/xclip#transformers.XCLIPVisionModel"
>XCLIPVisionModel</a> and
<code>XCLIPMultiframeIntegrationTransformer</code>.</p>
`,returnType:`
<p>video_features (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),ue=new cs({props:{$$slots:{default:[Ka]},$$scope:{ctx:J}}}),ge=new gt({props:{anchor:"transformers.XCLIPModel.get_video_features.example",$$slots:{default:[Oa]},$$scope:{ctx:J}}}),rt=new z({}),lt=new U({props:{name:"class transformers.XCLIPTextModel",anchor:"transformers.XCLIPTextModel",parameters:[{name:"config",val:": XCLIPTextConfig"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/x_clip/modeling_x_clip.py#L833"}}),it=new U({props:{name:"forward",anchor:"transformers.XCLIPTextModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.XCLIPTextModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.34.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.34.0/en/model_doc/vits#transformers.VitsTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.XCLIPTextModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.XCLIPTextModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.XCLIPTextModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.XCLIPTextModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.XCLIPTextModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/x_clip/modeling_x_clip.py#L848",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.x_clip.configuration_x_clip.XCLIPTextConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) — Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ye=new cs({props:{$$slots:{default:[eo]},$$scope:{ctx:J}}}),_e=new gt({props:{anchor:"transformers.XCLIPTextModel.forward.example",$$slots:{default:[to]},$$scope:{ctx:J}}}),ct=new z({}),pt=new U({props:{name:"class transformers.XCLIPVisionModel",anchor:"transformers.XCLIPVisionModel",parameters:[{name:"config",val:": XCLIPVisionConfig"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/x_clip/modeling_x_clip.py#L1048"}}),dt=new U({props:{name:"forward",anchor:"transformers.XCLIPVisionModel.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.XCLIPVisionModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/v4.34.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.34.0/en/model_doc/deit#transformers.DeiTFeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.XCLIPVisionModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.XCLIPVisionModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.XCLIPVisionModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/x_clip/modeling_x_clip.py#L1061",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.x_clip.configuration_x_clip.XCLIPVisionConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) — Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Te=new cs({props:{$$slots:{default:[so]},$$scope:{ctx:J}}}),je=new gt({props:{anchor:"transformers.XCLIPVisionModel.forward.example",$$slots:{default:[no]},$$scope:{ctx:J}}}),{c(){n=o("meta"),b=i(),d=o("p"),m=i(),g=o("h1"),s=o("a"),C=o("span"),M(Ze.$$.fragment),qs=i(),yt=o("span"),yt.textContent=Yn,ps=i(),A=o("h2"),K=o("a"),Et=o("span"),M(Be.$$.fragment),Ds=i(),_t=o("span"),_t.textContent=En,ds=i(),ke=o("p"),ke.innerHTML=Qn,ms=i(),We=o("p"),We.textContent=Fn,hs=i(),$e=o("p"),$e.innerHTML=Sn,fs=i(),Ge=o("p"),Ge.textContent=Hn,us=i(),Pe=o("ul"),Pe.innerHTML=qn,gs=i(),O=o("img"),Ms=i(),Le=o("small"),Le.innerHTML=Kn,ys=i(),Ve=o("p"),Ve.innerHTML=On,_s=i(),N=o("h2"),ee=o("a"),Qt=o("span"),M(ze.$$.fragment),Ks=i(),wt=o("span"),wt.textContent=ea,ws=i(),Ae=o("p"),Ae.textContent=ta,Ts=i(),Ne=o("ul"),Ne.innerHTML=sa,js=i(),Re=o("p"),Re.textContent=na,bs=i(),R=o("h2"),te=o("a"),Ft=o("span"),M(Ye.$$.fragment),Os=i(),Tt=o("span"),Tt.textContent=aa,Cs=i(),v=o("div"),M(Ee.$$.fragment),en=i(),jt=o("p"),jt.textContent=oa,tn=i(),bt=o("p"),bt.innerHTML=ra,sn=i(),se=o("div"),M(Qe.$$.fragment),nn=i(),Ct=o("p"),Ct.innerHTML=la,an=i(),ne=o("div"),M(Fe.$$.fragment),on=i(),Jt=o("p"),Jt.innerHTML=ia,Js=i(),Y=o("h2"),ae=o("a"),St=o("span"),M(Se.$$.fragment),rn=i(),vt=o("span"),vt.textContent=ca,vs=i(),x=o("div"),M(He.$$.fragment),ln=i(),It=o("p"),It.innerHTML=pa,cn=i(),Ut=o("p"),Ut.innerHTML=da,pn=i(),oe=o("div"),M(qe.$$.fragment),dn=i(),xt=o("p"),xt.innerHTML=ma,Is=i(),E=o("h2"),re=o("a"),Ht=o("span"),M(De.$$.fragment),mn=i(),Xt=o("span"),Xt.textContent=ha,Us=i(),X=o("div"),M(Ke.$$.fragment),hn=i(),Zt=o("p"),Zt.innerHTML=fa,fn=i(),Bt=o("p"),Bt.innerHTML=ua,un=i(),M(le.$$.fragment),xs=i(),Q=o("h2"),ie=o("a"),qt=o("span"),M(Oe.$$.fragment),gn=i(),kt=o("span"),kt.textContent=ga,Xs=i(),Z=o("div"),M(et.$$.fragment),Mn=i(),Wt=o("p"),Wt.innerHTML=Ma,yn=i(),$t=o("p"),$t.innerHTML=ya,_n=i(),M(ce.$$.fragment),Zs=i(),F=o("h2"),pe=o("a"),Dt=o("span"),M(tt.$$.fragment),wn=i(),Gt=o("span"),Gt.textContent=_a,Bs=i(),I=o("div"),M(st.$$.fragment),Tn=i(),Pt=o("p"),Pt.innerHTML=wa,jn=i(),B=o("div"),M(nt.$$.fragment),bn=i(),Lt=o("p"),Lt.innerHTML=Ta,Cn=i(),M(de.$$.fragment),Jn=i(),M(me.$$.fragment),vn=i(),k=o("div"),M(at.$$.fragment),In=i(),Vt=o("p"),Vt.innerHTML=ja,Un=i(),M(he.$$.fragment),xn=i(),M(fe.$$.fragment),Xn=i(),W=o("div"),M(ot.$$.fragment),Zn=i(),zt=o("p"),zt.innerHTML=ba,Bn=i(),M(ue.$$.fragment),kn=i(),M(ge.$$.fragment),ks=i(),S=o("h2"),Me=o("a"),Kt=o("span"),M(rt.$$.fragment),Wn=i(),At=o("span"),At.textContent=Ca,Ws=i(),H=o("div"),M(lt.$$.fragment),$n=i(),$=o("div"),M(it.$$.fragment),Gn=i(),Nt=o("p"),Nt.innerHTML=Ja,Pn=i(),M(ye.$$.fragment),Ln=i(),M(_e.$$.fragment),$s=i(),q=o("h2"),we=o("a"),Ot=o("span"),M(ct.$$.fragment),Vn=i(),Rt=o("span"),Rt.textContent=va,Gs=i(),D=o("div"),M(pt.$$.fragment),zn=i(),G=o("div"),M(dt.$$.fragment),An=i(),Yt=o("p"),Yt.innerHTML=Ia,Nn=i(),M(Te.$$.fragment),Rn=i(),M(je.$$.fragment),Ps=i(),es=o("p"),this.h()},l(e){const l=Ea("svelte-1phssyn",document.head);n=r(l,"META",{name:!0,content:!0}),l.forEach(t),b=c(e),d=r(e,"P",{}),u(d).forEach(t),m=c(e),g=r(e,"H1",{class:!0});var mt=u(g);s=r(mt,"A",{id:!0,class:!0,href:!0});var ts=u(s);C=r(ts,"SPAN",{});var ss=u(C);y(Ze.$$.fragment,ss),ss.forEach(t),ts.forEach(t),qs=c(mt),yt=r(mt,"SPAN",{"data-svelte-h":!0}),f(yt)!=="svelte-iutr3e"&&(yt.textContent=Yn),mt.forEach(t),ps=c(e),A=r(e,"H2",{class:!0});var ht=u(A);K=r(ht,"A",{id:!0,class:!0,href:!0});var ns=u(K);Et=r(ns,"SPAN",{});var as=u(Et);y(Be.$$.fragment,as),as.forEach(t),ns.forEach(t),Ds=c(ht),_t=r(ht,"SPAN",{"data-svelte-h":!0}),f(_t)!=="svelte-1jsw1pg"&&(_t.textContent=En),ht.forEach(t),ds=c(e),ke=r(e,"P",{"data-svelte-h":!0}),f(ke)!=="svelte-6enh90"&&(ke.innerHTML=Qn),ms=c(e),We=r(e,"P",{"data-svelte-h":!0}),f(We)!=="svelte-vfdo9a"&&(We.textContent=Fn),hs=c(e),$e=r(e,"P",{"data-svelte-h":!0}),f($e)!=="svelte-1lxzml7"&&($e.innerHTML=Sn),fs=c(e),Ge=r(e,"P",{"data-svelte-h":!0}),f(Ge)!=="svelte-axv494"&&(Ge.textContent=Hn),us=c(e),Pe=r(e,"UL",{"data-svelte-h":!0}),f(Pe)!=="svelte-165fpm9"&&(Pe.innerHTML=qn),gs=c(e),O=r(e,"IMG",{src:!0,alt:!0,width:!0}),Ms=c(e),Le=r(e,"SMALL",{"data-svelte-h":!0}),f(Le)!=="svelte-1x5olh0"&&(Le.innerHTML=Kn),ys=c(e),Ve=r(e,"P",{"data-svelte-h":!0}),f(Ve)!=="svelte-4a2p64"&&(Ve.innerHTML=On),_s=c(e),N=r(e,"H2",{class:!0});var ft=u(N);ee=r(ft,"A",{id:!0,class:!0,href:!0});var os=u(ee);Qt=r(os,"SPAN",{});var rs=u(Qt);y(ze.$$.fragment,rs),rs.forEach(t),os.forEach(t),Ks=c(ft),wt=r(ft,"SPAN",{"data-svelte-h":!0}),f(wt)!=="svelte-w4zzv6"&&(wt.textContent=ea),ft.forEach(t),ws=c(e),Ae=r(e,"P",{"data-svelte-h":!0}),f(Ae)!=="svelte-6o9lse"&&(Ae.textContent=ta),Ts=c(e),Ne=r(e,"UL",{"data-svelte-h":!0}),f(Ne)!=="svelte-17fq4se"&&(Ne.innerHTML=sa),js=c(e),Re=r(e,"P",{"data-svelte-h":!0}),f(Re)!=="svelte-1xesile"&&(Re.textContent=na),bs=c(e),R=r(e,"H2",{class:!0});var ut=u(R);te=r(ut,"A",{id:!0,class:!0,href:!0});var ls=u(te);Ft=r(ls,"SPAN",{});var is=u(Ft);y(Ye.$$.fragment,is),is.forEach(t),ls.forEach(t),Os=c(ut),Tt=r(ut,"SPAN",{"data-svelte-h":!0}),f(Tt)!=="svelte-1dkja4b"&&(Tt.textContent=aa),ut.forEach(t),Cs=c(e),v=r(e,"DIV",{class:!0});var L=u(v);y(Ee.$$.fragment,L),en=c(L),jt=r(L,"P",{"data-svelte-h":!0}),f(jt)!=="svelte-75agku"&&(jt.textContent=oa),tn=c(L),bt=r(L,"P",{"data-svelte-h":!0}),f(bt)!=="svelte-a7ih4q"&&(bt.innerHTML=ra),sn=c(L),se=r(L,"DIV",{class:!0});var Vs=u(se);y(Qe.$$.fragment,Vs),nn=c(Vs),Ct=r(Vs,"P",{"data-svelte-h":!0}),f(Ct)!=="svelte-13zh1xk"&&(Ct.innerHTML=la),Vs.forEach(t),an=c(L),ne=r(L,"DIV",{class:!0});var zs=u(ne);y(Fe.$$.fragment,zs),on=c(zs),Jt=r(zs,"P",{"data-svelte-h":!0}),f(Jt)!=="svelte-1qa4qlq"&&(Jt.innerHTML=ia),zs.forEach(t),L.forEach(t),Js=c(e),Y=r(e,"H2",{class:!0});var As=u(Y);ae=r(As,"A",{id:!0,class:!0,href:!0});var Ua=u(ae);St=r(Ua,"SPAN",{});var xa=u(St);y(Se.$$.fragment,xa),xa.forEach(t),Ua.forEach(t),rn=c(As),vt=r(As,"SPAN",{"data-svelte-h":!0}),f(vt)!=="svelte-156qv1z"&&(vt.textContent=ca),As.forEach(t),vs=c(e),x=r(e,"DIV",{class:!0});var be=u(x);y(He.$$.fragment,be),ln=c(be),It=r(be,"P",{"data-svelte-h":!0}),f(It)!=="svelte-17t6hyg"&&(It.innerHTML=pa),cn=c(be),Ut=r(be,"P",{"data-svelte-h":!0}),f(Ut)!=="svelte-10kqkkl"&&(Ut.innerHTML=da),pn=c(be),oe=r(be,"DIV",{class:!0});var Ns=u(oe);y(qe.$$.fragment,Ns),dn=c(Ns),xt=r(Ns,"P",{"data-svelte-h":!0}),f(xt)!=="svelte-602v3q"&&(xt.innerHTML=ma),Ns.forEach(t),be.forEach(t),Is=c(e),E=r(e,"H2",{class:!0});var Rs=u(E);re=r(Rs,"A",{id:!0,class:!0,href:!0});var Xa=u(re);Ht=r(Xa,"SPAN",{});var Za=u(Ht);y(De.$$.fragment,Za),Za.forEach(t),Xa.forEach(t),mn=c(Rs),Xt=r(Rs,"SPAN",{"data-svelte-h":!0}),f(Xt)!=="svelte-kfgxck"&&(Xt.textContent=ha),Rs.forEach(t),Us=c(e),X=r(e,"DIV",{class:!0});var Ce=u(X);y(Ke.$$.fragment,Ce),hn=c(Ce),Zt=r(Ce,"P",{"data-svelte-h":!0}),f(Zt)!=="svelte-1pc0nwp"&&(Zt.innerHTML=fa),fn=c(Ce),Bt=r(Ce,"P",{"data-svelte-h":!0}),f(Bt)!=="svelte-10kqkkl"&&(Bt.innerHTML=ua),un=c(Ce),y(le.$$.fragment,Ce),Ce.forEach(t),xs=c(e),Q=r(e,"H2",{class:!0});var Ys=u(Q);ie=r(Ys,"A",{id:!0,class:!0,href:!0});var Ba=u(ie);qt=r(Ba,"SPAN",{});var ka=u(qt);y(Oe.$$.fragment,ka),ka.forEach(t),Ba.forEach(t),gn=c(Ys),kt=r(Ys,"SPAN",{"data-svelte-h":!0}),f(kt)!=="svelte-1cjc9jv"&&(kt.textContent=ga),Ys.forEach(t),Xs=c(e),Z=r(e,"DIV",{class:!0});var Je=u(Z);y(et.$$.fragment,Je),Mn=c(Je),Wt=r(Je,"P",{"data-svelte-h":!0}),f(Wt)!=="svelte-1pc0nwp"&&(Wt.innerHTML=Ma),yn=c(Je),$t=r(Je,"P",{"data-svelte-h":!0}),f($t)!=="svelte-10kqkkl"&&($t.innerHTML=ya),_n=c(Je),y(ce.$$.fragment,Je),Je.forEach(t),Zs=c(e),F=r(e,"H2",{class:!0});var Es=u(F);pe=r(Es,"A",{id:!0,class:!0,href:!0});var Wa=u(pe);Dt=r(Wa,"SPAN",{});var $a=u(Dt);y(tt.$$.fragment,$a),$a.forEach(t),Wa.forEach(t),wn=c(Es),Gt=r(Es,"SPAN",{"data-svelte-h":!0}),f(Gt)!=="svelte-1164z70"&&(Gt.textContent=_a),Es.forEach(t),Bs=c(e),I=r(e,"DIV",{class:!0});var V=u(I);y(st.$$.fragment,V),Tn=c(V),Pt=r(V,"P",{"data-svelte-h":!0}),f(Pt)!=="svelte-1gjh92c"&&(Pt.innerHTML=wa),jn=c(V),B=r(V,"DIV",{class:!0});var ve=u(B);y(nt.$$.fragment,ve),bn=c(ve),Lt=r(ve,"P",{"data-svelte-h":!0}),f(Lt)!=="svelte-1ajn5jp"&&(Lt.innerHTML=Ta),Cn=c(ve),y(de.$$.fragment,ve),Jn=c(ve),y(me.$$.fragment,ve),ve.forEach(t),vn=c(V),k=r(V,"DIV",{class:!0});var Ie=u(k);y(at.$$.fragment,Ie),In=c(Ie),Vt=r(Ie,"P",{"data-svelte-h":!0}),f(Vt)!=="svelte-1ajn5jp"&&(Vt.innerHTML=ja),Un=c(Ie),y(he.$$.fragment,Ie),xn=c(Ie),y(fe.$$.fragment,Ie),Ie.forEach(t),Xn=c(V),W=r(V,"DIV",{class:!0});var Ue=u(W);y(ot.$$.fragment,Ue),Zn=c(Ue),zt=r(Ue,"P",{"data-svelte-h":!0}),f(zt)!=="svelte-1ajn5jp"&&(zt.innerHTML=ba),Bn=c(Ue),y(ue.$$.fragment,Ue),kn=c(Ue),y(ge.$$.fragment,Ue),Ue.forEach(t),V.forEach(t),ks=c(e),S=r(e,"H2",{class:!0});var Qs=u(S);Me=r(Qs,"A",{id:!0,class:!0,href:!0});var Ga=u(Me);Kt=r(Ga,"SPAN",{});var Pa=u(Kt);y(rt.$$.fragment,Pa),Pa.forEach(t),Ga.forEach(t),Wn=c(Qs),At=r(Qs,"SPAN",{"data-svelte-h":!0}),f(At)!=="svelte-12njn9z"&&(At.textContent=Ca),Qs.forEach(t),Ws=c(e),H=r(e,"DIV",{class:!0});var Fs=u(H);y(lt.$$.fragment,Fs),$n=c(Fs),$=r(Fs,"DIV",{class:!0});var xe=u($);y(it.$$.fragment,xe),Gn=c(xe),Nt=r(xe,"P",{"data-svelte-h":!0}),f(Nt)!=="svelte-qpneyn"&&(Nt.innerHTML=Ja),Pn=c(xe),y(ye.$$.fragment,xe),Ln=c(xe),y(_e.$$.fragment,xe),xe.forEach(t),Fs.forEach(t),$s=c(e),q=r(e,"H2",{class:!0});var Ss=u(q);we=r(Ss,"A",{id:!0,class:!0,href:!0});var La=u(we);Ot=r(La,"SPAN",{});var Va=u(Ot);y(ct.$$.fragment,Va),Va.forEach(t),La.forEach(t),Vn=c(Ss),Rt=r(Ss,"SPAN",{"data-svelte-h":!0}),f(Rt)!=="svelte-twh02c"&&(Rt.textContent=va),Ss.forEach(t),Gs=c(e),D=r(e,"DIV",{class:!0});var Hs=u(D);y(pt.$$.fragment,Hs),zn=c(Hs),G=r(Hs,"DIV",{class:!0});var Xe=u(G);y(dt.$$.fragment,Xe),An=c(Xe),Yt=r(Xe,"P",{"data-svelte-h":!0}),f(Yt)!=="svelte-wxama9"&&(Yt.innerHTML=Ia),Nn=c(Xe),y(Te.$$.fragment,Xe),Rn=c(Xe),y(je.$$.fragment,Xe),Xe.forEach(t),Hs.forEach(t),Ps=c(e),es=r(e,"P",{}),u(es).forEach(t),this.h()},h(){h(n,"name","hf:doc:metadata"),h(n,"content",JSON.stringify(oo)),h(s,"id","xclip"),h(s,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(s,"href","#xclip"),h(g,"class","relative group"),h(K,"id","overview"),h(K,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(K,"href","#overview"),h(A,"class","relative group"),Aa(O.src,Dn="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/xclip_architecture.png")||h(O,"src",Dn),h(O,"alt","drawing"),h(O,"width","600"),h(ee,"id","resources"),h(ee,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(ee,"href","#resources"),h(N,"class","relative group"),h(te,"id","transformers.XCLIPProcessor"),h(te,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(te,"href","#transformers.XCLIPProcessor"),h(R,"class","relative group"),h(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ae,"id","transformers.XCLIPConfig"),h(ae,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(ae,"href","#transformers.XCLIPConfig"),h(Y,"class","relative group"),h(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(re,"id","transformers.XCLIPTextConfig"),h(re,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(re,"href","#transformers.XCLIPTextConfig"),h(E,"class","relative group"),h(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ie,"id","transformers.XCLIPVisionConfig"),h(ie,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(ie,"href","#transformers.XCLIPVisionConfig"),h(Q,"class","relative group"),h(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(pe,"id","transformers.XCLIPModel"),h(pe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(pe,"href","#transformers.XCLIPModel"),h(F,"class","relative group"),h(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Me,"id","transformers.XCLIPTextModel"),h(Me,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(Me,"href","#transformers.XCLIPTextModel"),h(S,"class","relative group"),h($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(we,"id","transformers.XCLIPVisionModel"),h(we,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(we,"href","#transformers.XCLIPVisionModel"),h(q,"class","relative group"),h(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,l){a(document.head,n),p(e,b,l),p(e,d,l),p(e,m,l),p(e,g,l),a(g,s),a(s,C),_(Ze,C,null),a(g,qs),a(g,yt),p(e,ps,l),p(e,A,l),a(A,K),a(K,Et),_(Be,Et,null),a(A,Ds),a(A,_t),p(e,ds,l),p(e,ke,l),p(e,ms,l),p(e,We,l),p(e,hs,l),p(e,$e,l),p(e,fs,l),p(e,Ge,l),p(e,us,l),p(e,Pe,l),p(e,gs,l),p(e,O,l),p(e,Ms,l),p(e,Le,l),p(e,ys,l),p(e,Ve,l),p(e,_s,l),p(e,N,l),a(N,ee),a(ee,Qt),_(ze,Qt,null),a(N,Ks),a(N,wt),p(e,ws,l),p(e,Ae,l),p(e,Ts,l),p(e,Ne,l),p(e,js,l),p(e,Re,l),p(e,bs,l),p(e,R,l),a(R,te),a(te,Ft),_(Ye,Ft,null),a(R,Os),a(R,Tt),p(e,Cs,l),p(e,v,l),_(Ee,v,null),a(v,en),a(v,jt),a(v,tn),a(v,bt),a(v,sn),a(v,se),_(Qe,se,null),a(se,nn),a(se,Ct),a(v,an),a(v,ne),_(Fe,ne,null),a(ne,on),a(ne,Jt),p(e,Js,l),p(e,Y,l),a(Y,ae),a(ae,St),_(Se,St,null),a(Y,rn),a(Y,vt),p(e,vs,l),p(e,x,l),_(He,x,null),a(x,ln),a(x,It),a(x,cn),a(x,Ut),a(x,pn),a(x,oe),_(qe,oe,null),a(oe,dn),a(oe,xt),p(e,Is,l),p(e,E,l),a(E,re),a(re,Ht),_(De,Ht,null),a(E,mn),a(E,Xt),p(e,Us,l),p(e,X,l),_(Ke,X,null),a(X,hn),a(X,Zt),a(X,fn),a(X,Bt),a(X,un),_(le,X,null),p(e,xs,l),p(e,Q,l),a(Q,ie),a(ie,qt),_(Oe,qt,null),a(Q,gn),a(Q,kt),p(e,Xs,l),p(e,Z,l),_(et,Z,null),a(Z,Mn),a(Z,Wt),a(Z,yn),a(Z,$t),a(Z,_n),_(ce,Z,null),p(e,Zs,l),p(e,F,l),a(F,pe),a(pe,Dt),_(tt,Dt,null),a(F,wn),a(F,Gt),p(e,Bs,l),p(e,I,l),_(st,I,null),a(I,Tn),a(I,Pt),a(I,jn),a(I,B),_(nt,B,null),a(B,bn),a(B,Lt),a(B,Cn),_(de,B,null),a(B,Jn),_(me,B,null),a(I,vn),a(I,k),_(at,k,null),a(k,In),a(k,Vt),a(k,Un),_(he,k,null),a(k,xn),_(fe,k,null),a(I,Xn),a(I,W),_(ot,W,null),a(W,Zn),a(W,zt),a(W,Bn),_(ue,W,null),a(W,kn),_(ge,W,null),p(e,ks,l),p(e,S,l),a(S,Me),a(Me,Kt),_(rt,Kt,null),a(S,Wn),a(S,At),p(e,Ws,l),p(e,H,l),_(lt,H,null),a(H,$n),a(H,$),_(it,$,null),a($,Gn),a($,Nt),a($,Pn),_(ye,$,null),a($,Ln),_(_e,$,null),p(e,$s,l),p(e,q,l),a(q,we),a(we,Ot),_(ct,Ot,null),a(q,Vn),a(q,Rt),p(e,Gs,l),p(e,D,l),_(pt,D,null),a(D,zn),a(D,G),_(dt,G,null),a(G,An),a(G,Yt),a(G,Nn),_(Te,G,null),a(G,Rn),_(je,G,null),p(e,Ps,l),p(e,es,l),Ls=!0},p(e,[l]){const mt={};l&2&&(mt.$$scope={dirty:l,ctx:e}),le.$set(mt);const ts={};l&2&&(ts.$$scope={dirty:l,ctx:e}),ce.$set(ts);const ss={};l&2&&(ss.$$scope={dirty:l,ctx:e}),de.$set(ss);const ht={};l&2&&(ht.$$scope={dirty:l,ctx:e}),me.$set(ht);const ns={};l&2&&(ns.$$scope={dirty:l,ctx:e}),he.$set(ns);const as={};l&2&&(as.$$scope={dirty:l,ctx:e}),fe.$set(as);const ft={};l&2&&(ft.$$scope={dirty:l,ctx:e}),ue.$set(ft);const os={};l&2&&(os.$$scope={dirty:l,ctx:e}),ge.$set(os);const rs={};l&2&&(rs.$$scope={dirty:l,ctx:e}),ye.$set(rs);const ut={};l&2&&(ut.$$scope={dirty:l,ctx:e}),_e.$set(ut);const ls={};l&2&&(ls.$$scope={dirty:l,ctx:e}),Te.$set(ls);const is={};l&2&&(is.$$scope={dirty:l,ctx:e}),je.$set(is)},i(e){Ls||(w(Ze.$$.fragment,e),w(Be.$$.fragment,e),w(ze.$$.fragment,e),w(Ye.$$.fragment,e),w(Ee.$$.fragment,e),w(Qe.$$.fragment,e),w(Fe.$$.fragment,e),w(Se.$$.fragment,e),w(He.$$.fragment,e),w(qe.$$.fragment,e),w(De.$$.fragment,e),w(Ke.$$.fragment,e),w(le.$$.fragment,e),w(Oe.$$.fragment,e),w(et.$$.fragment,e),w(ce.$$.fragment,e),w(tt.$$.fragment,e),w(st.$$.fragment,e),w(nt.$$.fragment,e),w(de.$$.fragment,e),w(me.$$.fragment,e),w(at.$$.fragment,e),w(he.$$.fragment,e),w(fe.$$.fragment,e),w(ot.$$.fragment,e),w(ue.$$.fragment,e),w(ge.$$.fragment,e),w(rt.$$.fragment,e),w(lt.$$.fragment,e),w(it.$$.fragment,e),w(ye.$$.fragment,e),w(_e.$$.fragment,e),w(ct.$$.fragment,e),w(pt.$$.fragment,e),w(dt.$$.fragment,e),w(Te.$$.fragment,e),w(je.$$.fragment,e),Ls=!0)},o(e){T(Ze.$$.fragment,e),T(Be.$$.fragment,e),T(ze.$$.fragment,e),T(Ye.$$.fragment,e),T(Ee.$$.fragment,e),T(Qe.$$.fragment,e),T(Fe.$$.fragment,e),T(Se.$$.fragment,e),T(He.$$.fragment,e),T(qe.$$.fragment,e),T(De.$$.fragment,e),T(Ke.$$.fragment,e),T(le.$$.fragment,e),T(Oe.$$.fragment,e),T(et.$$.fragment,e),T(ce.$$.fragment,e),T(tt.$$.fragment,e),T(st.$$.fragment,e),T(nt.$$.fragment,e),T(de.$$.fragment,e),T(me.$$.fragment,e),T(at.$$.fragment,e),T(he.$$.fragment,e),T(fe.$$.fragment,e),T(ot.$$.fragment,e),T(ue.$$.fragment,e),T(ge.$$.fragment,e),T(rt.$$.fragment,e),T(lt.$$.fragment,e),T(it.$$.fragment,e),T(ye.$$.fragment,e),T(_e.$$.fragment,e),T(ct.$$.fragment,e),T(pt.$$.fragment,e),T(dt.$$.fragment,e),T(Te.$$.fragment,e),T(je.$$.fragment,e),Ls=!1},d(e){e&&(t(b),t(d),t(m),t(g),t(ps),t(A),t(ds),t(ke),t(ms),t(We),t(hs),t($e),t(fs),t(Ge),t(us),t(Pe),t(gs),t(O),t(Ms),t(Le),t(ys),t(Ve),t(_s),t(N),t(ws),t(Ae),t(Ts),t(Ne),t(js),t(Re),t(bs),t(R),t(Cs),t(v),t(Js),t(Y),t(vs),t(x),t(Is),t(E),t(Us),t(X),t(xs),t(Q),t(Xs),t(Z),t(Zs),t(F),t(Bs),t(I),t(ks),t(S),t(Ws),t(H),t($s),t(q),t(Gs),t(D),t(Ps),t(es)),t(n),j(Ze),j(Be),j(ze),j(Ye),j(Ee),j(Qe),j(Fe),j(Se),j(He),j(qe),j(De),j(Ke),j(le),j(Oe),j(et),j(ce),j(tt),j(st),j(nt),j(de),j(me),j(at),j(he),j(fe),j(ot),j(ue),j(ge),j(rt),j(lt),j(it),j(ye),j(_e),j(ct),j(pt),j(dt),j(Te),j(je)}}}const oo={local:"xclip",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{local:"transformers.XCLIPProcessor",title:"XCLIPProcessor"},{local:"transformers.XCLIPConfig",title:"XCLIPConfig"},{local:"transformers.XCLIPTextConfig",title:"XCLIPTextConfig"},{local:"transformers.XCLIPVisionConfig",title:"XCLIPVisionConfig"},{local:"transformers.XCLIPModel",title:"XCLIPModel"},{local:"transformers.XCLIPTextModel",title:"XCLIPTextModel"},{local:"transformers.XCLIPVisionModel",title:"XCLIPVisionModel"}],title:"X-CLIP"};function ro(J){return Na(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class uo extends Ra{constructor(n){super(),Ya(this,n,ro,ao,za,{})}}export{uo as component};
