import{s as Jo,o as jo,n as W}from"../chunks/scheduler.25b97de1.js";import{S as Io,i as Fo,g as c,s as a,r as h,A as Co,h as p,f as l,c as i,j as x,u,x as v,k as J,y as s,a as g,v as _,d as b,t as T,w as y}from"../chunks/index.d9030fc9.js";import{T as vt}from"../chunks/Tip.baa67368.js";import{D as j}from"../chunks/Docstring.ffac8efa.js";import{C as $t}from"../chunks/CodeBlock.e6cd0d95.js";import{F as zo,M as xo}from"../chunks/Markdown.7217f838.js";import{E as wt}from"../chunks/ExampleCodeBlock.22dfe688.js";import{H as ue,E as Uo}from"../chunks/EditOnGithub.91d95064.js";function ko(B){let t,f="Example:",n,r,M;return r=new $t({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJsaXBDb25maWclMkMlMjBCbGlwTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQmxpcENvbmZpZyUyMHdpdGglMjBTYWxlc2ZvcmNlJTJGYmxpcC12cWEtYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBCbGlwQ29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQmxpcFBNb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwU2FsZXNmb3JjZSUyRmJsaXAtdnFhLWJhc2UlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMEJsaXBNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWclMEElMEElMjMlMjBXZSUyMGNhbiUyMGFsc28lMjBpbml0aWFsaXplJTIwYSUyMEJsaXBDb25maWclMjBmcm9tJTIwYSUyMEJsaXBUZXh0Q29uZmlnJTIwYW5kJTIwYSUyMEJsaXBWaXNpb25Db25maWclMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQkxJUFRleHQlMjBhbmQlMjBCTElQVmlzaW9uJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ190ZXh0JTIwJTNEJTIwQmxpcFRleHRDb25maWcoKSUwQWNvbmZpZ192aXNpb24lMjAlM0QlMjBCbGlwVmlzaW9uQ29uZmlnKCklMEElMEFjb25maWclMjAlM0QlMjBCbGlwQ29uZmlnLmZyb21fdGV4dF92aXNpb25fY29uZmlncyhjb25maWdfdGV4dCUyQyUyMGNvbmZpZ192aXNpb24p",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BlipConfig, BlipModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a BlipConfig with Salesforce/blip-vqa-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = BlipConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a BlipPModel (with random weights) from the Salesforce/blip-vqa-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlipModel(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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># We can also initialize a BlipConfig from a BlipTextConfig and a BlipVisionConfig</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a BLIPText and BLIPVision configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>config_text = BlipTextConfig()
<span class="hljs-meta">&gt;&gt;&gt; </span>config_vision = BlipVisionConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span>config = BlipConfig.from_text_vision_configs(config_text, config_vision)`,wrap:!1}}),{c(){t=c("p"),t.textContent=f,n=a(),h(r.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),v(t)!=="svelte-11lpom8"&&(t.textContent=f),n=i(o),u(r.$$.fragment,o)},m(o,w){g(o,t,w),g(o,n,w),_(r,o,w),M=!0},p:W,i(o){M||(b(r.$$.fragment,o),M=!0)},o(o){T(r.$$.fragment,o),M=!1},d(o){o&&(l(t),l(n)),y(r,o)}}}function Wo(B){let t,f="Example:",n,r,M;return r=new $t({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJsaXBUZXh0Q29uZmlnJTJDJTIwQmxpcFRleHRNb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBCbGlwVGV4dENvbmZpZyUyMHdpdGglMjBTYWxlc2ZvcmNlJTJGYmxpcC12cWEtYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBCbGlwVGV4dENvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMEJsaXBUZXh0TW9kZWwlMjAod2l0aCUyMHJhbmRvbSUyMHdlaWdodHMpJTIwZnJvbSUyMHRoZSUyMFNhbGVzZm9yY2UlMkZibGlwLXZxYS1iYXNlJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBCbGlwVGV4dE1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BlipTextConfig, BlipTextModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a BlipTextConfig with Salesforce/blip-vqa-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = BlipTextConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a BlipTextModel (with random weights) from the Salesforce/blip-vqa-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlipTextModel(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(){t=c("p"),t.textContent=f,n=a(),h(r.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),v(t)!=="svelte-11lpom8"&&(t.textContent=f),n=i(o),u(r.$$.fragment,o)},m(o,w){g(o,t,w),g(o,n,w),_(r,o,w),M=!0},p:W,i(o){M||(b(r.$$.fragment,o),M=!0)},o(o){T(r.$$.fragment,o),M=!1},d(o){o&&(l(t),l(n)),y(r,o)}}}function Zo(B){let t,f="Example:",n,r,M;return r=new $t({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJsaXBWaXNpb25Db25maWclMkMlMjBCbGlwVmlzaW9uTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQmxpcFZpc2lvbkNvbmZpZyUyMHdpdGglMjBTYWxlc2ZvcmNlJTJGYmxpcC12cWEtYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBCbGlwVmlzaW9uQ29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQmxpcFZpc2lvbk1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBTYWxlc2ZvcmNlJTJGYmxpcC12cWEtYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwQmxpcFZpc2lvbk1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BlipVisionConfig, BlipVisionModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a BlipVisionConfig with Salesforce/blip-vqa-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = BlipVisionConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a BlipVisionModel (with random weights) from the Salesforce/blip-vqa-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlipVisionModel(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(){t=c("p"),t.textContent=f,n=a(),h(r.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),v(t)!=="svelte-11lpom8"&&(t.textContent=f),n=i(o),u(r.$$.fragment,o)},m(o,w){g(o,t,w),g(o,n,w),_(r,o,w),M=!0},p:W,i(o){M||(b(r.$$.fragment,o),M=!0)},o(o){T(r.$$.fragment,o),M=!1},d(o){o&&(l(t),l(n)),y(r,o)}}}function No(B){let t,f=`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(){t=c("p"),t.innerHTML=f},l(n){t=p(n,"P",{"data-svelte-h":!0}),v(t)!=="svelte-fincs2"&&(t.innerHTML=f)},m(n,r){g(n,t,r)},p:W,d(n){n&&l(t)}}}function Po(B){let t,f="Examples:",n,r,M;return r=new $t({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMEJsaXBNb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwQmxpcE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJTYWxlc2ZvcmNlJTJGYmxpcC1pbWFnZS1jYXB0aW9uaW5nLWJhc2UlMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyU2FsZXNmb3JjZSUyRmJsaXAtaW1hZ2UtY2FwdGlvbmluZy1iYXNlJTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoJTBBJTIwJTIwJTIwJTIwdGV4dCUzRCU1QiUyMmElMjBwaG90byUyMG9mJTIwYSUyMGNhdCUyMiUyQyUyMCUyMmElMjBwaG90byUyMG9mJTIwYSUyMGRvZyUyMiU1RCUyQyUyMGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUyQyUyMHBhZGRpbmclM0RUcnVlJTBBKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb2dpdHNfcGVyX2ltYWdlJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHNfcGVyX2ltYWdlJTIwJTIwJTIzJTIwdGhpcyUyMGlzJTIwdGhlJTIwaW1hZ2UtdGV4dCUyMHNpbWlsYXJpdHklMjBzY29yZSUwQXByb2JzJTIwJTNEJTIwbG9naXRzX3Blcl9pbWFnZS5zb2Z0bWF4KGRpbSUzRDEpJTIwJTIwJTIzJTIwd2UlMjBjYW4lMjB0YWtlJTIwdGhlJTIwc29mdG1heCUyMHRvJTIwZ2V0JTIwdGhlJTIwbGFiZWwlMjBwcm9iYWJpbGl0aWVz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, BlipModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlipModel.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits_per_image = outputs.logits_per_image  <span class="hljs-comment"># this is the image-text similarity score</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>probs = logits_per_image.softmax(dim=<span class="hljs-number">1</span>)  <span class="hljs-comment"># we can take the softmax to get the label probabilities</span>`,wrap:!1}}),{c(){t=c("p"),t.textContent=f,n=a(),h(r.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),v(t)!=="svelte-kvfsh7"&&(t.textContent=f),n=i(o),u(r.$$.fragment,o)},m(o,w){g(o,t,w),g(o,n,w),_(r,o,w),M=!0},p:W,i(o){M||(b(r.$$.fragment,o),M=!0)},o(o){T(r.$$.fragment,o),M=!1},d(o){o&&(l(t),l(n)),y(r,o)}}}function Vo(B){let t,f=`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(){t=c("p"),t.innerHTML=f},l(n){t=p(n,"P",{"data-svelte-h":!0}),v(t)!=="svelte-fincs2"&&(t.innerHTML=f)},m(n,r){g(n,t,r)},p:W,d(n){n&&l(t)}}}function Ro(B){let t,f="Examples:",n,r,M;return r=new $t({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBCbGlwTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMEJsaXBNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyU2FsZXNmb3JjZSUyRmJsaXAtaW1hZ2UtY2FwdGlvbmluZy1iYXNlJTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMlNhbGVzZm9yY2UlMkZibGlwLWltYWdlLWNhcHRpb25pbmctYmFzZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IodGV4dCUzRCU1QiUyMmElMjBwaG90byUyMG9mJTIwYSUyMGNhdCUyMiUyQyUyMCUyMmElMjBwaG90byUyMG9mJTIwYSUyMGRvZyUyMiU1RCUyQyUyMHBhZGRpbmclM0RUcnVlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEF0ZXh0X2ZlYXR1cmVzJTIwJTNEJTIwbW9kZWwuZ2V0X3RleHRfZmVhdHVyZXMoKippbnB1dHMp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, BlipModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlipModel.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(text=[<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(){t=c("p"),t.textContent=f,n=a(),h(r.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),v(t)!=="svelte-kvfsh7"&&(t.textContent=f),n=i(o),u(r.$$.fragment,o)},m(o,w){g(o,t,w),g(o,n,w),_(r,o,w),M=!0},p:W,i(o){M||(b(r.$$.fragment,o),M=!0)},o(o){T(r.$$.fragment,o),M=!1},d(o){o&&(l(t),l(n)),y(r,o)}}}function Ho(B){let t,f=`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(){t=c("p"),t.innerHTML=f},l(n){t=p(n,"P",{"data-svelte-h":!0}),v(t)!=="svelte-fincs2"&&(t.innerHTML=f)},m(n,r){g(n,t,r)},p:W,d(n){n&&l(t)}}}function Go(B){let t,f="Examples:",n,r,M;return r=new $t({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMEJsaXBNb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwQmxpcE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJTYWxlc2ZvcmNlJTJGYmxpcC1pbWFnZS1jYXB0aW9uaW5nLWJhc2UlMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyU2FsZXNmb3JjZSUyRmJsaXAtaW1hZ2UtY2FwdGlvbmluZy1iYXNlJTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQWltYWdlX2ZlYXR1cmVzJTIwJTNEJTIwbW9kZWwuZ2V0X2ltYWdlX2ZlYXR1cmVzKCoqaW5wdXRzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, BlipModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlipModel.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>image_features = model.get_image_features(**inputs)`,wrap:!1}}),{c(){t=c("p"),t.textContent=f,n=a(),h(r.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),v(t)!=="svelte-kvfsh7"&&(t.textContent=f),n=i(o),u(r.$$.fragment,o)},m(o,w){g(o,t,w),g(o,n,w),_(r,o,w),M=!0},p:W,i(o){M||(b(r.$$.fragment,o),M=!0)},o(o){T(r.$$.fragment,o),M=!1},d(o){o&&(l(t),l(n)),y(r,o)}}}function Lo(B){let t,f=`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(){t=c("p"),t.innerHTML=f},l(n){t=p(n,"P",{"data-svelte-h":!0}),v(t)!=="svelte-fincs2"&&(t.innerHTML=f)},m(n,r){g(n,t,r)},p:W,d(n){n&&l(t)}}}function qo(B){let t,f=`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(){t=c("p"),t.innerHTML=f},l(n){t=p(n,"P",{"data-svelte-h":!0}),v(t)!=="svelte-fincs2"&&(t.innerHTML=f)},m(n,r){g(n,t,r)},p:W,d(n){n&&l(t)}}}function Eo(B){let t,f="Examples:",n,r,M;return r=new $t({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMEJsaXBGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJTYWxlc2ZvcmNlJTJGYmxpcC1pbWFnZS1jYXB0aW9uaW5nLWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBCbGlwRm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uLmZyb21fcHJldHJhaW5lZCglMjJTYWxlc2ZvcmNlJTJGYmxpcC1pbWFnZS1jYXB0aW9uaW5nLWJhc2UlMjIpJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQXRleHQlMjAlM0QlMjAlMjJBJTIwcGljdHVyZSUyMG9mJTIyJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwdGV4dCUzRHRleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, BlipForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlipForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)
<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;A picture of&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(images=image, text=text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)`,wrap:!1}}),{c(){t=c("p"),t.textContent=f,n=a(),h(r.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),v(t)!=="svelte-kvfsh7"&&(t.textContent=f),n=i(o),u(r.$$.fragment,o)},m(o,w){g(o,t,w),g(o,n,w),_(r,o,w),M=!0},p:W,i(o){M||(b(r.$$.fragment,o),M=!0)},o(o){T(r.$$.fragment,o),M=!1},d(o){o&&(l(t),l(n)),y(r,o)}}}function Xo(B){let t,f=`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(){t=c("p"),t.innerHTML=f},l(n){t=p(n,"P",{"data-svelte-h":!0}),v(t)!=="svelte-fincs2"&&(t.innerHTML=f)},m(n,r){g(n,t,r)},p:W,d(n){n&&l(t)}}}function So(B){let t,f="Examples:",n,r,M;return r=new $t({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMEJsaXBGb3JJbWFnZVRleHRSZXRyaWV2YWwlMEElMEFtb2RlbCUyMCUzRCUyMEJsaXBGb3JJbWFnZVRleHRSZXRyaWV2YWwuZnJvbV9wcmV0cmFpbmVkKCUyMlNhbGVzZm9yY2UlMkZibGlwLWl0bS1iYXNlLWNvY28lMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyU2FsZXNmb3JjZSUyRmJsaXAtaXRtLWJhc2UtY29jbyUyMiklMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBdGV4dCUyMCUzRCUyMCUyMmFuJTIwaW1hZ2UlMjBvZiUyMGElMjBjYXQlMjIlMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjB0ZXh0JTNEdGV4dCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, BlipForImageTextRetrieval

<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlipForImageTextRetrieval.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-itm-base-coco&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-itm-base-coco&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)
<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;an image of a cat&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(images=image, text=text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)`,wrap:!1}}),{c(){t=c("p"),t.textContent=f,n=a(),h(r.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),v(t)!=="svelte-kvfsh7"&&(t.textContent=f),n=i(o),u(r.$$.fragment,o)},m(o,w){g(o,t,w),g(o,n,w),_(r,o,w),M=!0},p:W,i(o){M||(b(r.$$.fragment,o),M=!0)},o(o){T(r.$$.fragment,o),M=!1},d(o){o&&(l(t),l(n)),y(r,o)}}}function Qo(B){let t,f=`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(){t=c("p"),t.innerHTML=f},l(n){t=p(n,"P",{"data-svelte-h":!0}),v(t)!=="svelte-fincs2"&&(t.innerHTML=f)},m(n,r){g(n,t,r)},p:W,d(n){n&&l(t)}}}function Yo(B){let t,f="Examples:",n,r,M;return r=new $t({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMEJsaXBGb3JRdWVzdGlvbkFuc3dlcmluZyUwQSUwQW1vZGVsJTIwJTNEJTIwQmxpcEZvclF1ZXN0aW9uQW5zd2VyaW5nLmZyb21fcHJldHJhaW5lZCglMjJTYWxlc2ZvcmNlJTJGYmxpcC12cWEtYmFzZSUyMiklMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJTYWxlc2ZvcmNlJTJGYmxpcC12cWEtYmFzZSUyMiklMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBJTIzJTIwdHJhaW5pbmclMEF0ZXh0JTIwJTNEJTIwJTIySG93JTIwbWFueSUyMGNhdHMlMjBhcmUlMjBpbiUyMHRoZSUyMHBpY3R1cmUlM0YlMjIlMEFsYWJlbCUyMCUzRCUyMCUyMjIlMjIlMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjB0ZXh0JTNEdGV4dCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBbGFiZWxzJTIwJTNEJTIwcHJvY2Vzc29yKHRleHQlM0RsYWJlbCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpLmlucHV0X2lkcyUwQSUwQWlucHV0cyU1QiUyMmxhYmVscyUyMiU1RCUyMCUzRCUyMGxhYmVscyUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb3NzJTIwJTNEJTIwb3V0cHV0cy5sb3NzJTBBbG9zcy5iYWNrd2FyZCgpJTBBJTBBJTIzJTIwaW5mZXJlbmNlJTBBdGV4dCUyMCUzRCUyMCUyMkhvdyUyMG1hbnklMjBjYXRzJTIwYXJlJTIwaW4lMjB0aGUlMjBwaWN0dXJlJTNGJTIyJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwdGV4dCUzRHRleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSgqKmlucHV0cyklMEFwcmludChwcm9jZXNzb3IuZGVjb2RlKG91dHB1dHMlNUIwJTVEJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUpKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, BlipForQuestionAnswering

<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlipForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-vqa-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-vqa-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># training</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;How many cats are in the picture?&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>label = <span class="hljs-string">&quot;2&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(images=image, text=text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = processor(text=label, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).input_ids

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs[<span class="hljs-string">&quot;labels&quot;</span>] = labels
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>loss.backward()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># inference</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;How many cats are in the picture?&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(images=image, text=text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.generate(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(processor.decode(outputs[<span class="hljs-number">0</span>], skip_special_tokens=<span class="hljs-literal">True</span>))
<span class="hljs-number">2</span>`,wrap:!1}}),{c(){t=c("p"),t.textContent=f,n=a(),h(r.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),v(t)!=="svelte-kvfsh7"&&(t.textContent=f),n=i(o),u(r.$$.fragment,o)},m(o,w){g(o,t,w),g(o,n,w),_(r,o,w),M=!0},p:W,i(o){M||(b(r.$$.fragment,o),M=!0)},o(o){T(r.$$.fragment,o),M=!1},d(o){o&&(l(t),l(n)),y(r,o)}}}function Ao(B){let t,f,n,r="<code>BlipModel</code> is going to be deprecated in future versions, please use <code>BlipForConditionalGeneration</code>, <code>BlipForImageTextRetrieval</code> or <code>BlipForQuestionAnswering</code> depending on your usecase.",M,o,w,Yt,de,$o="This model is going to be deprecated in future versions. Please use <code>BlipForConditionalGeneration</code>, <code>BlipForQuestionAnswering</code> or <code>BlipForImageTextRetrieval</code> depending on your usecase.",At,oe,bo=`This model inherits from <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,Ee,Ze,Ne=`This model is also 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.`,Ke,O,Xe,eo,Pe,Bt='The <a href="/docs/transformers/main/en/model_doc/blip#transformers.BlipModel">BlipModel</a> forward method, overrides the <code>__call__</code> special method.',Dt,S,po,q,we,$e,Be,xt,ct,xe='The <a href="/docs/transformers/main/en/model_doc/blip#transformers.BlipModel">BlipModel</a> forward method, overrides the <code>__call__</code> special method.',mo,se,et,ce,K,F,Je,Jt,tt,To='The <a href="/docs/transformers/main/en/model_doc/blip#transformers.BlipModel">BlipModel</a> forward method, overrides the <code>__call__</code> special method.',jt,re,pt,pe,mt,je,ot,ee,Ie,It,nt,_e=`The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
cross-attention is added between the self-attention layers, following the architecture described in <a href="https://arxiv.org/abs/1706.03762" rel="nofollow">Attention is
all you need</a> by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin. argument and <code>is_decoder</code> set to <code>True</code>; an
<code>encoder_hidden_states</code> is then expected as an input to the forward pass.`,st,V,E,gt,Se,Ot=`encoder_hidden_states  (<code>torch.FloatTensor</code>, <em>optional</em>):
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.
encoder_attention_mask (<code>torch.FloatTensor</code>, <em>optional</em>):
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:`,go,Qe,Ft=`<li>1 for tokens that are <strong>not masked</strong>,</li> <li>0 for tokens that are <strong>masked</strong>.
past_key_values (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>):
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don’t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.
use_cache (<code>bool</code>, <em>optional</em>):
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).</li>`,Ht,te,Ct,I,be,me,Q,zt,Ut,rt,yo='The <a href="/docs/transformers/main/en/model_doc/blip#transformers.BlipVisionModel">BlipVisionModel</a> forward method, overrides the <code>__call__</code> special method.',kt,Ve,to,Te,ae,z,at,X,Ye,fo=`BLIP Model for image captioning. The model consists of a vision encoder and a text decoder. One can optionally pass
<code>input_ids</code> to the model, which serve as a text prompt, to make the text decoder continue the prompt. Otherwise,
the decoder starts generating text from the [BOS] (beginning-of-sequence) token. will start generating the caption
from the text input. If no text input is provided, the decoder will start with the [BOS] token only.`,Fe,Gt,ft=`This model inherits from <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,ht,Ae,oo=`This model is also 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.`,R,H,ut,De,Kt,ho='The <a href="/docs/transformers/main/en/model_doc/blip#transformers.BlipForConditionalGeneration">BlipForConditionalGeneration</a> forward method, overrides the <code>__call__</code> special method.',Ce,ze,no,ie,uo,it,Y,G,ne,Re,Lt,qt=`BLIP Model with a vision and text projector, and a classification head on top. The model is used in the context of
image-text retrieval. Given an image and a text, the model returns the probability of the text being relevant to
the image.`,_t,Wt,ye=`This model inherits from <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,lt,He,Zt=`This model is also 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.`,le,A,Ue,bt,ge,Nt='The <a href="/docs/transformers/main/en/model_doc/blip#transformers.BlipForImageTextRetrieval">BlipForImageTextRetrieval</a> forward method, overrides the <code>__call__</code> special method.',Pt,Ge,_o,ke,dt,We,fe,k,Vt,Tt,Le,so=`BLIP Model for visual question answering. The model consists of a vision encoder, a text encoder as well as a text
decoder. The vision encoder will encode the input image, the text encoder will encode the input question together
with the encoding of the image, and the text decoder will output the answer to the question.`,Me,yt,Oe=`This model inherits from <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,Et,e,m=`This model is also 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.`,Z,C,U,D,L,Mt='The <a href="/docs/transformers/main/en/model_doc/blip#transformers.BlipForQuestionAnswering">BlipForQuestionAnswering</a> forward method, overrides the <code>__call__</code> special method.',qe,N,ve,P,he;return t=new ue({props:{title:"BlipModel",local:"transformers.BlipModel",headingTag:"h2"}}),w=new j({props:{name:"class transformers.BlipModel",anchor:"transformers.BlipModel",parameters:[{name:"config",val:": BlipConfig"}],parametersDescription:[{anchor:"transformers.BlipModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/blip#transformers.BlipConfig">BlipConfig</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/main/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/main/src/transformers/models/blip/modeling_blip.py#L762"}}),Xe=new j({props:{name:"forward",anchor:"transformers.BlipModel.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"},{name:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.BlipModel.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/main/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a>. See <code>BlipProcessor.__call__()</code> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.BlipModel.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.BlipModel.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.BlipModel.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/main/en/model_doc/blip#transformers.BlipImageProcessor">BlipImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/deit#transformers.DeiTFeatureExtractor.__call__">BlipImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.BlipModel.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.BlipModel.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.BlipModel.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.BlipModel.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BlipModel.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_blip.py#L948",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.blip.modeling_blip.BlipOutput</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.blip.configuration_blip.BlipConfig'&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 image-text similarity.</li>
<li><strong>logits_per_image:(<code>torch.FloatTensor</code></strong> of shape <code>(image_batch_size, text_batch_size)</code>) — The scaled dot product scores between <code>image_embeds</code> and <code>text_embeds</code>. This represents the image-text
similarity scores.</li>
<li><strong>logits_per_text:(<code>torch.FloatTensor</code></strong> of shape <code>(text_batch_size, image_batch_size)</code>) — The scaled dot product scores between <code>text_embeds</code> and <code>image_embeds</code>. This represents the text-image
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/main/en/model_doc/blip#transformers.BlipTextModel"
>BlipTextModel</a>.</li>
<li><strong>image_embeds(<code>torch.FloatTensor</code></strong> of shape <code>(batch_size, output_dim</code>) — The image embeddings obtained by applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/en/model_doc/blip#transformers.BlipVisionModel"
>BlipVisionModel</a>.</li>
<li><strong>text_model_output(<code>BaseModelOutputWithPooling</code>):</strong>
The output of the <a
  href="/docs/transformers/main/en/model_doc/blip#transformers.BlipTextModel"
>BlipTextModel</a>.</li>
<li><strong>vision_model_output(<code>BaseModelOutputWithPooling</code>):</strong>
The output of the <a
  href="/docs/transformers/main/en/model_doc/blip#transformers.BlipVisionModel"
>BlipVisionModel</a>.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.blip.modeling_blip.BlipOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),S=new vt({props:{$$slots:{default:[No]},$$scope:{ctx:B}}}),q=new wt({props:{anchor:"transformers.BlipModel.forward.example",$$slots:{default:[Po]},$$scope:{ctx:B}}}),Be=new j({props:{name:"get_text_features",anchor:"transformers.BlipModel.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:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BlipModel.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/main/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a>. See <code>BlipProcessor.__call__()</code> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.BlipModel.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.BlipModel.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.BlipModel.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.BlipModel.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.BlipModel.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_blip.py#L813",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The text embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/en/model_doc/blip#transformers.BlipTextModel"
>BlipTextModel</a>.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>text_features (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),se=new vt({props:{$$slots:{default:[Vo]},$$scope:{ctx:B}}}),ce=new wt({props:{anchor:"transformers.BlipModel.get_text_features.example",$$slots:{default:[Ro]},$$scope:{ctx:B}}}),Je=new j({props:{name:"get_image_features",anchor:"transformers.BlipModel.get_image_features",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.BlipModel.get_image_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/main/en/model_doc/blip#transformers.BlipImageProcessor">BlipImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/deit#transformers.DeiTFeatureExtractor.__call__">BlipImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.BlipModel.get_image_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.BlipModel.get_image_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.BlipModel.get_image_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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BlipModel.get_image_features.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_blip.py#L851",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The image embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/en/model_doc/blip#transformers.BlipVisionModel"
>BlipVisionModel</a>.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>image_features (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),re=new vt({props:{$$slots:{default:[Ho]},$$scope:{ctx:B}}}),pe=new wt({props:{anchor:"transformers.BlipModel.get_image_features.example",$$slots:{default:[Go]},$$scope:{ctx:B}}}),je=new ue({props:{title:"BlipTextModel",local:"transformers.BlipTextModel",headingTag:"h2"}}),Ie=new j({props:{name:"class transformers.BlipTextModel",anchor:"transformers.BlipTextModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_blip_text.py#L571"}}),E=new j({props:{name:"forward",anchor:"transformers.BlipTextModel.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:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"use_cache",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"},{name:"is_decoder",val:": typing.Optional[bool] = False"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_blip_text.py#L670"}}),te=new ue({props:{title:"BlipVisionModel",local:"transformers.BlipVisionModel",headingTag:"h2"}}),be=new j({props:{name:"class transformers.BlipVisionModel",anchor:"transformers.BlipVisionModel",parameters:[{name:"config",val:": BlipVisionConfig"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_blip.py#L695"}}),zt=new j({props:{name:"forward",anchor:"transformers.BlipVisionModel.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"},{name:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.BlipVisionModel.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/main/en/model_doc/blip#transformers.BlipImageProcessor">BlipImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/deit#transformers.DeiTFeatureExtractor.__call__">BlipImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.BlipVisionModel.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.BlipVisionModel.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.BlipVisionModel.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BlipVisionModel.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_blip.py#L710",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/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.blip.configuration_blip.BlipVisionConfig'&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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ve=new vt({props:{$$slots:{default:[Lo]},$$scope:{ctx:B}}}),Te=new ue({props:{title:"BlipForConditionalGeneration",local:"transformers.BlipForConditionalGeneration",headingTag:"h2"}}),at=new j({props:{name:"class transformers.BlipForConditionalGeneration",anchor:"transformers.BlipForConditionalGeneration",parameters:[{name:"config",val:": BlipConfig"}],parametersDescription:[{anchor:"transformers.BlipForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/blip#transformers.BlipConfig">BlipConfig</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/main/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/main/src/transformers/models/blip/modeling_blip.py#L1045"}}),ut=new j({props:{name:"forward",anchor:"transformers.BlipForConditionalGeneration.forward",parameters:[{name:"pixel_values",val:": FloatTensor"},{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.BlipForConditionalGeneration.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/main/en/model_doc/blip#transformers.BlipImageProcessor">BlipImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/deit#transformers.DeiTFeatureExtractor.__call__">BlipImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.BlipForConditionalGeneration.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.BlipForConditionalGeneration.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.BlipForConditionalGeneration.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BlipForConditionalGeneration.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_blip.py#L1078",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.blip.modeling_blip.BlipForConditionalGenerationModelOutput</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.blip.configuration_blip.BlipVisionConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code>, <em>optional</em>, returned when <code>labels</code> is provided, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) — Languge modeling loss from the text decoder.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>, <em>optional</em>) — Prediction scores of the language modeling head of the text decoder model.</p>
</li>
<li>
<p><strong>image_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim)</code>, <em>optional</em>) — The image embeddings obtained after applying the Vision Transformer model to the input image.</p>
</li>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>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) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.blip.modeling_blip.BlipForConditionalGenerationModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ze=new vt({props:{$$slots:{default:[qo]},$$scope:{ctx:B}}}),ie=new wt({props:{anchor:"transformers.BlipForConditionalGeneration.forward.example",$$slots:{default:[Eo]},$$scope:{ctx:B}}}),it=new ue({props:{title:"BlipForImageTextRetrieval",local:"transformers.BlipForImageTextRetrieval",headingTag:"h2"}}),ne=new j({props:{name:"class transformers.BlipForImageTextRetrieval",anchor:"transformers.BlipForImageTextRetrieval",parameters:[{name:"config",val:": BlipConfig"}],parametersDescription:[{anchor:"transformers.BlipForImageTextRetrieval.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/blip#transformers.BlipConfig">BlipConfig</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/main/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/main/src/transformers/models/blip/modeling_blip.py#L1460"}}),Ue=new j({props:{name:"forward",anchor:"transformers.BlipForImageTextRetrieval.forward",parameters:[{name:"input_ids",val:": LongTensor"},{name:"pixel_values",val:": FloatTensor"},{name:"use_itm_head",val:": typing.Optional[bool] = True"},{name:"attention_mask",val:": typing.Optional[torch.LongTensor] = 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"},{name:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.BlipForImageTextRetrieval.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/main/en/model_doc/blip#transformers.BlipImageProcessor">BlipImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/deit#transformers.DeiTFeatureExtractor.__call__">BlipImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.BlipForImageTextRetrieval.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.BlipForImageTextRetrieval.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.BlipForImageTextRetrieval.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BlipForImageTextRetrieval.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_blip.py#L1507",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.blip.modeling_blip.BlipTextVisionModelOutput</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.blip.configuration_blip.BlipVisionConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) — Languge modeling loss from the text decoder.</p>
</li>
<li>
<p><strong>image_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim)</code> <em>optional</em> returned when model is initialized with <code>with_projection=True</code>) — The image embeddings obtained by applying the projection layer to the pooler_output.</p>
</li>
<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>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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.blip.modeling_blip.BlipTextVisionModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ge=new vt({props:{$$slots:{default:[Xo]},$$scope:{ctx:B}}}),ke=new wt({props:{anchor:"transformers.BlipForImageTextRetrieval.forward.example",$$slots:{default:[So]},$$scope:{ctx:B}}}),We=new ue({props:{title:"BlipForQuestionAnswering",local:"transformers.BlipForQuestionAnswering",headingTag:"h2"}}),Vt=new j({props:{name:"class transformers.BlipForQuestionAnswering",anchor:"transformers.BlipForQuestionAnswering",parameters:[{name:"config",val:": BlipConfig"}],parametersDescription:[{anchor:"transformers.BlipForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/blip#transformers.BlipConfig">BlipConfig</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/main/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/main/src/transformers/models/blip/modeling_blip.py#L1228"}}),U=new j({props:{name:"forward",anchor:"transformers.BlipForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": LongTensor"},{name:"pixel_values",val:": FloatTensor"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"interpolate_pos_encoding",val:": bool = False"}],parametersDescription:[{anchor:"transformers.BlipForQuestionAnswering.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/main/en/model_doc/blip#transformers.BlipImageProcessor">BlipImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/deit#transformers.DeiTFeatureExtractor.__call__">BlipImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.BlipForQuestionAnswering.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.BlipForQuestionAnswering.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.BlipForQuestionAnswering.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BlipForQuestionAnswering.forward.interpolate_pos_encoding",description:`<strong>interpolate_pos_encoding</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to interpolate the pre-trained position encodings.`,name:"interpolate_pos_encoding"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_blip.py#L1262",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.blip.modeling_blip.BlipTextVisionModelOutput</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.blip.configuration_blip.BlipVisionConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) — Languge modeling loss from the text decoder.</p>
</li>
<li>
<p><strong>image_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim)</code> <em>optional</em> returned when model is initialized with <code>with_projection=True</code>) — The image embeddings obtained by applying the projection layer to the pooler_output.</p>
</li>
<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>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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.blip.modeling_blip.BlipTextVisionModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),N=new vt({props:{$$slots:{default:[Qo]},$$scope:{ctx:B}}}),P=new wt({props:{anchor:"transformers.BlipForQuestionAnswering.forward.example",$$slots:{default:[Yo]},$$scope:{ctx:B}}}),{c(){h(t.$$.fragment),f=a(),n=c("p"),n.innerHTML=r,M=a(),o=c("div"),h(w.$$.fragment),Yt=a(),de=c("p"),de.innerHTML=$o,At=a(),oe=c("p"),oe.innerHTML=bo,Ee=a(),Ze=c("p"),Ze.innerHTML=Ne,Ke=a(),O=c("div"),h(Xe.$$.fragment),eo=a(),Pe=c("p"),Pe.innerHTML=Bt,Dt=a(),h(S.$$.fragment),po=a(),h(q.$$.fragment),we=a(),$e=c("div"),h(Be.$$.fragment),xt=a(),ct=c("p"),ct.innerHTML=xe,mo=a(),h(se.$$.fragment),et=a(),h(ce.$$.fragment),K=a(),F=c("div"),h(Je.$$.fragment),Jt=a(),tt=c("p"),tt.innerHTML=To,jt=a(),h(re.$$.fragment),pt=a(),h(pe.$$.fragment),mt=a(),h(je.$$.fragment),ot=a(),ee=c("div"),h(Ie.$$.fragment),It=a(),nt=c("p"),nt.innerHTML=_e,st=a(),V=c("div"),h(E.$$.fragment),gt=a(),Se=c("p"),Se.innerHTML=Ot,go=a(),Qe=c("ul"),Qe.innerHTML=Ft,Ht=a(),h(te.$$.fragment),Ct=a(),I=c("div"),h(be.$$.fragment),me=a(),Q=c("div"),h(zt.$$.fragment),Ut=a(),rt=c("p"),rt.innerHTML=yo,kt=a(),h(Ve.$$.fragment),to=a(),h(Te.$$.fragment),ae=a(),z=c("div"),h(at.$$.fragment),X=a(),Ye=c("p"),Ye.innerHTML=fo,Fe=a(),Gt=c("p"),Gt.innerHTML=ft,ht=a(),Ae=c("p"),Ae.innerHTML=oo,R=a(),H=c("div"),h(ut.$$.fragment),De=a(),Kt=c("p"),Kt.innerHTML=ho,Ce=a(),h(ze.$$.fragment),no=a(),h(ie.$$.fragment),uo=a(),h(it.$$.fragment),Y=a(),G=c("div"),h(ne.$$.fragment),Re=a(),Lt=c("p"),Lt.textContent=qt,_t=a(),Wt=c("p"),Wt.innerHTML=ye,lt=a(),He=c("p"),He.innerHTML=Zt,le=a(),A=c("div"),h(Ue.$$.fragment),bt=a(),ge=c("p"),ge.innerHTML=Nt,Pt=a(),h(Ge.$$.fragment),_o=a(),h(ke.$$.fragment),dt=a(),h(We.$$.fragment),fe=a(),k=c("div"),h(Vt.$$.fragment),Tt=a(),Le=c("p"),Le.textContent=so,Me=a(),yt=c("p"),yt.innerHTML=Oe,Et=a(),e=c("p"),e.innerHTML=m,Z=a(),C=c("div"),h(U.$$.fragment),D=a(),L=c("p"),L.innerHTML=Mt,qe=a(),h(N.$$.fragment),ve=a(),h(P.$$.fragment),this.h()},l(d){u(t.$$.fragment,d),f=i(d),n=p(d,"P",{"data-svelte-h":!0}),v(n)!=="svelte-1gcpopj"&&(n.innerHTML=r),M=i(d),o=p(d,"DIV",{class:!0});var $=x(o);u(w.$$.fragment,$),Yt=i($),de=p($,"P",{"data-svelte-h":!0}),v(de)!=="svelte-1ke3c5j"&&(de.innerHTML=$o),At=i($),oe=p($,"P",{"data-svelte-h":!0}),v(oe)!=="svelte-6pahdo"&&(oe.innerHTML=bo),Ee=i($),Ze=p($,"P",{"data-svelte-h":!0}),v(Ze)!=="svelte-hswkmf"&&(Ze.innerHTML=Ne),Ke=i($),O=p($,"DIV",{class:!0});var Rt=x(O);u(Xe.$$.fragment,Rt),eo=i(Rt),Pe=p(Rt,"P",{"data-svelte-h":!0}),v(Pe)!=="svelte-xq3sse"&&(Pe.innerHTML=Bt),Dt=i(Rt),u(S.$$.fragment,Rt),po=i(Rt),u(q.$$.fragment,Rt),Rt.forEach(l),we=i($),$e=p($,"DIV",{class:!0});var ro=x($e);u(Be.$$.fragment,ro),xt=i(ro),ct=p(ro,"P",{"data-svelte-h":!0}),v(ct)!=="svelte-xq3sse"&&(ct.innerHTML=xe),mo=i(ro),u(se.$$.fragment,ro),et=i(ro),u(ce.$$.fragment,ro),ro.forEach(l),K=i($),F=p($,"DIV",{class:!0});var ao=x(F);u(Je.$$.fragment,ao),Jt=i(ao),tt=p(ao,"P",{"data-svelte-h":!0}),v(tt)!=="svelte-xq3sse"&&(tt.innerHTML=To),jt=i(ao),u(re.$$.fragment,ao),pt=i(ao),u(pe.$$.fragment,ao),ao.forEach(l),$.forEach(l),mt=i(d),u(je.$$.fragment,d),ot=i(d),ee=p(d,"DIV",{class:!0});var Mo=x(ee);u(Ie.$$.fragment,Mo),It=i(Mo),nt=p(Mo,"P",{"data-svelte-h":!0}),v(nt)!=="svelte-ehxhk2"&&(nt.innerHTML=_e),st=i(Mo),V=p(Mo,"DIV",{class:!0});var vo=x(V);u(E.$$.fragment,vo),gt=i(vo),Se=p(vo,"P",{"data-svelte-h":!0}),v(Se)!=="svelte-1misbdl"&&(Se.innerHTML=Ot),go=i(vo),Qe=p(vo,"UL",{"data-svelte-h":!0}),v(Qe)!=="svelte-64obm2"&&(Qe.innerHTML=Ft),vo.forEach(l),Mo.forEach(l),Ht=i(d),u(te.$$.fragment,d),Ct=i(d),I=p(d,"DIV",{class:!0});var Bo=x(I);u(be.$$.fragment,Bo),me=i(Bo),Q=p(Bo,"DIV",{class:!0});var wo=x(Q);u(zt.$$.fragment,wo),Ut=i(wo),rt=p(wo,"P",{"data-svelte-h":!0}),v(rt)!=="svelte-du20fi"&&(rt.innerHTML=yo),kt=i(wo),u(Ve.$$.fragment,wo),wo.forEach(l),Bo.forEach(l),to=i(d),u(Te.$$.fragment,d),ae=i(d),z=p(d,"DIV",{class:!0});var Xt=x(z);u(at.$$.fragment,Xt),X=i(Xt),Ye=p(Xt,"P",{"data-svelte-h":!0}),v(Ye)!=="svelte-u9sua2"&&(Ye.innerHTML=fo),Fe=i(Xt),Gt=p(Xt,"P",{"data-svelte-h":!0}),v(Gt)!=="svelte-6pahdo"&&(Gt.innerHTML=ft),ht=i(Xt),Ae=p(Xt,"P",{"data-svelte-h":!0}),v(Ae)!=="svelte-hswkmf"&&(Ae.innerHTML=oo),R=i(Xt),H=p(Xt,"DIV",{class:!0});var io=x(H);u(ut.$$.fragment,io),De=i(io),Kt=p(io,"P",{"data-svelte-h":!0}),v(Kt)!=="svelte-s3umdi"&&(Kt.innerHTML=ho),Ce=i(io),u(ze.$$.fragment,io),no=i(io),u(ie.$$.fragment,io),io.forEach(l),Xt.forEach(l),uo=i(d),u(it.$$.fragment,d),Y=i(d),G=p(d,"DIV",{class:!0});var St=x(G);u(ne.$$.fragment,St),Re=i(St),Lt=p(St,"P",{"data-svelte-h":!0}),v(Lt)!=="svelte-1cwza0e"&&(Lt.textContent=qt),_t=i(St),Wt=p(St,"P",{"data-svelte-h":!0}),v(Wt)!=="svelte-6pahdo"&&(Wt.innerHTML=ye),lt=i(St),He=p(St,"P",{"data-svelte-h":!0}),v(He)!=="svelte-hswkmf"&&(He.innerHTML=Zt),le=i(St),A=p(St,"DIV",{class:!0});var lo=x(A);u(Ue.$$.fragment,lo),bt=i(lo),ge=p(lo,"P",{"data-svelte-h":!0}),v(ge)!=="svelte-1f38c4e"&&(ge.innerHTML=Nt),Pt=i(lo),u(Ge.$$.fragment,lo),_o=i(lo),u(ke.$$.fragment,lo),lo.forEach(l),St.forEach(l),dt=i(d),u(We.$$.fragment,d),fe=i(d),k=p(d,"DIV",{class:!0});var Qt=x(k);u(Vt.$$.fragment,Qt),Tt=i(Qt),Le=p(Qt,"P",{"data-svelte-h":!0}),v(Le)!=="svelte-tf7otj"&&(Le.textContent=so),Me=i(Qt),yt=p(Qt,"P",{"data-svelte-h":!0}),v(yt)!=="svelte-6pahdo"&&(yt.innerHTML=Oe),Et=i(Qt),e=p(Qt,"P",{"data-svelte-h":!0}),v(e)!=="svelte-hswkmf"&&(e.innerHTML=m),Z=i(Qt),C=p(Qt,"DIV",{class:!0});var co=x(C);u(U.$$.fragment,co),D=i(co),L=p(co,"P",{"data-svelte-h":!0}),v(L)!=="svelte-13xp5eu"&&(L.innerHTML=Mt),qe=i(co),u(N.$$.fragment,co),ve=i(co),u(P.$$.fragment,co),co.forEach(l),Qt.forEach(l),this.h()},h(){J(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J($e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(o,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(d,$){_(t,d,$),g(d,f,$),g(d,n,$),g(d,M,$),g(d,o,$),_(w,o,null),s(o,Yt),s(o,de),s(o,At),s(o,oe),s(o,Ee),s(o,Ze),s(o,Ke),s(o,O),_(Xe,O,null),s(O,eo),s(O,Pe),s(O,Dt),_(S,O,null),s(O,po),_(q,O,null),s(o,we),s(o,$e),_(Be,$e,null),s($e,xt),s($e,ct),s($e,mo),_(se,$e,null),s($e,et),_(ce,$e,null),s(o,K),s(o,F),_(Je,F,null),s(F,Jt),s(F,tt),s(F,jt),_(re,F,null),s(F,pt),_(pe,F,null),g(d,mt,$),_(je,d,$),g(d,ot,$),g(d,ee,$),_(Ie,ee,null),s(ee,It),s(ee,nt),s(ee,st),s(ee,V),_(E,V,null),s(V,gt),s(V,Se),s(V,go),s(V,Qe),g(d,Ht,$),_(te,d,$),g(d,Ct,$),g(d,I,$),_(be,I,null),s(I,me),s(I,Q),_(zt,Q,null),s(Q,Ut),s(Q,rt),s(Q,kt),_(Ve,Q,null),g(d,to,$),_(Te,d,$),g(d,ae,$),g(d,z,$),_(at,z,null),s(z,X),s(z,Ye),s(z,Fe),s(z,Gt),s(z,ht),s(z,Ae),s(z,R),s(z,H),_(ut,H,null),s(H,De),s(H,Kt),s(H,Ce),_(ze,H,null),s(H,no),_(ie,H,null),g(d,uo,$),_(it,d,$),g(d,Y,$),g(d,G,$),_(ne,G,null),s(G,Re),s(G,Lt),s(G,_t),s(G,Wt),s(G,lt),s(G,He),s(G,le),s(G,A),_(Ue,A,null),s(A,bt),s(A,ge),s(A,Pt),_(Ge,A,null),s(A,_o),_(ke,A,null),g(d,dt,$),_(We,d,$),g(d,fe,$),g(d,k,$),_(Vt,k,null),s(k,Tt),s(k,Le),s(k,Me),s(k,yt),s(k,Et),s(k,e),s(k,Z),s(k,C),_(U,C,null),s(C,D),s(C,L),s(C,qe),_(N,C,null),s(C,ve),_(P,C,null),he=!0},p(d,$){const Rt={};$&2&&(Rt.$$scope={dirty:$,ctx:d}),S.$set(Rt);const ro={};$&2&&(ro.$$scope={dirty:$,ctx:d}),q.$set(ro);const ao={};$&2&&(ao.$$scope={dirty:$,ctx:d}),se.$set(ao);const Mo={};$&2&&(Mo.$$scope={dirty:$,ctx:d}),ce.$set(Mo);const vo={};$&2&&(vo.$$scope={dirty:$,ctx:d}),re.$set(vo);const Bo={};$&2&&(Bo.$$scope={dirty:$,ctx:d}),pe.$set(Bo);const wo={};$&2&&(wo.$$scope={dirty:$,ctx:d}),Ve.$set(wo);const Xt={};$&2&&(Xt.$$scope={dirty:$,ctx:d}),ze.$set(Xt);const io={};$&2&&(io.$$scope={dirty:$,ctx:d}),ie.$set(io);const St={};$&2&&(St.$$scope={dirty:$,ctx:d}),Ge.$set(St);const lo={};$&2&&(lo.$$scope={dirty:$,ctx:d}),ke.$set(lo);const Qt={};$&2&&(Qt.$$scope={dirty:$,ctx:d}),N.$set(Qt);const co={};$&2&&(co.$$scope={dirty:$,ctx:d}),P.$set(co)},i(d){he||(b(t.$$.fragment,d),b(w.$$.fragment,d),b(Xe.$$.fragment,d),b(S.$$.fragment,d),b(q.$$.fragment,d),b(Be.$$.fragment,d),b(se.$$.fragment,d),b(ce.$$.fragment,d),b(Je.$$.fragment,d),b(re.$$.fragment,d),b(pe.$$.fragment,d),b(je.$$.fragment,d),b(Ie.$$.fragment,d),b(E.$$.fragment,d),b(te.$$.fragment,d),b(be.$$.fragment,d),b(zt.$$.fragment,d),b(Ve.$$.fragment,d),b(Te.$$.fragment,d),b(at.$$.fragment,d),b(ut.$$.fragment,d),b(ze.$$.fragment,d),b(ie.$$.fragment,d),b(it.$$.fragment,d),b(ne.$$.fragment,d),b(Ue.$$.fragment,d),b(Ge.$$.fragment,d),b(ke.$$.fragment,d),b(We.$$.fragment,d),b(Vt.$$.fragment,d),b(U.$$.fragment,d),b(N.$$.fragment,d),b(P.$$.fragment,d),he=!0)},o(d){T(t.$$.fragment,d),T(w.$$.fragment,d),T(Xe.$$.fragment,d),T(S.$$.fragment,d),T(q.$$.fragment,d),T(Be.$$.fragment,d),T(se.$$.fragment,d),T(ce.$$.fragment,d),T(Je.$$.fragment,d),T(re.$$.fragment,d),T(pe.$$.fragment,d),T(je.$$.fragment,d),T(Ie.$$.fragment,d),T(E.$$.fragment,d),T(te.$$.fragment,d),T(be.$$.fragment,d),T(zt.$$.fragment,d),T(Ve.$$.fragment,d),T(Te.$$.fragment,d),T(at.$$.fragment,d),T(ut.$$.fragment,d),T(ze.$$.fragment,d),T(ie.$$.fragment,d),T(it.$$.fragment,d),T(ne.$$.fragment,d),T(Ue.$$.fragment,d),T(Ge.$$.fragment,d),T(ke.$$.fragment,d),T(We.$$.fragment,d),T(Vt.$$.fragment,d),T(U.$$.fragment,d),T(N.$$.fragment,d),T(P.$$.fragment,d),he=!1},d(d){d&&(l(f),l(n),l(M),l(o),l(mt),l(ot),l(ee),l(Ht),l(Ct),l(I),l(to),l(ae),l(z),l(uo),l(Y),l(G),l(dt),l(fe),l(k)),y(t,d),y(w),y(Xe),y(S),y(q),y(Be),y(se),y(ce),y(Je),y(re),y(pe),y(je,d),y(Ie),y(E),y(te,d),y(be),y(zt),y(Ve),y(Te,d),y(at),y(ut),y(ze),y(ie),y(it,d),y(ne),y(Ue),y(Ge),y(ke),y(We,d),y(Vt),y(U),y(N),y(P)}}}function Do(B){let t,f;return t=new xo({props:{$$slots:{default:[Ao]},$$scope:{ctx:B}}}),{c(){h(t.$$.fragment)},l(n){u(t.$$.fragment,n)},m(n,r){_(t,n,r),f=!0},p(n,r){const M={};r&2&&(M.$$scope={dirty:r,ctx:n}),t.$set(M)},i(n){f||(b(t.$$.fragment,n),f=!0)},o(n){T(t.$$.fragment,n),f=!1},d(n){y(t,n)}}}function Oo(B){let t,f=`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(){t=c("p"),t.innerHTML=f},l(n){t=p(n,"P",{"data-svelte-h":!0}),v(t)!=="svelte-fincs2"&&(t.innerHTML=f)},m(n,r){g(n,t,r)},p:W,d(n){n&&l(t)}}}function Ko(B){let t,f="Examples:",n,r,M;return r=new $t({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMFRGQmxpcE1vZGVsJTBBJTBBbW9kZWwlMjAlM0QlMjBURkJsaXBNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyU2FsZXNmb3JjZSUyRmJsaXAtaW1hZ2UtY2FwdGlvbmluZy1iYXNlJTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMlNhbGVzZm9yY2UlMkZibGlwLWltYWdlLWNhcHRpb25pbmctYmFzZSUyMiklMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKCUwQSUyMCUyMCUyMCUyMHRleHQlM0QlNUIlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBjYXQlMjIlMkMlMjAlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBkb2clMjIlNUQlMkMlMjBpbWFnZXMlM0RpbWFnZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIlMkMlMjBwYWRkaW5nJTNEVHJ1ZSUwQSklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbG9naXRzX3Blcl9pbWFnZSUyMCUzRCUyMG91dHB1dHMubG9naXRzX3Blcl9pbWFnZSUyMCUyMCUyMyUyMHRoaXMlMjBpcyUyMHRoZSUyMGltYWdlLXRleHQlMjBzaW1pbGFyaXR5JTIwc2NvcmUlMEFwcm9icyUyMCUzRCUyMHRmLm5uLnNvZnRtYXgobG9naXRzX3Blcl9pbWFnZSUyQyUyMGF4aXMlM0QxKSUyMCUyMCUyMyUyMHdlJTIwY2FuJTIwdGFrZSUyMHRoZSUyMHNvZnRtYXglMjB0byUyMGdldCUyMHRoZSUyMGxhYmVsJTIwcHJvYmFiaWxpdGllcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, TFBlipModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBlipModel.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(
<span class="hljs-meta">... </span>    text=[<span class="hljs-string">&quot;a photo of a cat&quot;</span>, <span class="hljs-string">&quot;a photo of a dog&quot;</span>], images=image, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>, padding=<span class="hljs-literal">True</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits_per_image = outputs.logits_per_image  <span class="hljs-comment"># this is the image-text similarity score</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>probs = tf.nn.softmax(logits_per_image, axis=<span class="hljs-number">1</span>)  <span class="hljs-comment"># we can take the softmax to get the label probabilities</span>`,wrap:!1}}),{c(){t=c("p"),t.textContent=f,n=a(),h(r.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),v(t)!=="svelte-kvfsh7"&&(t.textContent=f),n=i(o),u(r.$$.fragment,o)},m(o,w){g(o,t,w),g(o,n,w),_(r,o,w),M=!0},p:W,i(o){M||(b(r.$$.fragment,o),M=!0)},o(o){T(r.$$.fragment,o),M=!1},d(o){o&&(l(t),l(n)),y(r,o)}}}function en(B){let t,f=`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(){t=c("p"),t.innerHTML=f},l(n){t=p(n,"P",{"data-svelte-h":!0}),v(t)!=="svelte-fincs2"&&(t.innerHTML=f)},m(n,r){g(n,t,r)},p:W,d(n){n&&l(t)}}}function tn(B){let t,f="Examples:",n,r,M;return r=new $t({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBURkJsaXBNb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwVEZCbGlwTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMlNhbGVzZm9yY2UlMkZibGlwLWltYWdlLWNhcHRpb25pbmctYmFzZSUyMiklMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJTYWxlc2ZvcmNlJTJGYmxpcC1pbWFnZS1jYXB0aW9uaW5nLWJhc2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKHRleHQlM0QlNUIlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBjYXQlMjIlMkMlMjAlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBkb2clMjIlNUQlMkMlMjBwYWRkaW5nJTNEVHJ1ZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBdGV4dF9mZWF0dXJlcyUyMCUzRCUyMG1vZGVsLmdldF90ZXh0X2ZlYXR1cmVzKCoqaW5wdXRzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, TFBlipModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBlipModel.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(text=[<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;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>text_features = model.get_text_features(**inputs)`,wrap:!1}}),{c(){t=c("p"),t.textContent=f,n=a(),h(r.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),v(t)!=="svelte-kvfsh7"&&(t.textContent=f),n=i(o),u(r.$$.fragment,o)},m(o,w){g(o,t,w),g(o,n,w),_(r,o,w),M=!0},p:W,i(o){M||(b(r.$$.fragment,o),M=!0)},o(o){T(r.$$.fragment,o),M=!1},d(o){o&&(l(t),l(n)),y(r,o)}}}function on(B){let t,f=`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(){t=c("p"),t.innerHTML=f},l(n){t=p(n,"P",{"data-svelte-h":!0}),v(t)!=="svelte-fincs2"&&(t.innerHTML=f)},m(n,r){g(n,t,r)},p:W,d(n){n&&l(t)}}}function nn(B){let t,f="Examples:",n,r,M;return r=new $t({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMFRGQmxpcE1vZGVsJTBBJTBBbW9kZWwlMjAlM0QlMjBURkJsaXBNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyU2FsZXNmb3JjZSUyRmJsaXAtaW1hZ2UtY2FwdGlvbmluZy1iYXNlJTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMlNhbGVzZm9yY2UlMkZibGlwLWltYWdlLWNhcHRpb25pbmctYmFzZSUyMiklMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEElMEFpbWFnZV9mZWF0dXJlcyUyMCUzRCUyMG1vZGVsLmdldF9pbWFnZV9mZWF0dXJlcygqKmlucHV0cyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, TFBlipModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBlipModel.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(images=image, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>image_features = model.get_image_features(**inputs)`,wrap:!1}}),{c(){t=c("p"),t.textContent=f,n=a(),h(r.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),v(t)!=="svelte-kvfsh7"&&(t.textContent=f),n=i(o),u(r.$$.fragment,o)},m(o,w){g(o,t,w),g(o,n,w),_(r,o,w),M=!0},p:W,i(o){M||(b(r.$$.fragment,o),M=!0)},o(o){T(r.$$.fragment,o),M=!1},d(o){o&&(l(t),l(n)),y(r,o)}}}function sn(B){let t,f=`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(){t=c("p"),t.innerHTML=f},l(n){t=p(n,"P",{"data-svelte-h":!0}),v(t)!=="svelte-fincs2"&&(t.innerHTML=f)},m(n,r){g(n,t,r)},p:W,d(n){n&&l(t)}}}function rn(B){let t,f=`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(){t=c("p"),t.innerHTML=f},l(n){t=p(n,"P",{"data-svelte-h":!0}),v(t)!=="svelte-fincs2"&&(t.innerHTML=f)},m(n,r){g(n,t,r)},p:W,d(n){n&&l(t)}}}function an(B){let t,f=`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(){t=c("p"),t.innerHTML=f},l(n){t=p(n,"P",{"data-svelte-h":!0}),v(t)!=="svelte-fincs2"&&(t.innerHTML=f)},m(n,r){g(n,t,r)},p:W,d(n){n&&l(t)}}}function ln(B){let t,f="Examples:",n,r,M;return r=new $t({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMFRGQmxpcEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUwQSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMlNhbGVzZm9yY2UlMkZibGlwLWltYWdlLWNhcHRpb25pbmctYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFRGQmxpcEZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyU2FsZXNmb3JjZSUyRmJsaXAtaW1hZ2UtY2FwdGlvbmluZy1iYXNlJTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEF0ZXh0JTIwJTNEJTIwJTIyQSUyMHBpY3R1cmUlMjBvZiUyMiUwQSUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3NvcihpbWFnZXMlM0RpbWFnZSUyQyUyMHRleHQlM0R0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, TFBlipForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBlipForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-image-captioning-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)
<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;A picture of&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(images=image, text=text, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)`,wrap:!1}}),{c(){t=c("p"),t.textContent=f,n=a(),h(r.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),v(t)!=="svelte-kvfsh7"&&(t.textContent=f),n=i(o),u(r.$$.fragment,o)},m(o,w){g(o,t,w),g(o,n,w),_(r,o,w),M=!0},p:W,i(o){M||(b(r.$$.fragment,o),M=!0)},o(o){T(r.$$.fragment,o),M=!1},d(o){o&&(l(t),l(n)),y(r,o)}}}function dn(B){let t,f=`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(){t=c("p"),t.innerHTML=f},l(n){t=p(n,"P",{"data-svelte-h":!0}),v(t)!=="svelte-fincs2"&&(t.innerHTML=f)},m(n,r){g(n,t,r)},p:W,d(n){n&&l(t)}}}function cn(B){let t,f="Examples:",n,r,M;return r=new $t({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMFRGQmxpcEZvckltYWdlVGV4dFJldHJpZXZhbCUwQSUwQW1vZGVsJTIwJTNEJTIwVEZCbGlwRm9ySW1hZ2VUZXh0UmV0cmlldmFsLmZyb21fcHJldHJhaW5lZCglMjJTYWxlc2ZvcmNlJTJGYmxpcC1pdG0tYmFzZS1jb2NvJTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMlNhbGVzZm9yY2UlMkZibGlwLWl0bS1iYXNlLWNvY28lMjIpJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQXRleHQlMjAlM0QlMjAlMjJhbiUyMGltYWdlJTIwb2YlMjBhJTIwY2F0JTIyJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwdGV4dCUzRHRleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, TFBlipForImageTextRetrieval

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBlipForImageTextRetrieval.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-itm-base-coco&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-itm-base-coco&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)
<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;an image of a cat&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(images=image, text=text, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)`,wrap:!1}}),{c(){t=c("p"),t.textContent=f,n=a(),h(r.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),v(t)!=="svelte-kvfsh7"&&(t.textContent=f),n=i(o),u(r.$$.fragment,o)},m(o,w){g(o,t,w),g(o,n,w),_(r,o,w),M=!0},p:W,i(o){M||(b(r.$$.fragment,o),M=!0)},o(o){T(r.$$.fragment,o),M=!1},d(o){o&&(l(t),l(n)),y(r,o)}}}function pn(B){let t,f=`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(){t=c("p"),t.innerHTML=f},l(n){t=p(n,"P",{"data-svelte-h":!0}),v(t)!=="svelte-fincs2"&&(t.innerHTML=f)},m(n,r){g(n,t,r)},p:W,d(n){n&&l(t)}}}function mn(B){let t,f="Examples:",n,r,M;return r=new $t({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMFRGQmxpcEZvclF1ZXN0aW9uQW5zd2VyaW5nJTBBJTBBbW9kZWwlMjAlM0QlMjBURkJsaXBGb3JRdWVzdGlvbkFuc3dlcmluZy5mcm9tX3ByZXRyYWluZWQoJTIyU2FsZXNmb3JjZSUyRmJsaXAtdnFhLWJhc2UlMjIpJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyU2FsZXNmb3JjZSUyRmJsaXAtdnFhLWJhc2UlMjIpJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQSUwQSUyMyUyMHRyYWluaW5nJTBBdGV4dCUyMCUzRCUyMCUyMkhvdyUyMG1hbnklMjBjYXRzJTIwYXJlJTIwaW4lMjB0aGUlMjBwaWN0dXJlJTNGJTIyJTBBbGFiZWwlMjAlM0QlMjAlMjIyJTIyJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwdGV4dCUzRHRleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQWxhYmVscyUyMCUzRCUyMHByb2Nlc3Nvcih0ZXh0JTNEbGFiZWwlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKS5pbnB1dF9pZHMlMEElMEFpbnB1dHMlNUIlMjJsYWJlbHMlMjIlNUQlMjAlM0QlMjBsYWJlbHMlMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbG9zcyUyMCUzRCUyMG91dHB1dHMubG9zcyUwQSUwQSUyMyUyMGluZmVyZW5jZSUwQXRleHQlMjAlM0QlMjAlMjJIb3clMjBtYW55JTIwY2F0cyUyMGFyZSUyMGluJTIwdGhlJTIwcGljdHVyZSUzRiUyMiUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3NvcihpbWFnZXMlM0RpbWFnZSUyQyUyMHRleHQlM0R0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoKippbnB1dHMpJTBBcHJpbnQocHJvY2Vzc29yLmRlY29kZShvdXRwdXRzJTVCMCU1RCUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlKSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, TFBlipForQuestionAnswering

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBlipForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-vqa-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;Salesforce/blip-vqa-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># training</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;How many cats are in the picture?&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>label = <span class="hljs-string">&quot;2&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(images=image, text=text, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = processor(text=label, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>).input_ids

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs[<span class="hljs-string">&quot;labels&quot;</span>] = labels
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># inference</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;How many cats are in the picture?&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(images=image, text=text, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.generate(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(processor.decode(outputs[<span class="hljs-number">0</span>], skip_special_tokens=<span class="hljs-literal">True</span>))
<span class="hljs-number">2</span>`,wrap:!1}}),{c(){t=c("p"),t.textContent=f,n=a(),h(r.$$.fragment)},l(o){t=p(o,"P",{"data-svelte-h":!0}),v(t)!=="svelte-kvfsh7"&&(t.textContent=f),n=i(o),u(r.$$.fragment,o)},m(o,w){g(o,t,w),g(o,n,w),_(r,o,w),M=!0},p:W,i(o){M||(b(r.$$.fragment,o),M=!0)},o(o){T(r.$$.fragment,o),M=!1},d(o){o&&(l(t),l(n)),y(r,o)}}}function gn(B){let t,f,n,r,M,o,w,Yt,de,$o='The <a href="/docs/transformers/main/en/model_doc/blip#transformers.TFBlipModel">TFBlipModel</a> forward method, overrides the <code>__call__</code> special method.',At,oe,bo,Ee,Ze,Ne,Ke,O,Xe,eo='The <a href="/docs/transformers/main/en/model_doc/blip#transformers.TFBlipModel">TFBlipModel</a> forward method, overrides the <code>__call__</code> special method.',Pe,Bt,Dt,S,po,q,we,$e,Be,xt='The <a href="/docs/transformers/main/en/model_doc/blip#transformers.TFBlipModel">TFBlipModel</a> forward method, overrides the <code>__call__</code> special method.',ct,xe,mo,se,et,ce,K,F,Je,Jt,tt,To=`The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
cross-attention is added between the self-attention layers, following the architecture described in <a href="https://arxiv.org/abs/1706.03762" rel="nofollow">Attention is
all you need</a> by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin. argument and <code>is_decoder</code> set to <code>True</code>; an
<code>encoder_hidden_states</code> is then expected as an input to the forward pass.`,jt,re,pt,pe,mt,je='The <a href="/docs/transformers/main/en/model_doc/blip#transformers.TFBlipTextModel">TFBlipTextModel</a> forward method, overrides the <code>__call__</code> special method.',ot,ee,Ie,It,nt,_e,st,V,E,gt,Se,Ot,go='The <a href="/docs/transformers/main/en/model_doc/blip#transformers.TFBlipVisionModel">TFBlipVisionModel</a> forward method, overrides the <code>__call__</code> special method.',Qe,Ft,Ht,te,Ct,I,be,me,Q,zt=`BLIP Model for image captioning. The model consists of a vision encoder and a text decoder. One can optionally pass
<code>input_ids</code> to the model, which serve as a text prompt, to make the text decoder continue the prompt. Otherwise,
the decoder starts generating text from the [BOS] (beginning-of-sequence) token. will start generating the caption
from the text input. If no text input is provided, the decoder will start with the [BOS] token only.`,Ut,rt,yo=`This model inherits from <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,kt,Ve,to=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`,Te,ae,z,at,X,Ye='The <a href="/docs/transformers/main/en/model_doc/blip#transformers.TFBlipForConditionalGeneration">TFBlipForConditionalGeneration</a> forward method, overrides the <code>__call__</code> special method.',fo,Fe,Gt,ft,ht,Ae,oo,R,H,ut,De,Kt=`BLIP Model with a vision and text projector, and a classification head on top. The model is used in the context of
image-text retrieval. Given an image and a text, the model returns the probability of the text being relevant to
the image.`,ho,Ce,ze=`This model inherits from <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,no,ie,uo=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`,it,Y,G,ne,Re,Lt='The <a href="/docs/transformers/main/en/model_doc/blip#transformers.TFBlipForImageTextRetrieval">TFBlipForImageTextRetrieval</a> forward method, overrides the <code>__call__</code> special method.',qt,_t,Wt,ye,lt,He,Zt,le,A,Ue,bt,ge=`BLIP Model for visual question answering. The model consists of a vision encoder, a text encoder as well as a text
decoder. The vision encoder will encode the input image, the text encoder will encode the input question together
with the encoding of the image, and the text decoder will output the answer to the question.`,Nt,Pt,Ge=`This model inherits from <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,_o,ke,dt=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`,We,fe,k,Vt,Tt,Le='The <a href="/docs/transformers/main/en/model_doc/blip#transformers.TFBlipForQuestionAnswering">TFBlipForQuestionAnswering</a> forward method, overrides the <code>__call__</code> special method.',so,Me,yt,Oe,Et;return t=new ue({props:{title:"TFBlipModel",local:"transformers.TFBlipModel",headingTag:"h2"}}),r=new j({props:{name:"class transformers.TFBlipModel",anchor:"transformers.TFBlipModel",parameters:[{name:"config",val:": BlipConfig"},{name:"*inputs",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_tf_blip.py#L930"}}),w=new j({props:{name:"call",anchor:"transformers.TFBlipModel.call",parameters:[{name:"input_ids",val:": tf.Tensor | None = None"},{name:"pixel_values",val:": tf.Tensor | None = None"},{name:"attention_mask",val:": tf.Tensor | None = None"},{name:"position_ids",val:": tf.Tensor | None = None"},{name:"return_loss",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.TFBlipModel.call.input_ids",description:`<strong>input_ids</strong> (<code>tf.Tensor</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/main/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a>. See <code>BlipProcessor.__call__()</code> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFBlipModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.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.TFBlipModel.call.position_ids",description:`<strong>position_ids</strong> (<code>tf.Tensor</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.TFBlipModel.call.pixel_values",description:`<strong>pixel_values</strong> (<code>tf.Tensor</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/main/en/model_doc/blip#transformers.BlipImageProcessor">BlipImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/deit#transformers.DeiTFeatureExtractor.__call__">BlipImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFBlipModel.call.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.TFBlipModel.call.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.TFBlipModel.call.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.TFBlipModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_tf_blip.py#L948",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.blip.modeling_tf_blip.TFBlipOutput</code> or a tuple of <code>tf.Tensor</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.blip.configuration_blip.BlipConfig'&gt;</code>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>return_loss</code> is <code>True</code>) — Contrastive loss for image-text similarity.</li>
<li><strong>logits_per_image:(<code>tf.Tensor</code></strong> of shape <code>(image_batch_size, text_batch_size)</code>) — The scaled dot product scores between <code>image_embeds</code> and <code>text_embeds</code>. This represents the image-text
similarity scores.</li>
<li><strong>logits_per_text:(<code>tf.Tensor</code></strong> of shape <code>(text_batch_size, image_batch_size)</code>) — The scaled dot product scores between <code>text_embeds</code> and <code>image_embeds</code>. This represents the text-image
similarity scores.</li>
<li><strong>text_embeds(<code>tf.Tensor</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/main/en/model_doc/blip#transformers.BlipTextModel"
>BlipTextModel</a>.</li>
<li><strong>image_embeds(<code>tf.Tensor</code></strong> of shape <code>(batch_size, output_dim</code>) — The image embeddings obtained by applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/en/model_doc/blip#transformers.BlipVisionModel"
>BlipVisionModel</a>.</li>
<li><strong>text_model_output(<code>BaseModelOutputWithPooling</code>):</strong>
The output of the <a
  href="/docs/transformers/main/en/model_doc/blip#transformers.BlipTextModel"
>BlipTextModel</a>.</li>
<li><strong>vision_model_output(<code>BaseModelOutputWithPooling</code>):</strong>
The output of the <a
  href="/docs/transformers/main/en/model_doc/blip#transformers.BlipVisionModel"
>BlipVisionModel</a>.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.blip.modeling_tf_blip.TFBlipOutput</code> or <code>tuple(tf.Tensor)</code></p>
`}}),oe=new vt({props:{$$slots:{default:[Oo]},$$scope:{ctx:B}}}),Ee=new wt({props:{anchor:"transformers.TFBlipModel.call.example",$$slots:{default:[Ko]},$$scope:{ctx:B}}}),Ke=new j({props:{name:"get_text_features",anchor:"transformers.TFBlipModel.get_text_features",parameters:[{name:"input_ids",val:": tf.Tensor | None = None"},{name:"attention_mask",val:": tf.Tensor | None = None"},{name:"position_ids",val:": tf.Tensor | None = None"},{name:"return_dict",val:": Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.TFBlipModel.get_text_features.input_ids",description:`<strong>input_ids</strong> (<code>tf.Tensor</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/main/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a>. See <code>BlipProcessor.__call__()</code> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFBlipModel.get_text_features.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.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.TFBlipModel.get_text_features.position_ids",description:`<strong>position_ids</strong> (<code>tf.Tensor</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.TFBlipModel.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.TFBlipModel.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.TFBlipModel.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_tf_blip.py#L1000",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The text embeddings obtained by applying
the projection layer to the pooled output of <a
  href="/docs/transformers/main/en/model_doc/blip#transformers.TFBlipTextModel"
>TFBlipTextModel</a>.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>text_features (<code>tf.Tensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),Bt=new vt({props:{$$slots:{default:[en]},$$scope:{ctx:B}}}),S=new wt({props:{anchor:"transformers.TFBlipModel.get_text_features.example",$$slots:{default:[tn]},$$scope:{ctx:B}}}),we=new j({props:{name:"get_image_features",anchor:"transformers.TFBlipModel.get_image_features",parameters:[{name:"pixel_values",val:": tf.Tensor | None = None"},{name:"return_dict",val:": Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.TFBlipModel.get_image_features.pixel_values",description:`<strong>pixel_values</strong> (<code>tf.Tensor</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/main/en/model_doc/blip#transformers.BlipImageProcessor">BlipImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/deit#transformers.DeiTFeatureExtractor.__call__">BlipImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFBlipModel.get_image_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.TFBlipModel.get_image_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.TFBlipModel.get_image_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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_tf_blip.py#L1038",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The image embeddings obtained by applying
the projection layer to the pooled output of <a
  href="/docs/transformers/main/en/model_doc/blip#transformers.TFBlipVisionModel"
>TFBlipVisionModel</a>.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>image_features (<code>tf.Tensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),xe=new vt({props:{$$slots:{default:[on]},$$scope:{ctx:B}}}),se=new wt({props:{anchor:"transformers.TFBlipModel.get_image_features.example",$$slots:{default:[nn]},$$scope:{ctx:B}}}),ce=new ue({props:{title:"TFBlipTextModel",local:"transformers.TFBlipTextModel",headingTag:"h2"}}),Je=new j({props:{name:"class transformers.TFBlipTextModel",anchor:"transformers.TFBlipTextModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"},{name:"name",val:" = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_tf_blip_text.py#L729"}}),pt=new j({props:{name:"call",anchor:"transformers.TFBlipTextModel.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": tf.Tensor | None = None"},{name:"position_ids",val:": tf.Tensor | None = None"},{name:"head_mask",val:": tf.Tensor | None = None"},{name:"inputs_embeds",val:": tf.Tensor | None = None"},{name:"encoder_embeds",val:": tf.Tensor | None = None"},{name:"encoder_hidden_states",val:": tf.Tensor | None = None"},{name:"encoder_attention_mask",val:": tf.Tensor | None = None"},{name:"past_key_values",val:": Tuple[Tuple[tf.Tensor]] | None = None"},{name:"use_cache",val:": bool | None = None"},{name:"output_attentions",val:": bool | None = None"},{name:"output_hidden_states",val:": bool | None = None"},{name:"return_dict",val:": bool | None = None"},{name:"is_decoder",val:": bool = False"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFBlipTextModel.call.input_ids",description:`<strong>input_ids</strong> (<code>tf.Tensor</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/main/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a>. See <code>BlipProcessor.__call__()</code> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFBlipTextModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.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.TFBlipTextModel.call.position_ids",description:`<strong>position_ids</strong> (<code>tf.Tensor</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.TFBlipTextModel.call.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.TFBlipTextModel.call.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.TFBlipTextModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.TFBlipTextModel.call.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>tf.Tensor</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.TFBlipTextModel.call.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>tf.Tensor</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. 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>`,name:"encoder_attention_mask"},{anchor:"transformers.TFBlipTextModel.call.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(tf.Tensor))</code>, <em>optional</em>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFBlipTextModel.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_tf_blip_text.py#L817"}}),ee=new vt({props:{$$slots:{default:[sn]},$$scope:{ctx:B}}}),It=new ue({props:{title:"TFBlipVisionModel",local:"transformers.TFBlipVisionModel",headingTag:"h2"}}),st=new j({props:{name:"class transformers.TFBlipVisionModel",anchor:"transformers.TFBlipVisionModel",parameters:[{name:"config",val:": BlipVisionConfig"},{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_tf_blip.py#L696"}}),gt=new j({props:{name:"call",anchor:"transformers.TFBlipVisionModel.call",parameters:[{name:"pixel_values",val:": tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.TFBlipVisionModel.call.pixel_values",description:`<strong>pixel_values</strong> (<code>tf.Tensor</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/main/en/model_doc/blip#transformers.BlipImageProcessor">BlipImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/deit#transformers.DeiTFeatureExtractor.__call__">BlipImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFBlipVisionModel.call.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.TFBlipVisionModel.call.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.TFBlipVisionModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_tf_blip.py#L720",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or a tuple of <code>tf.Tensor</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.blip.configuration_blip.BlipVisionConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</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>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>) — Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
<p>This output is usually <em>not</em> a good summary of the semantic content of the input, you’re often better with
averaging or pooling the sequence of hidden-states for the whole input sequence.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for the output of the embeddings + 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 initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>tf.Tensor</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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ft=new vt({props:{$$slots:{default:[rn]},$$scope:{ctx:B}}}),te=new ue({props:{title:"TFBlipForConditionalGeneration",local:"transformers.TFBlipForConditionalGeneration",headingTag:"h2"}}),be=new j({props:{name:"class transformers.TFBlipForConditionalGeneration",anchor:"transformers.TFBlipForConditionalGeneration",parameters:[{name:"config",val:": BlipConfig"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBlipForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/blip#transformers.BlipConfig">BlipConfig</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/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_tf_blip.py#L1084"}}),z=new j({props:{name:"call",anchor:"transformers.TFBlipForConditionalGeneration.call",parameters:[{name:"pixel_values",val:": tf.Tensor"},{name:"input_ids",val:": tf.Tensor | None = None"},{name:"attention_mask",val:": tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"labels",val:": tf.Tensor | None = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.TFBlipForConditionalGeneration.call.pixel_values",description:`<strong>pixel_values</strong> (<code>tf.Tensor</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/main/en/model_doc/blip#transformers.BlipImageProcessor">BlipImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/deit#transformers.DeiTFeatureExtractor.__call__">BlipImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFBlipForConditionalGeneration.call.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.TFBlipForConditionalGeneration.call.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.TFBlipForConditionalGeneration.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_tf_blip.py#L1111",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.blip.modeling_tf_blip.TFBlipForConditionalGenerationModelOutput</code> or a tuple of <code>tf.Tensor</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.blip.configuration_blip.BlipConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code>, <em>optional</em>, returned when <code>labels</code> is provided, <code>tf.Tensor</code> of shape <code>(1,)</code>) — Languge modeling loss from the text decoder.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>, <em>optional</em>) — Prediction scores of the language modeling head of the text decoder model.</p>
</li>
<li>
<p><strong>image_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, output_dim)</code>, <em>optional</em>) — The image embeddings obtained after applying the Vision Transformer model to the input image.</p>
</li>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code>) — Tuple of <code>tf.Tensor</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(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed) — Tuple of <code>tf.Tensor</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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.blip.modeling_tf_blip.TFBlipForConditionalGenerationModelOutput</code> or <code>tuple(tf.Tensor)</code></p>
`}}),Fe=new vt({props:{$$slots:{default:[an]},$$scope:{ctx:B}}}),ft=new wt({props:{anchor:"transformers.TFBlipForConditionalGeneration.call.example",$$slots:{default:[ln]},$$scope:{ctx:B}}}),Ae=new ue({props:{title:"TFBlipForImageTextRetrieval",local:"transformers.TFBlipForImageTextRetrieval",headingTag:"h2"}}),H=new j({props:{name:"class transformers.TFBlipForImageTextRetrieval",anchor:"transformers.TFBlipForImageTextRetrieval",parameters:[{name:"config",val:": BlipConfig"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBlipForImageTextRetrieval.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/blip#transformers.BlipConfig">BlipConfig</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/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_tf_blip.py#L1530"}}),G=new j({props:{name:"call",anchor:"transformers.TFBlipForImageTextRetrieval.call",parameters:[{name:"input_ids",val:": tf.Tensor"},{name:"pixel_values",val:": tf.Tensor | None = None"},{name:"use_itm_head",val:": Optional[bool] = True"},{name:"attention_mask",val:": tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.TFBlipForImageTextRetrieval.call.pixel_values",description:`<strong>pixel_values</strong> (<code>tf.Tensor</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/main/en/model_doc/blip#transformers.BlipImageProcessor">BlipImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/deit#transformers.DeiTFeatureExtractor.__call__">BlipImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFBlipForImageTextRetrieval.call.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.TFBlipForImageTextRetrieval.call.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.TFBlipForImageTextRetrieval.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_tf_blip.py#L1582",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.blip.modeling_tf_blip.TFBlipImageTextMatchingModelOutput</code> or a tuple of <code>tf.Tensor</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.blip.configuration_blip.BlipVisionConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>itm_score</strong> (<code>tf.Tensor</code>) — The image-text similarity scores.</p>
</li>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) — Languge modeling loss from the text decoder.</p>
</li>
<li>
<p><strong>image_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, output_dim)</code> <em>optional</em> returned when model is initialized with <code>with_projection=True</code>) — The image embeddings obtained by applying the projection layer to the pooler_output.</p>
</li>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</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>hidden_states</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</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>vision_pooler_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>, <em>optional</em>) — Last layer hidden-state of the vision of the vision-only branch of the model.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>tf.Tensor</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>
<li>
<p><strong>question_embeds</strong> (<code>tf.Tensor</code>) — The question embeddings obtained by the text projection layer.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.blip.modeling_tf_blip.TFBlipImageTextMatchingModelOutput</code> or <code>tuple(tf.Tensor)</code></p>
`}}),_t=new vt({props:{$$slots:{default:[dn]},$$scope:{ctx:B}}}),ye=new wt({props:{anchor:"transformers.TFBlipForImageTextRetrieval.call.example",$$slots:{default:[cn]},$$scope:{ctx:B}}}),He=new ue({props:{title:"TFBlipForQuestionAnswering",local:"transformers.TFBlipForQuestionAnswering",headingTag:"h2"}}),A=new j({props:{name:"class transformers.TFBlipForQuestionAnswering",anchor:"transformers.TFBlipForQuestionAnswering",parameters:[{name:"config",val:": BlipConfig"},{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBlipForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/blip#transformers.BlipConfig">BlipConfig</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/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_tf_blip.py#L1275"}}),k=new j({props:{name:"call",anchor:"transformers.TFBlipForQuestionAnswering.call",parameters:[{name:"input_ids",val:": tf.Tensor"},{name:"pixel_values",val:": tf.Tensor | None = None"},{name:"decoder_input_ids",val:": tf.Tensor | None = None"},{name:"decoder_attention_mask",val:": tf.Tensor | None = None"},{name:"attention_mask",val:": tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"labels",val:": tf.Tensor | None = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.TFBlipForQuestionAnswering.call.pixel_values",description:`<strong>pixel_values</strong> (<code>tf.Tensor</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/main/en/model_doc/blip#transformers.BlipImageProcessor">BlipImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/deit#transformers.DeiTFeatureExtractor.__call__">BlipImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.TFBlipForQuestionAnswering.call.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.TFBlipForQuestionAnswering.call.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.TFBlipForQuestionAnswering.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/modeling_tf_blip.py#L1326",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.blip.modeling_tf_blip.TFBlipTextVisionModelOutput</code> or a tuple of <code>tf.Tensor</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.blip.configuration_blip.BlipVisionConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) — Languge modeling loss from the text decoder.</p>
</li>
<li>
<p><strong>image_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, output_dim)</code> <em>optional</em> returned when model is initialized with <code>with_projection=True</code>) — The image embeddings obtained by applying the projection layer to the pooler_output.</p>
</li>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</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>hidden_states</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</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(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>tf.Tensor</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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.blip.modeling_tf_blip.TFBlipTextVisionModelOutput</code> or <code>tuple(tf.Tensor)</code></p>
`}}),Me=new vt({props:{$$slots:{default:[pn]},$$scope:{ctx:B}}}),Oe=new wt({props:{anchor:"transformers.TFBlipForQuestionAnswering.call.example",$$slots:{default:[mn]},$$scope:{ctx:B}}}),{c(){h(t.$$.fragment),f=a(),n=c("div"),h(r.$$.fragment),M=a(),o=c("div"),h(w.$$.fragment),Yt=a(),de=c("p"),de.innerHTML=$o,At=a(),h(oe.$$.fragment),bo=a(),h(Ee.$$.fragment),Ze=a(),Ne=c("div"),h(Ke.$$.fragment),O=a(),Xe=c("p"),Xe.innerHTML=eo,Pe=a(),h(Bt.$$.fragment),Dt=a(),h(S.$$.fragment),po=a(),q=c("div"),h(we.$$.fragment),$e=a(),Be=c("p"),Be.innerHTML=xt,ct=a(),h(xe.$$.fragment),mo=a(),h(se.$$.fragment),et=a(),h(ce.$$.fragment),K=a(),F=c("div"),h(Je.$$.fragment),Jt=a(),tt=c("p"),tt.innerHTML=To,jt=a(),re=c("div"),h(pt.$$.fragment),pe=a(),mt=c("p"),mt.innerHTML=je,ot=a(),h(ee.$$.fragment),Ie=a(),h(It.$$.fragment),nt=a(),_e=c("div"),h(st.$$.fragment),V=a(),E=c("div"),h(gt.$$.fragment),Se=a(),Ot=c("p"),Ot.innerHTML=go,Qe=a(),h(Ft.$$.fragment),Ht=a(),h(te.$$.fragment),Ct=a(),I=c("div"),h(be.$$.fragment),me=a(),Q=c("p"),Q.innerHTML=zt,Ut=a(),rt=c("p"),rt.innerHTML=yo,kt=a(),Ve=c("p"),Ve.innerHTML=to,Te=a(),ae=c("div"),h(z.$$.fragment),at=a(),X=c("p"),X.innerHTML=Ye,fo=a(),h(Fe.$$.fragment),Gt=a(),h(ft.$$.fragment),ht=a(),h(Ae.$$.fragment),oo=a(),R=c("div"),h(H.$$.fragment),ut=a(),De=c("p"),De.textContent=Kt,ho=a(),Ce=c("p"),Ce.innerHTML=ze,no=a(),ie=c("p"),ie.innerHTML=uo,it=a(),Y=c("div"),h(G.$$.fragment),ne=a(),Re=c("p"),Re.innerHTML=Lt,qt=a(),h(_t.$$.fragment),Wt=a(),h(ye.$$.fragment),lt=a(),h(He.$$.fragment),Zt=a(),le=c("div"),h(A.$$.fragment),Ue=a(),bt=c("p"),bt.textContent=ge,Nt=a(),Pt=c("p"),Pt.innerHTML=Ge,_o=a(),ke=c("p"),ke.innerHTML=dt,We=a(),fe=c("div"),h(k.$$.fragment),Vt=a(),Tt=c("p"),Tt.innerHTML=Le,so=a(),h(Me.$$.fragment),yt=a(),h(Oe.$$.fragment),this.h()},l(e){u(t.$$.fragment,e),f=i(e),n=p(e,"DIV",{class:!0});var m=x(n);u(r.$$.fragment,m),M=i(m),o=p(m,"DIV",{class:!0});var Z=x(o);u(w.$$.fragment,Z),Yt=i(Z),de=p(Z,"P",{"data-svelte-h":!0}),v(de)!=="svelte-dbmome"&&(de.innerHTML=$o),At=i(Z),u(oe.$$.fragment,Z),bo=i(Z),u(Ee.$$.fragment,Z),Z.forEach(l),Ze=i(m),Ne=p(m,"DIV",{class:!0});var C=x(Ne);u(Ke.$$.fragment,C),O=i(C),Xe=p(C,"P",{"data-svelte-h":!0}),v(Xe)!=="svelte-dbmome"&&(Xe.innerHTML=eo),Pe=i(C),u(Bt.$$.fragment,C),Dt=i(C),u(S.$$.fragment,C),C.forEach(l),po=i(m),q=p(m,"DIV",{class:!0});var U=x(q);u(we.$$.fragment,U),$e=i(U),Be=p(U,"P",{"data-svelte-h":!0}),v(Be)!=="svelte-dbmome"&&(Be.innerHTML=xt),ct=i(U),u(xe.$$.fragment,U),mo=i(U),u(se.$$.fragment,U),U.forEach(l),m.forEach(l),et=i(e),u(ce.$$.fragment,e),K=i(e),F=p(e,"DIV",{class:!0});var D=x(F);u(Je.$$.fragment,D),Jt=i(D),tt=p(D,"P",{"data-svelte-h":!0}),v(tt)!=="svelte-ehxhk2"&&(tt.innerHTML=To),jt=i(D),re=p(D,"DIV",{class:!0});var L=x(re);u(pt.$$.fragment,L),pe=i(L),mt=p(L,"P",{"data-svelte-h":!0}),v(mt)!=="svelte-1x711ba"&&(mt.innerHTML=je),ot=i(L),u(ee.$$.fragment,L),L.forEach(l),D.forEach(l),Ie=i(e),u(It.$$.fragment,e),nt=i(e),_e=p(e,"DIV",{class:!0});var Mt=x(_e);u(st.$$.fragment,Mt),V=i(Mt),E=p(Mt,"DIV",{class:!0});var qe=x(E);u(gt.$$.fragment,qe),Se=i(qe),Ot=p(qe,"P",{"data-svelte-h":!0}),v(Ot)!=="svelte-13v7r1a"&&(Ot.innerHTML=go),Qe=i(qe),u(Ft.$$.fragment,qe),qe.forEach(l),Mt.forEach(l),Ht=i(e),u(te.$$.fragment,e),Ct=i(e),I=p(e,"DIV",{class:!0});var N=x(I);u(be.$$.fragment,N),me=i(N),Q=p(N,"P",{"data-svelte-h":!0}),v(Q)!=="svelte-u9sua2"&&(Q.innerHTML=zt),Ut=i(N),rt=p(N,"P",{"data-svelte-h":!0}),v(rt)!=="svelte-1qaxm70"&&(rt.innerHTML=yo),kt=i(N),Ve=p(N,"P",{"data-svelte-h":!0}),v(Ve)!=="svelte-1be7e3c"&&(Ve.innerHTML=to),Te=i(N),ae=p(N,"DIV",{class:!0});var ve=x(ae);u(z.$$.fragment,ve),at=i(ve),X=p(ve,"P",{"data-svelte-h":!0}),v(X)!=="svelte-o2b8yu"&&(X.innerHTML=Ye),fo=i(ve),u(Fe.$$.fragment,ve),Gt=i(ve),u(ft.$$.fragment,ve),ve.forEach(l),N.forEach(l),ht=i(e),u(Ae.$$.fragment,e),oo=i(e),R=p(e,"DIV",{class:!0});var P=x(R);u(H.$$.fragment,P),ut=i(P),De=p(P,"P",{"data-svelte-h":!0}),v(De)!=="svelte-1cwza0e"&&(De.textContent=Kt),ho=i(P),Ce=p(P,"P",{"data-svelte-h":!0}),v(Ce)!=="svelte-1qaxm70"&&(Ce.innerHTML=ze),no=i(P),ie=p(P,"P",{"data-svelte-h":!0}),v(ie)!=="svelte-1be7e3c"&&(ie.innerHTML=uo),it=i(P),Y=p(P,"DIV",{class:!0});var he=x(Y);u(G.$$.fragment,he),ne=i(he),Re=p(he,"P",{"data-svelte-h":!0}),v(Re)!=="svelte-yeqdw6"&&(Re.innerHTML=Lt),qt=i(he),u(_t.$$.fragment,he),Wt=i(he),u(ye.$$.fragment,he),he.forEach(l),P.forEach(l),lt=i(e),u(He.$$.fragment,e),Zt=i(e),le=p(e,"DIV",{class:!0});var d=x(le);u(A.$$.fragment,d),Ue=i(d),bt=p(d,"P",{"data-svelte-h":!0}),v(bt)!=="svelte-tf7otj"&&(bt.textContent=ge),Nt=i(d),Pt=p(d,"P",{"data-svelte-h":!0}),v(Pt)!=="svelte-1qaxm70"&&(Pt.innerHTML=Ge),_o=i(d),ke=p(d,"P",{"data-svelte-h":!0}),v(ke)!=="svelte-1be7e3c"&&(ke.innerHTML=dt),We=i(d),fe=p(d,"DIV",{class:!0});var $=x(fe);u(k.$$.fragment,$),Vt=i($),Tt=p($,"P",{"data-svelte-h":!0}),v(Tt)!=="svelte-9dpxsq"&&(Tt.innerHTML=Le),so=i($),u(Me.$$.fragment,$),yt=i($),u(Oe.$$.fragment,$),$.forEach(l),d.forEach(l),this.h()},h(){J(o,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(Ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(n,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(le,"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,m){_(t,e,m),g(e,f,m),g(e,n,m),_(r,n,null),s(n,M),s(n,o),_(w,o,null),s(o,Yt),s(o,de),s(o,At),_(oe,o,null),s(o,bo),_(Ee,o,null),s(n,Ze),s(n,Ne),_(Ke,Ne,null),s(Ne,O),s(Ne,Xe),s(Ne,Pe),_(Bt,Ne,null),s(Ne,Dt),_(S,Ne,null),s(n,po),s(n,q),_(we,q,null),s(q,$e),s(q,Be),s(q,ct),_(xe,q,null),s(q,mo),_(se,q,null),g(e,et,m),_(ce,e,m),g(e,K,m),g(e,F,m),_(Je,F,null),s(F,Jt),s(F,tt),s(F,jt),s(F,re),_(pt,re,null),s(re,pe),s(re,mt),s(re,ot),_(ee,re,null),g(e,Ie,m),_(It,e,m),g(e,nt,m),g(e,_e,m),_(st,_e,null),s(_e,V),s(_e,E),_(gt,E,null),s(E,Se),s(E,Ot),s(E,Qe),_(Ft,E,null),g(e,Ht,m),_(te,e,m),g(e,Ct,m),g(e,I,m),_(be,I,null),s(I,me),s(I,Q),s(I,Ut),s(I,rt),s(I,kt),s(I,Ve),s(I,Te),s(I,ae),_(z,ae,null),s(ae,at),s(ae,X),s(ae,fo),_(Fe,ae,null),s(ae,Gt),_(ft,ae,null),g(e,ht,m),_(Ae,e,m),g(e,oo,m),g(e,R,m),_(H,R,null),s(R,ut),s(R,De),s(R,ho),s(R,Ce),s(R,no),s(R,ie),s(R,it),s(R,Y),_(G,Y,null),s(Y,ne),s(Y,Re),s(Y,qt),_(_t,Y,null),s(Y,Wt),_(ye,Y,null),g(e,lt,m),_(He,e,m),g(e,Zt,m),g(e,le,m),_(A,le,null),s(le,Ue),s(le,bt),s(le,Nt),s(le,Pt),s(le,_o),s(le,ke),s(le,We),s(le,fe),_(k,fe,null),s(fe,Vt),s(fe,Tt),s(fe,so),_(Me,fe,null),s(fe,yt),_(Oe,fe,null),Et=!0},p(e,m){const Z={};m&2&&(Z.$$scope={dirty:m,ctx:e}),oe.$set(Z);const C={};m&2&&(C.$$scope={dirty:m,ctx:e}),Ee.$set(C);const U={};m&2&&(U.$$scope={dirty:m,ctx:e}),Bt.$set(U);const D={};m&2&&(D.$$scope={dirty:m,ctx:e}),S.$set(D);const L={};m&2&&(L.$$scope={dirty:m,ctx:e}),xe.$set(L);const Mt={};m&2&&(Mt.$$scope={dirty:m,ctx:e}),se.$set(Mt);const qe={};m&2&&(qe.$$scope={dirty:m,ctx:e}),ee.$set(qe);const N={};m&2&&(N.$$scope={dirty:m,ctx:e}),Ft.$set(N);const ve={};m&2&&(ve.$$scope={dirty:m,ctx:e}),Fe.$set(ve);const P={};m&2&&(P.$$scope={dirty:m,ctx:e}),ft.$set(P);const he={};m&2&&(he.$$scope={dirty:m,ctx:e}),_t.$set(he);const d={};m&2&&(d.$$scope={dirty:m,ctx:e}),ye.$set(d);const $={};m&2&&($.$$scope={dirty:m,ctx:e}),Me.$set($);const Rt={};m&2&&(Rt.$$scope={dirty:m,ctx:e}),Oe.$set(Rt)},i(e){Et||(b(t.$$.fragment,e),b(r.$$.fragment,e),b(w.$$.fragment,e),b(oe.$$.fragment,e),b(Ee.$$.fragment,e),b(Ke.$$.fragment,e),b(Bt.$$.fragment,e),b(S.$$.fragment,e),b(we.$$.fragment,e),b(xe.$$.fragment,e),b(se.$$.fragment,e),b(ce.$$.fragment,e),b(Je.$$.fragment,e),b(pt.$$.fragment,e),b(ee.$$.fragment,e),b(It.$$.fragment,e),b(st.$$.fragment,e),b(gt.$$.fragment,e),b(Ft.$$.fragment,e),b(te.$$.fragment,e),b(be.$$.fragment,e),b(z.$$.fragment,e),b(Fe.$$.fragment,e),b(ft.$$.fragment,e),b(Ae.$$.fragment,e),b(H.$$.fragment,e),b(G.$$.fragment,e),b(_t.$$.fragment,e),b(ye.$$.fragment,e),b(He.$$.fragment,e),b(A.$$.fragment,e),b(k.$$.fragment,e),b(Me.$$.fragment,e),b(Oe.$$.fragment,e),Et=!0)},o(e){T(t.$$.fragment,e),T(r.$$.fragment,e),T(w.$$.fragment,e),T(oe.$$.fragment,e),T(Ee.$$.fragment,e),T(Ke.$$.fragment,e),T(Bt.$$.fragment,e),T(S.$$.fragment,e),T(we.$$.fragment,e),T(xe.$$.fragment,e),T(se.$$.fragment,e),T(ce.$$.fragment,e),T(Je.$$.fragment,e),T(pt.$$.fragment,e),T(ee.$$.fragment,e),T(It.$$.fragment,e),T(st.$$.fragment,e),T(gt.$$.fragment,e),T(Ft.$$.fragment,e),T(te.$$.fragment,e),T(be.$$.fragment,e),T(z.$$.fragment,e),T(Fe.$$.fragment,e),T(ft.$$.fragment,e),T(Ae.$$.fragment,e),T(H.$$.fragment,e),T(G.$$.fragment,e),T(_t.$$.fragment,e),T(ye.$$.fragment,e),T(He.$$.fragment,e),T(A.$$.fragment,e),T(k.$$.fragment,e),T(Me.$$.fragment,e),T(Oe.$$.fragment,e),Et=!1},d(e){e&&(l(f),l(n),l(et),l(K),l(F),l(Ie),l(nt),l(_e),l(Ht),l(Ct),l(I),l(ht),l(oo),l(R),l(lt),l(Zt),l(le)),y(t,e),y(r),y(w),y(oe),y(Ee),y(Ke),y(Bt),y(S),y(we),y(xe),y(se),y(ce,e),y(Je),y(pt),y(ee),y(It,e),y(st),y(gt),y(Ft),y(te,e),y(be),y(z),y(Fe),y(ft),y(Ae,e),y(H),y(G),y(_t),y(ye),y(He,e),y(A),y(k),y(Me),y(Oe)}}}function fn(B){let t,f;return t=new xo({props:{$$slots:{default:[gn]},$$scope:{ctx:B}}}),{c(){h(t.$$.fragment)},l(n){u(t.$$.fragment,n)},m(n,r){_(t,n,r),f=!0},p(n,r){const M={};r&2&&(M.$$scope={dirty:r,ctx:n}),t.$set(M)},i(n){f||(b(t.$$.fragment,n),f=!0)},o(n){T(t.$$.fragment,n),f=!1},d(n){y(t,n)}}}function hn(B){let t,f,n,r,M,o,w,Yt,de,$o='The BLIP model was proposed in <a href="https://arxiv.org/abs/2201.12086" rel="nofollow">BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation</a> by Junnan Li, Dongxu Li, Caiming Xiong, Steven Hoi.',At,oe,bo="BLIP is a model that is able to perform various multi-modal tasks including:",Ee,Ze,Ne="<li>Visual Question Answering</li> <li>Image-Text retrieval (Image-text matching)</li> <li>Image Captioning</li>",Ke,O,Xe="The abstract from the paper is the following:",eo,Pe,Bt=`<em>Vision-Language Pre-training (VLP) has advanced the performance for many vision-language tasks.
However, most existing pre-trained models only excel in either understanding-based tasks or generation-based tasks. Furthermore, performance improvement has been largely achieved by scaling up the dataset with noisy image-text pairs collected from the web, which is a suboptimal source of supervision. In this paper, we propose BLIP, a new VLP framework which transfers flexibly to both vision-language understanding and generation tasks. BLIP effectively utilizes the noisy web data by bootstrapping the captions, where a captioner generates synthetic captions and a filter removes the noisy ones. We achieve state-of-the-art results on a wide range of vision-language tasks, such as image-text retrieval (+2.7% in average recall@1), image captioning (+2.8% in CIDEr), and VQA (+1.6% in VQA score). BLIP also demonstrates strong generalization ability when directly transferred to videolanguage tasks in a zero-shot manner. Code, models, and datasets are released.</em>`,Dt,S,po='<img src="https://cdn-uploads.huggingface.co/production/uploads/1670928184033-62441d1d9fdefb55a0b7d12c.gif" alt="BLIP.gif"/>',q,we,$e=`This model was contributed by <a href="https://huggingface.co/ybelkada" rel="nofollow">ybelkada</a>.
The original code can be found <a href="https://github.com/salesforce/BLIP" rel="nofollow">here</a>.`,Be,xt,ct,xe,mo='<li><a href="https://github.com/huggingface/notebooks/blob/main/examples/image_captioning_blip.ipynb" rel="nofollow">Jupyter notebook</a> on how to fine-tune BLIP for image captioning on a custom dataset</li>',se,et,ce,K,F,Je,Jt,tt=`<a href="/docs/transformers/main/en/model_doc/blip#transformers.BlipConfig">BlipConfig</a> is the configuration class to store the configuration of a <a href="/docs/transformers/main/en/model_doc/blip#transformers.BlipModel">BlipModel</a>. It is used to instantiate
a BLIP 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 BLIP-base
<a href="https://huggingface.co/Salesforce/blip-vqa-base" rel="nofollow">Salesforce/blip-vqa-base</a> architecture.`,To,jt,re=`Configuration objects inherit from <a href="/docs/transformers/main/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/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,pt,pe,mt,je,ot,ee,Ie,It=`Instantiate a <a href="/docs/transformers/main/en/model_doc/blip#transformers.BlipConfig">BlipConfig</a> (or a derived class) from blip text model configuration and blip vision model
configuration.`,nt,_e,st,V,E,gt,Se,Ot=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/en/model_doc/blip#transformers.BlipTextModel">BlipTextModel</a>. It is used to instantiate a BLIP
text 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 <code>BlipText</code> used by the <a href="https://huggingface.co/Salesforce/blip-vqa-base" rel="nofollow">base
architectures</a>.`,go,Qe,Ft=`Configuration objects inherit from <a href="/docs/transformers/main/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/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Ht,te,Ct,I,be,me,Q,zt,Ut,rt=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/en/model_doc/blip#transformers.BlipVisionModel">BlipVisionModel</a>. It is used to instantiate a
BLIP vision model according to the specified arguments, defining the model architecture. Instantiating a
configuration defaults will yield a similar configuration to that of the Blip-base
<a href="https://huggingface.co/Salesforce/blip-vqa-base" rel="nofollow">Salesforce/blip-vqa-base</a> architecture.`,yo,kt,Ve=`Configuration objects inherit from <a href="/docs/transformers/main/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/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,to,Te,ae,z,at,X,Ye,fo,Fe,Gt="Constructs a BLIP processor which wraps a BERT tokenizer and BLIP image processor into a single processor.",ft,ht,Ae=`<a href="/docs/transformers/main/en/model_doc/blip#transformers.BlipProcessor">BlipProcessor</a> offers all the functionalities of <a href="/docs/transformers/main/en/model_doc/blip#transformers.BlipImageProcessor">BlipImageProcessor</a> and <a href="/docs/transformers/main/en/model_doc/bert#transformers.BertTokenizerFast">BertTokenizerFast</a>. See the
docstring of <code>__call__()</code> and <a href="/docs/transformers/main/en/model_doc/blip#transformers.BlipProcessor.decode">decode()</a> for more information.`,oo,R,H,ut,De,Kt=`This method forwards all its arguments to BertTokenizerFast’s <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode">batch_decode()</a>. Please
refer to the docstring of this method for more information.`,ho,Ce,ze,no,ie,uo=`This method forwards all its arguments to BertTokenizerFast’s <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode">decode()</a>. Please refer to
the docstring of this method for more information.`,it,Y,G,ne,Re,Lt,qt,_t="Constructs a BLIP image processor.",Wt,ye,lt,He,Zt,le="Preprocess an image or batch of images.",A,Ue,bt,ge,Nt,Pt,Ge,_o="Constructs a fast BLIP image processor.",ke,dt,We,fe,k,Vt="Preprocess an image or batch of images.",Tt,Le,so,Me,yt,Oe,Et;return M=new ue({props:{title:"BLIP",local:"blip",headingTag:"h1"}}),w=new ue({props:{title:"Overview",local:"overview",headingTag:"h2"}}),xt=new ue({props:{title:"Resources",local:"resources",headingTag:"h2"}}),et=new ue({props:{title:"BlipConfig",local:"transformers.BlipConfig",headingTag:"h2"}}),F=new j({props:{name:"class transformers.BlipConfig",anchor:"transformers.BlipConfig",parameters:[{name:"text_config",val:" = None"},{name:"vision_config",val:" = None"},{name:"projection_dim",val:" = 512"},{name:"logit_scale_init_value",val:" = 2.6592"},{name:"image_text_hidden_size",val:" = 256"},{name:"label_smoothing",val:" = 0.0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BlipConfig.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/main/en/model_doc/blip#transformers.BlipTextConfig">BlipTextConfig</a>.`,name:"text_config"},{anchor:"transformers.BlipConfig.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/main/en/model_doc/blip#transformers.BlipVisionConfig">BlipVisionConfig</a>.`,name:"vision_config"},{anchor:"transformers.BlipConfig.projection_dim",description:`<strong>projection_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimensionality of text and vision projection layers.`,name:"projection_dim"},{anchor:"transformers.BlipConfig.logit_scale_init_value",description:`<strong>logit_scale_init_value</strong> (<code>float</code>, <em>optional</em>, defaults to 2.6592) &#x2014;
The initial value of the <em>logit_scale</em> parameter. Default is used as per the original BLIP implementation.`,name:"logit_scale_init_value"},{anchor:"transformers.BlipConfig.image_text_hidden_size",description:`<strong>image_text_hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimensionality of the hidden state of the image-text fusion layer.`,name:"image_text_hidden_size"},{anchor:"transformers.BlipConfig.label_smoothing",description:`<strong>label_smoothing</strong> (float, optional, <em>optional</em>, defaults to 0.0) &#x2014;
A float in [0.0, 1.0]. Specifies the amount of smoothing when computing the loss, where 0.0 means no smoothing. The targets
become a mixture of the original ground truth and a uniform distribution as described in
<code>Rethinking the Inception Architecture for Computer Vision &lt;https://arxiv.org/abs/1512.00567&gt;</code>__. Default: :math:<code>0.0</code>.`,name:"label_smoothing"},{anchor:"transformers.BlipConfig.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Dictionary of keyword arguments.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/configuration_blip.py#L230"}}),pe=new wt({props:{anchor:"transformers.BlipConfig.example",$$slots:{default:[ko]},$$scope:{ctx:B}}}),ot=new j({props:{name:"from_text_vision_configs",anchor:"transformers.BlipConfig.from_text_vision_configs",parameters:[{name:"text_config",val:": BlipTextConfig"},{name:"vision_config",val:": BlipVisionConfig"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/configuration_blip.py#L316",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>An instance of a configuration object</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/en/model_doc/blip#transformers.BlipConfig"
>BlipConfig</a></p>
`}}),_e=new ue({props:{title:"BlipTextConfig",local:"transformers.BlipTextConfig",headingTag:"h2"}}),E=new j({props:{name:"class transformers.BlipTextConfig",anchor:"transformers.BlipTextConfig",parameters:[{name:"vocab_size",val:" = 30524"},{name:"hidden_size",val:" = 768"},{name:"encoder_hidden_size",val:" = 768"},{name:"intermediate_size",val:" = 3072"},{name:"projection_dim",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 8"},{name:"max_position_embeddings",val:" = 512"},{name:"hidden_act",val:" = 'gelu'"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"hidden_dropout_prob",val:" = 0.0"},{name:"attention_probs_dropout_prob",val:" = 0.0"},{name:"initializer_range",val:" = 0.02"},{name:"bos_token_id",val:" = 30522"},{name:"eos_token_id",val:" = 2"},{name:"pad_token_id",val:" = 0"},{name:"sep_token_id",val:" = 102"},{name:"is_decoder",val:" = True"},{name:"use_cache",val:" = True"},{name:"label_smoothing",val:" = 0.0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BlipTextConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30524) &#x2014;
Vocabulary size of the <code>Blip</code> 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/main/en/model_doc/blip#transformers.BlipModel">BlipModel</a>.`,name:"vocab_size"},{anchor:"transformers.BlipTextConfig.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.BlipTextConfig.encoder_hidden_size",description:`<strong>encoder_hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers from the vision model.`,name:"encoder_hidden_size"},{anchor:"transformers.BlipTextConfig.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.BlipTextConfig.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.BlipTextConfig.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.BlipTextConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#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.BlipTextConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;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;gelu&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.BlipTextConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.BlipTextConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.BlipTextConfig.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.BlipTextConfig.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.BlipTextConfig.bos_token_id",description:`<strong>bos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
The id of the <code>beginning-of-sequence</code> token.`,name:"bos_token_id"},{anchor:"transformers.BlipTextConfig.eos_token_id",description:`<strong>eos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The id of the <code>end-of-sequence</code> token.`,name:"eos_token_id"},{anchor:"transformers.BlipTextConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The id of the <code>padding</code> token.`,name:"pad_token_id"},{anchor:"transformers.BlipTextConfig.sep_token_id",description:`<strong>sep_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 102) &#x2014;
The id of the <code>separator</code> token.`,name:"sep_token_id"},{anchor:"transformers.BlipTextConfig.is_decoder",description:`<strong>is_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether the model is used as a decoder.`,name:"is_decoder"},{anchor:"transformers.BlipTextConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models).`,name:"use_cache"},{anchor:"transformers.BlipTextConfig.label_smoothing",description:`<strong>label_smoothing</strong> (float, <em>optional</em>) &#x2014;
A float in [0.0, 1.0]. Specifies the amount of smoothing when computing the loss, where 0.0 means no smoothing. The targets
become a mixture of the original ground truth and a uniform distribution as described in
<code>Rethinking the Inception Architecture for Computer Vision &lt;https://arxiv.org/abs/1512.00567&gt;</code>__. Default: :math:<code>0.0</code>.`,name:"label_smoothing"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/configuration_blip.py#L24"}}),te=new wt({props:{anchor:"transformers.BlipTextConfig.example",$$slots:{default:[Wo]},$$scope:{ctx:B}}}),I=new ue({props:{title:"BlipVisionConfig",local:"transformers.BlipVisionConfig",headingTag:"h2"}}),Q=new j({props:{name:"class transformers.BlipVisionConfig",anchor:"transformers.BlipVisionConfig",parameters:[{name:"hidden_size",val:" = 768"},{name:"intermediate_size",val:" = 3072"},{name:"projection_dim",val:" = 512"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"image_size",val:" = 384"},{name:"patch_size",val:" = 16"},{name:"hidden_act",val:" = 'gelu'"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"attention_dropout",val:" = 0.0"},{name:"initializer_range",val:" = 1e-10"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BlipVisionConfig.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.BlipVisionConfig.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.BlipVisionConfig.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.BlipVisionConfig.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.BlipVisionConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 384) &#x2014;
The size (resolution) of each image.`,name:"image_size"},{anchor:"transformers.BlipVisionConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
The size (resolution) of each patch.`,name:"patch_size"},{anchor:"transformers.BlipVisionConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;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;gelu&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.BlipVisionConfig.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.BlipVisionConfig.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.BlipVisionConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-10) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/configuration_blip.py#L148"}}),Te=new wt({props:{anchor:"transformers.BlipVisionConfig.example",$$slots:{default:[Zo]},$$scope:{ctx:B}}}),z=new ue({props:{title:"BlipProcessor",local:"transformers.BlipProcessor",headingTag:"h2"}}),Ye=new j({props:{name:"class transformers.BlipProcessor",anchor:"transformers.BlipProcessor",parameters:[{name:"image_processor",val:""},{name:"tokenizer",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BlipProcessor.image_processor",description:`<strong>image_processor</strong> (<code>BlipImageProcessor</code>) &#x2014;
An instance of <a href="/docs/transformers/main/en/model_doc/blip#transformers.BlipImageProcessor">BlipImageProcessor</a>. The image processor is a required input.`,name:"image_processor"},{anchor:"transformers.BlipProcessor.tokenizer",description:"<strong>tokenizer</strong> (<code>BertTokenizerFast</code>) &#x2014;\nAn instance of [&#x2018;BertTokenizerFast`]. The tokenizer is a required input.",name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/processing_blip.py#L43"}}),H=new j({props:{name:"batch_decode",anchor:"transformers.BlipProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/processing_blip.py#L118"}}),ze=new j({props:{name:"decode",anchor:"transformers.BlipProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/processing_blip.py#L125"}}),Y=new ue({props:{title:"BlipImageProcessor",local:"transformers.BlipImageProcessor",headingTag:"h2"}}),Re=new j({props:{name:"class transformers.BlipImageProcessor",anchor:"transformers.BlipImageProcessor",parameters:[{name:"do_resize",val:": bool = True"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": Resampling = <Resampling.BICUBIC: 3>"},{name:"do_rescale",val:": bool = True"},{name:"rescale_factor",val:": typing.Union[int, float] = 0.00392156862745098"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"do_convert_rgb",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BlipImageProcessor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize the image&#x2019;s (height, width) dimensions to the specified <code>size</code>. Can be overridden by the
<code>do_resize</code> parameter in the <code>preprocess</code> method.`,name:"do_resize"},{anchor:"transformers.BlipImageProcessor.size",description:`<strong>size</strong> (<code>dict</code>, <em>optional</em>, defaults to <code>{&quot;height&quot; -- 384, &quot;width&quot;: 384}</code>):
Size of the output image after resizing. Can be overridden by the <code>size</code> parameter in the <code>preprocess</code>
method.`,name:"size"},{anchor:"transformers.BlipImageProcessor.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>Resampling.BICUBIC</code>) &#x2014;
Resampling filter to use if resizing the image. Only has an effect if <code>do_resize</code> is set to <code>True</code>. Can be
overridden by the <code>resample</code> parameter in the <code>preprocess</code> method.`,name:"resample"},{anchor:"transformers.BlipImageProcessor.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to rescale the image by the specified scale <code>rescale_factor</code>. Can be overridden by the
<code>do_rescale</code> parameter in the <code>preprocess</code> method.`,name:"do_rescale"},{anchor:"transformers.BlipImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to <code>1/255</code>) &#x2014;
Scale factor to use if rescaling the image. Only has an effect if <code>do_rescale</code> is set to <code>True</code>. Can be
overridden by the <code>rescale_factor</code> parameter in the <code>preprocess</code> method.`,name:"rescale_factor"},{anchor:"transformers.BlipImageProcessor.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to normalize the image. Can be overridden by the <code>do_normalize</code> parameter in the <code>preprocess</code>
method. Can be overridden by the <code>do_normalize</code> parameter in the <code>preprocess</code> method.`,name:"do_normalize"},{anchor:"transformers.BlipImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_MEAN</code>) &#x2014;
Mean to use if normalizing the image. This is a float or list of floats the length of the number of
channels in the image. Can be overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method. Can be
overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method.`,name:"image_mean"},{anchor:"transformers.BlipImageProcessor.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_STD</code>) &#x2014;
Standard deviation to use if normalizing the image. This is a float or list of floats the length of the
number of channels in the image. Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.
Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.`,name:"image_std"},{anchor:"transformers.BlipImageProcessor.do_convert_rgb",description:`<strong>do_convert_rgb</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to convert the image to RGB.`,name:"do_convert_rgb"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/image_processing_blip.py#L46"}}),lt=new j({props:{name:"preprocess",anchor:"transformers.BlipImageProcessor.preprocess",parameters:[{name:"images",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), typing.List[ForwardRef('PIL.Image.Image')], typing.List[numpy.ndarray], typing.List[ForwardRef('torch.Tensor')]]"},{name:"do_resize",val:": typing.Optional[bool] = None"},{name:"size",val:": typing.Optional[typing.Dict[str, int]] = None"},{name:"resample",val:": Resampling = None"},{name:"do_rescale",val:": typing.Optional[bool] = None"},{name:"rescale_factor",val:": typing.Optional[float] = None"},{name:"do_normalize",val:": typing.Optional[bool] = None"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"do_convert_rgb",val:": bool = None"},{name:"data_format",val:": ChannelDimension = <ChannelDimension.FIRST: 'channels_first'>"},{name:"input_data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension, NoneType] = None"}],parametersDescription:[{anchor:"transformers.BlipImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to preprocess. Expects a single or batch of images with pixel values ranging from 0 to 255. If
passing in images with pixel values between 0 and 1, set <code>do_rescale=False</code>.`,name:"images"},{anchor:"transformers.BlipImageProcessor.preprocess.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_resize</code>) &#x2014;
Whether to resize the image.`,name:"do_resize"},{anchor:"transformers.BlipImageProcessor.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Controls the size of the image after <code>resize</code>. The shortest edge of the image is resized to
<code>size[&quot;shortest_edge&quot;]</code> whilst preserving the aspect ratio. If the longest edge of this resized image
is &gt; <code>int(size[&quot;shortest_edge&quot;] * (1333 / 800))</code>, then the image is resized again to make the longest
edge equal to <code>int(size[&quot;shortest_edge&quot;] * (1333 / 800))</code>.`,name:"size"},{anchor:"transformers.BlipImageProcessor.preprocess.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>self.resample</code>) &#x2014;
Resampling filter to use if resizing the image. Only has an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"resample"},{anchor:"transformers.BlipImageProcessor.preprocess.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_rescale</code>) &#x2014;
Whether to rescale the image values between [0 - 1].`,name:"do_rescale"},{anchor:"transformers.BlipImageProcessor.preprocess.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>self.rescale_factor</code>) &#x2014;
Rescale factor to rescale the image by if <code>do_rescale</code> is set to <code>True</code>.`,name:"rescale_factor"},{anchor:"transformers.BlipImageProcessor.preprocess.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_normalize</code>) &#x2014;
Whether to normalize the image.`,name:"do_normalize"},{anchor:"transformers.BlipImageProcessor.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_mean</code>) &#x2014;
Image mean to normalize the image by if <code>do_normalize</code> is set to <code>True</code>.`,name:"image_mean"},{anchor:"transformers.BlipImageProcessor.preprocess.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_std</code>) &#x2014;
Image standard deviation to normalize the image by if <code>do_normalize</code> is set to <code>True</code>.`,name:"image_std"},{anchor:"transformers.BlipImageProcessor.preprocess.do_convert_rgb",description:`<strong>do_convert_rgb</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_convert_rgb</code>) &#x2014;
Whether to convert the image to RGB.`,name:"do_convert_rgb"},{anchor:"transformers.BlipImageProcessor.preprocess.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>) &#x2014;
The type of tensors to return. Can be one of:<ul>
<li>Unset: Return a list of <code>np.ndarray</code>.</li>
<li><code>TensorType.TENSORFLOW</code> or <code>&apos;tf&apos;</code>: Return a batch of type <code>tf.Tensor</code>.</li>
<li><code>TensorType.PYTORCH</code> or <code>&apos;pt&apos;</code>: Return a batch of type <code>torch.Tensor</code>.</li>
<li><code>TensorType.NUMPY</code> or <code>&apos;np&apos;</code>: Return a batch of type <code>np.ndarray</code>.</li>
<li><code>TensorType.JAX</code> or <code>&apos;jax&apos;</code>: Return a batch of type <code>jax.numpy.ndarray</code>.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.BlipImageProcessor.preprocess.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>, defaults to <code>ChannelDimension.FIRST</code>) &#x2014;
The channel dimension format for the output image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li>Unset: Use the channel dimension format of the input image.</li>
</ul>`,name:"data_format"},{anchor:"transformers.BlipImageProcessor.preprocess.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>) &#x2014;
The channel dimension format for the input image. If unset, the channel dimension format is inferred
from the input image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li><code>&quot;none&quot;</code> or <code>ChannelDimension.NONE</code>: image in (height, width) format.</li>
</ul>`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/image_processing_blip.py#L159"}}),Ue=new ue({props:{title:"BlipImageProcessorFast",local:"transformers.BlipImageProcessorFast",headingTag:"h2"}}),Nt=new j({props:{name:"class transformers.BlipImageProcessorFast",anchor:"transformers.BlipImageProcessorFast",parameters:[{name:"**kwargs",val:": typing_extensions.Unpack[transformers.image_processing_utils_fast.DefaultFastImageProcessorInitKwargs]"}],parametersDescription:[{anchor:"transformers.BlipImageProcessorFast.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_resize</code>) &#x2014;
Whether to resize the image&#x2019;s (height, width) dimensions to the specified <code>size</code>. Can be overridden by the
<code>do_resize</code> parameter in the <code>preprocess</code> method.`,name:"do_resize"},{anchor:"transformers.BlipImageProcessorFast.size",description:`<strong>size</strong> (<code>dict</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Size of the output image after resizing. Can be overridden by the <code>size</code> parameter in the <code>preprocess</code>
method.`,name:"size"},{anchor:"transformers.BlipImageProcessorFast.default_to_square",description:`<strong>default_to_square</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.default_to_square</code>) &#x2014;
Whether to default to a square image when resizing, if size is an int.`,name:"default_to_square"},{anchor:"transformers.BlipImageProcessorFast.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>self.resample</code>) &#x2014;
Resampling filter to use if resizing the image. Only has an effect if <code>do_resize</code> is set to <code>True</code>. Can be
overridden by the <code>resample</code> parameter in the <code>preprocess</code> method.`,name:"resample"},{anchor:"transformers.BlipImageProcessorFast.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_center_crop</code>) &#x2014;
Whether to center crop the image to the specified <code>crop_size</code>. Can be overridden by <code>do_center_crop</code> in the
<code>preprocess</code> method.`,name:"do_center_crop"},{anchor:"transformers.BlipImageProcessorFast.crop_size",description:`<strong>crop_size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to <code>self.crop_size</code>) &#x2014;
Size of the output image after applying <code>center_crop</code>. Can be overridden by <code>crop_size</code> in the <code>preprocess</code>
method.`,name:"crop_size"},{anchor:"transformers.BlipImageProcessorFast.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_rescale</code>) &#x2014;
Whether to rescale the image by the specified scale <code>rescale_factor</code>. Can be overridden by the
<code>do_rescale</code> parameter in the <code>preprocess</code> method.`,name:"do_rescale"},{anchor:"transformers.BlipImageProcessorFast.rescale_factor",description:`<strong>rescale_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to <code>self.rescale_factor</code>) &#x2014;
Scale factor to use if rescaling the image. Only has an effect if <code>do_rescale</code> is set to <code>True</code>. Can be
overridden by the <code>rescale_factor</code> parameter in the <code>preprocess</code> method.`,name:"rescale_factor"},{anchor:"transformers.BlipImageProcessorFast.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_normalize</code>) &#x2014;
Whether to normalize the image. Can be overridden by the <code>do_normalize</code> parameter in the <code>preprocess</code>
method. Can be overridden by the <code>do_normalize</code> parameter in the <code>preprocess</code> method.`,name:"do_normalize"},{anchor:"transformers.BlipImageProcessorFast.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_mean</code>) &#x2014;
Mean to use if normalizing the image. This is a float or list of floats the length of the number of
channels in the image. Can be overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method. Can be
overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method.`,name:"image_mean"},{anchor:"transformers.BlipImageProcessorFast.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_std</code>) &#x2014;
Standard deviation to use if normalizing the image. This is a float or list of floats the length of the
number of channels in the image. Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.
Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.`,name:"image_std"},{anchor:"transformers.BlipImageProcessorFast.do_convert_rgb",description:`<strong>do_convert_rgb</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.image_std</code>) &#x2014;
Whether to convert the image to RGB.`,name:"do_convert_rgb"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blip/image_processing_blip_fast.py#L22"}}),We=new j({props:{name:"preprocess",anchor:"transformers.BlipImageProcessorFast.preprocess",parameters:[{name:"images",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), typing.List[ForwardRef('PIL.Image.Image')], typing.List[numpy.ndarray], typing.List[ForwardRef('torch.Tensor')]]"},{name:"**kwargs",val:": typing_extensions.Unpack[transformers.image_processing_utils_fast.DefaultFastImageProcessorPreprocessKwargs]"}],parametersDescription:[{anchor:"transformers.BlipImageProcessorFast.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to preprocess. Expects a single or batch of images with pixel values ranging from 0 to 255. If
passing in images with pixel values between 0 and 1, set <code>do_rescale=False</code>.`,name:"images"},{anchor:"transformers.BlipImageProcessorFast.preprocess.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_resize</code>) &#x2014;
Whether to resize the image.`,name:"do_resize"},{anchor:"transformers.BlipImageProcessorFast.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Describes the maximum input dimensions to the model.`,name:"size"},{anchor:"transformers.BlipImageProcessorFast.preprocess.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code> or <code>InterpolationMode</code>, <em>optional</em>, defaults to <code>self.resample</code>) &#x2014;
Resampling filter to use if resizing the image. This can be one of the enum <code>PILImageResampling</code>. Only
has an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"resample"},{anchor:"transformers.BlipImageProcessorFast.preprocess.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_center_crop</code>) &#x2014;
Whether to center crop the image.`,name:"do_center_crop"},{anchor:"transformers.BlipImageProcessorFast.preprocess.crop_size",description:`<strong>crop_size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.crop_size</code>) &#x2014;
Size of the output image after applying <code>center_crop</code>.`,name:"crop_size"},{anchor:"transformers.BlipImageProcessorFast.preprocess.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_rescale</code>) &#x2014;
Whether to rescale the image.`,name:"do_rescale"},{anchor:"transformers.BlipImageProcessorFast.preprocess.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>self.rescale_factor</code>) &#x2014;
Rescale factor to rescale the image by if <code>do_rescale</code> is set to <code>True</code>.`,name:"rescale_factor"},{anchor:"transformers.BlipImageProcessorFast.preprocess.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_normalize</code>) &#x2014;
Whether to normalize the image.`,name:"do_normalize"},{anchor:"transformers.BlipImageProcessorFast.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_mean</code>) &#x2014;
Image mean to use for normalization. Only has an effect if <code>do_normalize</code> is set to <code>True</code>.`,name:"image_mean"},{anchor:"transformers.BlipImageProcessorFast.preprocess.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_std</code>) &#x2014;
Image standard deviation to use for normalization. Only has an effect if <code>do_normalize</code> is set to
<code>True</code>.`,name:"image_std"},{anchor:"transformers.BlipImageProcessorFast.preprocess.do_convert_rgb",description:`<strong>do_convert_rgb</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_convert_rgb</code>) &#x2014;
Whether to convert the image to RGB.`,name:"do_convert_rgb"},{anchor:"transformers.BlipImageProcessorFast.preprocess.return_tensors",description:"<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>) &#x2014;\nReturns stacked tensors if set to `pt, otherwise returns a list of tensors.",name:"return_tensors"},{anchor:"transformers.BlipImageProcessorFast.preprocess.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>, defaults to <code>ChannelDimension.FIRST</code>) &#x2014;
The channel dimension format for the output image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li>Unset: Use the channel dimension format of the input image.</li>
</ul>`,name:"data_format"},{anchor:"transformers.BlipImageProcessorFast.preprocess.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>) &#x2014;
The channel dimension format for the input image. If unset, the channel dimension format is inferred
from the input image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li><code>&quot;none&quot;</code> or <code>ChannelDimension.NONE</code>: image in (height, width) format.</li>
</ul>`,name:"input_data_format"},{anchor:"transformers.BlipImageProcessorFast.preprocess.device",description:`<strong>device</strong> (<code>torch.device</code>, <em>optional</em>) &#x2014;
The device to process the images on. If unset, the device is inferred from the input images.`,name:"device"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/image_processing_utils_fast.py#L552"}}),Le=new zo({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[fn],pytorch:[Do]},$$scope:{ctx:B}}}),Me=new Uo({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/blip.md"}}),{c(){t=c("meta"),f=a(),n=c("p"),r=a(),h(M.$$.fragment),o=a(),h(w.$$.fragment),Yt=a(),de=c("p"),de.innerHTML=$o,At=a(),oe=c("p"),oe.textContent=bo,Ee=a(),Ze=c("ul"),Ze.innerHTML=Ne,Ke=a(),O=c("p"),O.textContent=Xe,eo=a(),Pe=c("p"),Pe.innerHTML=Bt,Dt=a(),S=c("p"),S.innerHTML=po,q=a(),we=c("p"),we.innerHTML=$e,Be=a(),h(xt.$$.fragment),ct=a(),xe=c("ul"),xe.innerHTML=mo,se=a(),h(et.$$.fragment),ce=a(),K=c("div"),h(F.$$.fragment),Je=a(),Jt=c("p"),Jt.innerHTML=tt,To=a(),jt=c("p"),jt.innerHTML=re,pt=a(),h(pe.$$.fragment),mt=a(),je=c("div"),h(ot.$$.fragment),ee=a(),Ie=c("p"),Ie.innerHTML=It,nt=a(),h(_e.$$.fragment),st=a(),V=c("div"),h(E.$$.fragment),gt=a(),Se=c("p"),Se.innerHTML=Ot,go=a(),Qe=c("p"),Qe.innerHTML=Ft,Ht=a(),h(te.$$.fragment),Ct=a(),h(I.$$.fragment),be=a(),me=c("div"),h(Q.$$.fragment),zt=a(),Ut=c("p"),Ut.innerHTML=rt,yo=a(),kt=c("p"),kt.innerHTML=Ve,to=a(),h(Te.$$.fragment),ae=a(),h(z.$$.fragment),at=a(),X=c("div"),h(Ye.$$.fragment),fo=a(),Fe=c("p"),Fe.textContent=Gt,ft=a(),ht=c("p"),ht.innerHTML=Ae,oo=a(),R=c("div"),h(H.$$.fragment),ut=a(),De=c("p"),De.innerHTML=Kt,ho=a(),Ce=c("div"),h(ze.$$.fragment),no=a(),ie=c("p"),ie.innerHTML=uo,it=a(),h(Y.$$.fragment),G=a(),ne=c("div"),h(Re.$$.fragment),Lt=a(),qt=c("p"),qt.textContent=_t,Wt=a(),ye=c("div"),h(lt.$$.fragment),He=a(),Zt=c("p"),Zt.textContent=le,A=a(),h(Ue.$$.fragment),bt=a(),ge=c("div"),h(Nt.$$.fragment),Pt=a(),Ge=c("p"),Ge.textContent=_o,ke=a(),dt=c("div"),h(We.$$.fragment),fe=a(),k=c("p"),k.textContent=Vt,Tt=a(),h(Le.$$.fragment),so=a(),h(Me.$$.fragment),yt=a(),Oe=c("p"),this.h()},l(e){const m=Co("svelte-u9bgzb",document.head);t=p(m,"META",{name:!0,content:!0}),m.forEach(l),f=i(e),n=p(e,"P",{}),x(n).forEach(l),r=i(e),u(M.$$.fragment,e),o=i(e),u(w.$$.fragment,e),Yt=i(e),de=p(e,"P",{"data-svelte-h":!0}),v(de)!=="svelte-17k3ayt"&&(de.innerHTML=$o),At=i(e),oe=p(e,"P",{"data-svelte-h":!0}),v(oe)!=="svelte-zufbp3"&&(oe.textContent=bo),Ee=i(e),Ze=p(e,"UL",{"data-svelte-h":!0}),v(Ze)!=="svelte-nylfz4"&&(Ze.innerHTML=Ne),Ke=i(e),O=p(e,"P",{"data-svelte-h":!0}),v(O)!=="svelte-vfdo9a"&&(O.textContent=Xe),eo=i(e),Pe=p(e,"P",{"data-svelte-h":!0}),v(Pe)!=="svelte-4jmih4"&&(Pe.innerHTML=Bt),Dt=i(e),S=p(e,"P",{"data-svelte-h":!0}),v(S)!=="svelte-1nlkgp7"&&(S.innerHTML=po),q=i(e),we=p(e,"P",{"data-svelte-h":!0}),v(we)!=="svelte-1kg7i71"&&(we.innerHTML=$e),Be=i(e),u(xt.$$.fragment,e),ct=i(e),xe=p(e,"UL",{"data-svelte-h":!0}),v(xe)!=="svelte-1ag1pc7"&&(xe.innerHTML=mo),se=i(e),u(et.$$.fragment,e),ce=i(e),K=p(e,"DIV",{class:!0});var Z=x(K);u(F.$$.fragment,Z),Je=i(Z),Jt=p(Z,"P",{"data-svelte-h":!0}),v(Jt)!=="svelte-ht9ozv"&&(Jt.innerHTML=tt),To=i(Z),jt=p(Z,"P",{"data-svelte-h":!0}),v(jt)!=="svelte-o55m63"&&(jt.innerHTML=re),pt=i(Z),u(pe.$$.fragment,Z),mt=i(Z),je=p(Z,"DIV",{class:!0});var C=x(je);u(ot.$$.fragment,C),ee=i(C),Ie=p(C,"P",{"data-svelte-h":!0}),v(Ie)!=="svelte-xsp143"&&(Ie.innerHTML=It),C.forEach(l),Z.forEach(l),nt=i(e),u(_e.$$.fragment,e),st=i(e),V=p(e,"DIV",{class:!0});var U=x(V);u(E.$$.fragment,U),gt=i(U),Se=p(U,"P",{"data-svelte-h":!0}),v(Se)!=="svelte-737li"&&(Se.innerHTML=Ot),go=i(U),Qe=p(U,"P",{"data-svelte-h":!0}),v(Qe)!=="svelte-o55m63"&&(Qe.innerHTML=Ft),Ht=i(U),u(te.$$.fragment,U),U.forEach(l),Ct=i(e),u(I.$$.fragment,e),be=i(e),me=p(e,"DIV",{class:!0});var D=x(me);u(Q.$$.fragment,D),zt=i(D),Ut=p(D,"P",{"data-svelte-h":!0}),v(Ut)!=="svelte-13c59v1"&&(Ut.innerHTML=rt),yo=i(D),kt=p(D,"P",{"data-svelte-h":!0}),v(kt)!=="svelte-o55m63"&&(kt.innerHTML=Ve),to=i(D),u(Te.$$.fragment,D),D.forEach(l),ae=i(e),u(z.$$.fragment,e),at=i(e),X=p(e,"DIV",{class:!0});var L=x(X);u(Ye.$$.fragment,L),fo=i(L),Fe=p(L,"P",{"data-svelte-h":!0}),v(Fe)!=="svelte-4ee3u1"&&(Fe.textContent=Gt),ft=i(L),ht=p(L,"P",{"data-svelte-h":!0}),v(ht)!=="svelte-cmz289"&&(ht.innerHTML=Ae),oo=i(L),R=p(L,"DIV",{class:!0});var Mt=x(R);u(H.$$.fragment,Mt),ut=i(Mt),De=p(Mt,"P",{"data-svelte-h":!0}),v(De)!=="svelte-1ca4llu"&&(De.innerHTML=Kt),Mt.forEach(l),ho=i(L),Ce=p(L,"DIV",{class:!0});var qe=x(Ce);u(ze.$$.fragment,qe),no=i(qe),ie=p(qe,"P",{"data-svelte-h":!0}),v(ie)!=="svelte-1hyadk"&&(ie.innerHTML=uo),qe.forEach(l),L.forEach(l),it=i(e),u(Y.$$.fragment,e),G=i(e),ne=p(e,"DIV",{class:!0});var N=x(ne);u(Re.$$.fragment,N),Lt=i(N),qt=p(N,"P",{"data-svelte-h":!0}),v(qt)!=="svelte-17e80zr"&&(qt.textContent=_t),Wt=i(N),ye=p(N,"DIV",{class:!0});var ve=x(ye);u(lt.$$.fragment,ve),He=i(ve),Zt=p(ve,"P",{"data-svelte-h":!0}),v(Zt)!=="svelte-1x3yxsa"&&(Zt.textContent=le),ve.forEach(l),N.forEach(l),A=i(e),u(Ue.$$.fragment,e),bt=i(e),ge=p(e,"DIV",{class:!0});var P=x(ge);u(Nt.$$.fragment,P),Pt=i(P),Ge=p(P,"P",{"data-svelte-h":!0}),v(Ge)!=="svelte-nuvb01"&&(Ge.textContent=_o),ke=i(P),dt=p(P,"DIV",{class:!0});var he=x(dt);u(We.$$.fragment,he),fe=i(he),k=p(he,"P",{"data-svelte-h":!0}),v(k)!=="svelte-1x3yxsa"&&(k.textContent=Vt),he.forEach(l),P.forEach(l),Tt=i(e),u(Le.$$.fragment,e),so=i(e),u(Me.$$.fragment,e),yt=i(e),Oe=p(e,"P",{}),x(Oe).forEach(l),this.h()},h(){J(t,"name","hf:doc:metadata"),J(t,"content",un),J(je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(Ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(ge,"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,m){s(document.head,t),g(e,f,m),g(e,n,m),g(e,r,m),_(M,e,m),g(e,o,m),_(w,e,m),g(e,Yt,m),g(e,de,m),g(e,At,m),g(e,oe,m),g(e,Ee,m),g(e,Ze,m),g(e,Ke,m),g(e,O,m),g(e,eo,m),g(e,Pe,m),g(e,Dt,m),g(e,S,m),g(e,q,m),g(e,we,m),g(e,Be,m),_(xt,e,m),g(e,ct,m),g(e,xe,m),g(e,se,m),_(et,e,m),g(e,ce,m),g(e,K,m),_(F,K,null),s(K,Je),s(K,Jt),s(K,To),s(K,jt),s(K,pt),_(pe,K,null),s(K,mt),s(K,je),_(ot,je,null),s(je,ee),s(je,Ie),g(e,nt,m),_(_e,e,m),g(e,st,m),g(e,V,m),_(E,V,null),s(V,gt),s(V,Se),s(V,go),s(V,Qe),s(V,Ht),_(te,V,null),g(e,Ct,m),_(I,e,m),g(e,be,m),g(e,me,m),_(Q,me,null),s(me,zt),s(me,Ut),s(me,yo),s(me,kt),s(me,to),_(Te,me,null),g(e,ae,m),_(z,e,m),g(e,at,m),g(e,X,m),_(Ye,X,null),s(X,fo),s(X,Fe),s(X,ft),s(X,ht),s(X,oo),s(X,R),_(H,R,null),s(R,ut),s(R,De),s(X,ho),s(X,Ce),_(ze,Ce,null),s(Ce,no),s(Ce,ie),g(e,it,m),_(Y,e,m),g(e,G,m),g(e,ne,m),_(Re,ne,null),s(ne,Lt),s(ne,qt),s(ne,Wt),s(ne,ye),_(lt,ye,null),s(ye,He),s(ye,Zt),g(e,A,m),_(Ue,e,m),g(e,bt,m),g(e,ge,m),_(Nt,ge,null),s(ge,Pt),s(ge,Ge),s(ge,ke),s(ge,dt),_(We,dt,null),s(dt,fe),s(dt,k),g(e,Tt,m),_(Le,e,m),g(e,so,m),_(Me,e,m),g(e,yt,m),g(e,Oe,m),Et=!0},p(e,[m]){const Z={};m&2&&(Z.$$scope={dirty:m,ctx:e}),pe.$set(Z);const C={};m&2&&(C.$$scope={dirty:m,ctx:e}),te.$set(C);const U={};m&2&&(U.$$scope={dirty:m,ctx:e}),Te.$set(U);const D={};m&2&&(D.$$scope={dirty:m,ctx:e}),Le.$set(D)},i(e){Et||(b(M.$$.fragment,e),b(w.$$.fragment,e),b(xt.$$.fragment,e),b(et.$$.fragment,e),b(F.$$.fragment,e),b(pe.$$.fragment,e),b(ot.$$.fragment,e),b(_e.$$.fragment,e),b(E.$$.fragment,e),b(te.$$.fragment,e),b(I.$$.fragment,e),b(Q.$$.fragment,e),b(Te.$$.fragment,e),b(z.$$.fragment,e),b(Ye.$$.fragment,e),b(H.$$.fragment,e),b(ze.$$.fragment,e),b(Y.$$.fragment,e),b(Re.$$.fragment,e),b(lt.$$.fragment,e),b(Ue.$$.fragment,e),b(Nt.$$.fragment,e),b(We.$$.fragment,e),b(Le.$$.fragment,e),b(Me.$$.fragment,e),Et=!0)},o(e){T(M.$$.fragment,e),T(w.$$.fragment,e),T(xt.$$.fragment,e),T(et.$$.fragment,e),T(F.$$.fragment,e),T(pe.$$.fragment,e),T(ot.$$.fragment,e),T(_e.$$.fragment,e),T(E.$$.fragment,e),T(te.$$.fragment,e),T(I.$$.fragment,e),T(Q.$$.fragment,e),T(Te.$$.fragment,e),T(z.$$.fragment,e),T(Ye.$$.fragment,e),T(H.$$.fragment,e),T(ze.$$.fragment,e),T(Y.$$.fragment,e),T(Re.$$.fragment,e),T(lt.$$.fragment,e),T(Ue.$$.fragment,e),T(Nt.$$.fragment,e),T(We.$$.fragment,e),T(Le.$$.fragment,e),T(Me.$$.fragment,e),Et=!1},d(e){e&&(l(f),l(n),l(r),l(o),l(Yt),l(de),l(At),l(oe),l(Ee),l(Ze),l(Ke),l(O),l(eo),l(Pe),l(Dt),l(S),l(q),l(we),l(Be),l(ct),l(xe),l(se),l(ce),l(K),l(nt),l(st),l(V),l(Ct),l(be),l(me),l(ae),l(at),l(X),l(it),l(G),l(ne),l(A),l(bt),l(ge),l(Tt),l(so),l(yt),l(Oe)),l(t),y(M,e),y(w,e),y(xt,e),y(et,e),y(F),y(pe),y(ot),y(_e,e),y(E),y(te),y(I,e),y(Q),y(Te),y(z,e),y(Ye),y(H),y(ze),y(Y,e),y(Re),y(lt),y(Ue,e),y(Nt),y(We),y(Le,e),y(Me,e)}}}const un='{"title":"BLIP","local":"blip","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Resources","local":"resources","sections":[],"depth":2},{"title":"BlipConfig","local":"transformers.BlipConfig","sections":[],"depth":2},{"title":"BlipTextConfig","local":"transformers.BlipTextConfig","sections":[],"depth":2},{"title":"BlipVisionConfig","local":"transformers.BlipVisionConfig","sections":[],"depth":2},{"title":"BlipProcessor","local":"transformers.BlipProcessor","sections":[],"depth":2},{"title":"BlipImageProcessor","local":"transformers.BlipImageProcessor","sections":[],"depth":2},{"title":"BlipImageProcessorFast","local":"transformers.BlipImageProcessorFast","sections":[],"depth":2},{"title":"BlipModel","local":"transformers.BlipModel","sections":[],"depth":2},{"title":"BlipTextModel","local":"transformers.BlipTextModel","sections":[],"depth":2},{"title":"BlipVisionModel","local":"transformers.BlipVisionModel","sections":[],"depth":2},{"title":"BlipForConditionalGeneration","local":"transformers.BlipForConditionalGeneration","sections":[],"depth":2},{"title":"BlipForImageTextRetrieval","local":"transformers.BlipForImageTextRetrieval","sections":[],"depth":2},{"title":"BlipForQuestionAnswering","local":"transformers.BlipForQuestionAnswering","sections":[],"depth":2},{"title":"TFBlipModel","local":"transformers.TFBlipModel","sections":[],"depth":2},{"title":"TFBlipTextModel","local":"transformers.TFBlipTextModel","sections":[],"depth":2},{"title":"TFBlipVisionModel","local":"transformers.TFBlipVisionModel","sections":[],"depth":2},{"title":"TFBlipForConditionalGeneration","local":"transformers.TFBlipForConditionalGeneration","sections":[],"depth":2},{"title":"TFBlipForImageTextRetrieval","local":"transformers.TFBlipForImageTextRetrieval","sections":[],"depth":2},{"title":"TFBlipForQuestionAnswering","local":"transformers.TFBlipForQuestionAnswering","sections":[],"depth":2}],"depth":1}';function _n(B){return jo(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class xn extends Io{constructor(t){super(),Fo(this,t,_n,hn,Jo,{})}}export{xn as component};
