import{s as mn,f as un,o as fn,n as mt}from"../chunks/scheduler.25b97de1.js";import{S as gn,i as hn,g as d,s as n,r as m,A as _n,h as c,f as t,c as r,j as B,u,x as y,k as T,y as s,a as i,v as f,d as g,t as h,w as _}from"../chunks/index.d9030fc9.js";import{T as pn}from"../chunks/Tip.baa67368.js";import{D as V}from"../chunks/Docstring.ffac8efa.js";import{C as Ht}from"../chunks/CodeBlock.e6cd0d95.js";import{E as At}from"../chunks/ExampleCodeBlock.22dfe688.js";import{H as U,E as bn}from"../chunks/EditOnGithub.91d95064.js";function yn($){let l,M="Example:",b,p,v;return p=new Ht({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMCglMEElMjAlMjAlMjAlMjBJbnN0cnVjdEJsaXBWaWRlb1Zpc2lvbkNvbmZpZyUyQyUwQSUyMCUyMCUyMCUyMEluc3RydWN0QmxpcFZpZGVvUUZvcm1lckNvbmZpZyUyQyUwQSUyMCUyMCUyMCUyME9QVENvbmZpZyUyQyUwQSUyMCUyMCUyMCUyMEluc3RydWN0QmxpcFZpZGVvQ29uZmlnJTJDJTBBJTIwJTIwJTIwJTIwSW5zdHJ1Y3RCbGlwVmlkZW9Gb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMkMlMEEpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMEluc3RydWN0QmxpcFZpZGVvQ29uZmlnJTIwd2l0aCUyMFNhbGVzZm9yY2UlMkZpbnN0cnVjdC1ibGlwLWZsYW4tdDUlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwSW5zdHJ1Y3RCbGlwVmlkZW9Db25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBJbnN0cnVjdEJsaXBWaWRlb0ZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbiUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwU2FsZXNmb3JjZSUyRmluc3RydWN0LWJsaXAtZmxhbi10NSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwSW5zdHJ1Y3RCbGlwVmlkZW9Gb3JDb25kaXRpb25hbEdlbmVyYXRpb24oY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmlnJTBBJTBBJTIzJTIwV2UlMjBjYW4lMjBhbHNvJTIwaW5pdGlhbGl6ZSUyMGElMjBJbnN0cnVjdEJsaXBWaWRlb0NvbmZpZyUyMGZyb20lMjBhJTIwSW5zdHJ1Y3RCbGlwVmlkZW9WaXNpb25Db25maWclMkMlMjBJbnN0cnVjdEJsaXBWaWRlb1FGb3JtZXJDb25maWclMjBhbmQlMjBhbnklMjBQcmV0cmFpbmVkQ29uZmlnJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwSW5zdHJ1Y3RibGlwdmlkZW8lMjB2aXNpb24lMkMlMjBJbnN0cnVjdGJsaXB2aWRlbyUyMFEtRm9ybWVyJTIwYW5kJTIwbGFuZ3VhZ2UlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb25zJTBBdmlzaW9uX2NvbmZpZyUyMCUzRCUyMEluc3RydWN0QmxpcFZpZGVvVmlzaW9uQ29uZmlnKCklMEFxZm9ybWVyX2NvbmZpZyUyMCUzRCUyMEluc3RydWN0QmxpcFZpZGVvUUZvcm1lckNvbmZpZygpJTBBdGV4dF9jb25maWclMjAlM0QlMjBPUFRDb25maWcoKSUwQSUwQWNvbmZpZyUyMCUzRCUyMEluc3RydWN0QmxpcFZpZGVvQ29uZmlnLmZyb21fdGV4dF92aXNpb25fY29uZmlncyh2aXNpb25fY29uZmlnJTJDJTIwcWZvcm1lcl9jb25maWclMkMlMjB0ZXh0X2NvbmZpZyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> (
<span class="hljs-meta">... </span>    InstructBlipVideoVisionConfig,
<span class="hljs-meta">... </span>    InstructBlipVideoQFormerConfig,
<span class="hljs-meta">... </span>    OPTConfig,
<span class="hljs-meta">... </span>    InstructBlipVideoConfig,
<span class="hljs-meta">... </span>    InstructBlipVideoForConditionalGeneration,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a InstructBlipVideoConfig with Salesforce/instruct-blip-flan-t5 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = InstructBlipVideoConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a InstructBlipVideoForConditionalGeneration (with random weights) from the Salesforce/instruct-blip-flan-t5 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = InstructBlipVideoForConditionalGeneration(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 InstructBlipVideoConfig from a InstructBlipVideoVisionConfig, InstructBlipVideoQFormerConfig and any PretrainedConfig</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing Instructblipvideo vision, Instructblipvideo Q-Former and language model configurations</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>vision_config = InstructBlipVideoVisionConfig()
<span class="hljs-meta">&gt;&gt;&gt; </span>qformer_config = InstructBlipVideoQFormerConfig()
<span class="hljs-meta">&gt;&gt;&gt; </span>text_config = OPTConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span>config = InstructBlipVideoConfig.from_text_vision_configs(vision_config, qformer_config, text_config)`,wrap:!1}}),{c(){l=d("p"),l.textContent=M,b=n(),m(p.$$.fragment)},l(a){l=c(a,"P",{"data-svelte-h":!0}),y(l)!=="svelte-11lpom8"&&(l.textContent=M),b=r(a),u(p.$$.fragment,a)},m(a,I){i(a,l,I),i(a,b,I),f(p,a,I),v=!0},p:mt,i(a){v||(g(p.$$.fragment,a),v=!0)},o(a){h(p.$$.fragment,a),v=!1},d(a){a&&(t(l),t(b)),_(p,a)}}}function vn($){let l,M="Example:",b,p,v;return p=new Ht({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEluc3RydWN0QmxpcFZpZGVvVmlzaW9uQ29uZmlnJTJDJTIwSW5zdHJ1Y3RCbGlwVmlkZW9WaXNpb25Nb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBJbnN0cnVjdEJsaXBWaWRlb1Zpc2lvbkNvbmZpZyUyMHdpdGglMjBTYWxlc2ZvcmNlJTJGaW5zdHJ1Y3QtYmxpcC1mbGFuLXQ1JTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMEluc3RydWN0QmxpcFZpZGVvVmlzaW9uQ29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwSW5zdHJ1Y3RCbGlwVmlkZW9WaXNpb25Nb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwU2FsZXNmb3JjZSUyRmluc3RydWN0LWJsaXAtZmxhbi10NSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwSW5zdHJ1Y3RCbGlwVmlkZW9WaXNpb25Nb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> InstructBlipVideoVisionConfig, InstructBlipVideoVisionModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a InstructBlipVideoVisionConfig with Salesforce/instruct-blip-flan-t5 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = InstructBlipVideoVisionConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a InstructBlipVideoVisionModel (with random weights) from the Salesforce/instruct-blip-flan-t5 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = InstructBlipVideoVisionModel(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(){l=d("p"),l.textContent=M,b=n(),m(p.$$.fragment)},l(a){l=c(a,"P",{"data-svelte-h":!0}),y(l)!=="svelte-11lpom8"&&(l.textContent=M),b=r(a),u(p.$$.fragment,a)},m(a,I){i(a,l,I),i(a,b,I),f(p,a,I),v=!0},p:mt,i(a){v||(g(p.$$.fragment,a),v=!0)},o(a){h(p.$$.fragment,a),v=!1},d(a){a&&(t(l),t(b)),_(p,a)}}}function In($){let l,M="Examples:",b,p,v;return p=new Ht({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEluc3RydWN0QmxpcFZpZGVvUUZvcm1lckNvbmZpZyUyQyUyMEluc3RydWN0QmxpcFZpZGVvUUZvcm1lck1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMEluc3RydWN0QmxpcFZpZGVvJTIwU2FsZXNmb3JjZSUyRmluc3RydWN0LWJsaXAtZmxhbi10NSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBJbnN0cnVjdEJsaXBWaWRlb1FGb3JtZXJDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwU2FsZXNmb3JjZSUyRmluc3RydWN0LWJsaXAtZmxhbi10NSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwSW5zdHJ1Y3RCbGlwVmlkZW9RRm9ybWVyTW9kZWwoY29uZmlndXJhdGlvbiklMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> InstructBlipVideoQFormerConfig, InstructBlipVideoQFormerModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a InstructBlipVideo Salesforce/instruct-blip-flan-t5 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = InstructBlipVideoQFormerConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the Salesforce/instruct-blip-flan-t5 style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = InstructBlipVideoQFormerModel(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(){l=d("p"),l.textContent=M,b=n(),m(p.$$.fragment)},l(a){l=c(a,"P",{"data-svelte-h":!0}),y(l)!=="svelte-kvfsh7"&&(l.textContent=M),b=r(a),u(p.$$.fragment,a)},m(a,I){i(a,l,I),i(a,b,I),f(p,a,I),v=!0},p:mt,i(a){v||(g(p.$$.fragment,a),v=!0)},o(a){h(p.$$.fragment,a),v=!1},d(a){a&&(t(l),t(b)),_(p,a)}}}function Mn($){let l,M=`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(){l=d("p"),l.innerHTML=M},l(b){l=c(b,"P",{"data-svelte-h":!0}),y(l)!=="svelte-fincs2"&&(l.innerHTML=M)},m(b,p){i(b,l,p)},p:mt,d(b){b&&t(l)}}}function Tn($){let l,M=`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(){l=d("p"),l.innerHTML=M},l(b){l=c(b,"P",{"data-svelte-h":!0}),y(l)!=="svelte-fincs2"&&(l.innerHTML=M)},m(b,p){i(b,l,p)},p:mt,d(b){b&&t(l)}}}function wn($){let l,M="Examples:",b,p,v;return p=new Ht({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEluc3RydWN0QmxpcFZpZGVvUHJvY2Vzc29yJTJDJTIwSW5zdHJ1Y3RCbGlwVmlkZW9Gb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBodWdnaW5nZmFjZV9odWIlMjBpbXBvcnQlMjBoZl9odWJfZG93bmxvYWQlMEFpbXBvcnQlMjBhdiUwQWltcG9ydCUyMG51bXB5JTIwYXMlMjBucCUwQSUwQWRlZiUyMHJlYWRfdmlkZW9fcHlhdihjb250YWluZXIlMkMlMjBpbmRpY2VzKSUzQSUwQSUyMCUyMCUyMCUyMCcnJyUwQSUyMCUyMCUyMCUyMERlY29kZSUyMHRoZSUyMHZpZGVvJTIwd2l0aCUyMFB5QVYlMjBkZWNvZGVyLiUwQSUyMCUyMCUyMCUyMEFyZ3MlM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBjb250YWluZXIlMjAoJTYwYXYuY29udGFpbmVyLmlucHV0LklucHV0Q29udGFpbmVyJTYwKSUzQSUyMFB5QVYlMjBjb250YWluZXIuJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwaW5kaWNlcyUyMCglNjBMaXN0JTVCaW50JTVEJTYwKSUzQSUyMExpc3QlMjBvZiUyMGZyYW1lJTIwaW5kaWNlcyUyMHRvJTIwZGVjb2RlLiUwQSUyMCUyMCUyMCUyMFJldHVybnMlM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjByZXN1bHQlMjAobnAubmRhcnJheSklM0ElMjBucCUyMGFycmF5JTIwb2YlMjBkZWNvZGVkJTIwZnJhbWVzJTIwb2YlMjBzaGFwZSUyMChudW1fZnJhbWVzJTJDJTIwaGVpZ2h0JTJDJTIwd2lkdGglMkMlMjAzKS4lMEElMjAlMjAlMjAlMjAnJyclMEElMjAlMjAlMjAlMjBmcmFtZXMlMjAlM0QlMjAlNUIlNUQlMEElMjAlMjAlMjAlMjBjb250YWluZXIuc2VlaygwKSUwQSUyMCUyMCUyMCUyMHN0YXJ0X2luZGV4JTIwJTNEJTIwaW5kaWNlcyU1QjAlNUQlMEElMjAlMjAlMjAlMjBlbmRfaW5kZXglMjAlM0QlMjBpbmRpY2VzJTVCLTElNUQlMEElMjAlMjAlMjAlMjBmb3IlMjBpJTJDJTIwZnJhbWUlMjBpbiUyMGVudW1lcmF0ZShjb250YWluZXIuZGVjb2RlKHZpZGVvJTNEMCkpJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwaWYlMjBpJTIwJTNFJTIwZW5kX2luZGV4JTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwYnJlYWslMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBpZiUyMGklMjAlM0UlM0QlMjBzdGFydF9pbmRleCUyMGFuZCUyMGklMjBpbiUyMGluZGljZXMlM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBmcmFtZXMuYXBwZW5kKGZyYW1lKSUwQSUyMCUyMCUyMCUyMHJldHVybiUyMG5wLnN0YWNrKCU1QngudG9fbmRhcnJheShmb3JtYXQlM0QlMjJyZ2IyNCUyMiklMjBmb3IlMjB4JTIwaW4lMjBmcmFtZXMlNUQpJTBBJTBBbW9kZWwlMjAlM0QlMjBJbnN0cnVjdEJsaXBWaWRlb0ZvckNvbmRpdGlvbmFsR2VuZXJhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyU2FsZXNmb3JjZSUyRmluc3RydWN0YmxpcC12aWN1bmEtN2IlMjIlMkMlMjBkZXZpY2VfbWFwJTNEJTIyYXV0byUyMiklMEFwcm9jZXNzb3IlMjAlM0QlMjBJbnN0cnVjdEJsaXBWaWRlb1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyU2FsZXNmb3JjZSUyRmluc3RydWN0YmxpcC12aWN1bmEtN2IlMjIpJTBBJTBBZmlsZV9wYXRoJTIwJTNEJTIwaGZfaHViX2Rvd25sb2FkKCUwQSUyMCUyMCUyMCUyMCUyMCUyMHJlcG9faWQlM0QlMjJuaWVsc3IlMkZ2aWRlby1kZW1vJTIyJTJDJTIwZmlsZW5hbWUlM0QlMjJlYXRpbmdfc3BhZ2hldHRpLm1wNCUyMiUyQyUyMHJlcG9fdHlwZSUzRCUyMmRhdGFzZXQlMjIlMEEpJTBBY29udGFpbmVyJTIwJTNEJTIwYXYub3BlbihmaWxlX3BhdGgpJTBBJTBBJTIzJTIwc2FtcGxlJTIwdW5pZm9ybWx5JTIwNCUyMGZyYW1lcyUyMGZyb20lMjB0aGUlMjB2aWRlV2h5JTIwaXMlMjB0aGlzJTIwdmlkZW8lMjBmdW5ueSUzRm8lMEF0b3RhbF9mcmFtZXMlMjAlM0QlMjBjb250YWluZXIuc3RyZWFtcy52aWRlbyU1QjAlNUQuZnJhbWVzJTBBaW5kaWNlcyUyMCUzRCUyMG5wLmFyYW5nZSgwJTJDJTIwdG90YWxfZnJhbWVzJTJDJTIwdG90YWxfZnJhbWVzJTIwJTJGJTIwNCkuYXN0eXBlKGludCklMEFjbGlwJTIwJTNEJTIwcmVhZF92aWRlb19weWF2KGNvbnRhaW5lciUyQyUyMGluZGljZXMpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIyV2hhdCUyMGlzJTIwaGFwcGVuaW5nJTIwaW4lMjB0aGUlMjB2aWRlbyUzRiUyMiUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3Nvcih0ZXh0JTNEcHJvbXB0JTJDJTIwaW1hZ2VzJTNEY2xpcCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpLnRvKG1vZGVsLmRldmljZSklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoJTBBJTIwJTIwJTIwJTIwKippbnB1dHMlMkMlMEElMjAlMjAlMjAlMjBkb19zYW1wbGUlM0RGYWxzZSUyQyUwQSUyMCUyMCUyMCUyMG51bV9iZWFtcyUzRDUlMkMlMEElMjAlMjAlMjAlMjBtYXhfbGVuZ3RoJTNEMjU2JTJDJTBBJTIwJTIwJTIwJTIwcmVwZXRpdGlvbl9wZW5hbHR5JTNEMS41JTJDJTBBJTIwJTIwJTIwJTIwbGVuZ3RoX3BlbmFsdHklM0QxLjAlMkMlMEEpJTBBZ2VuZXJhdGVkX3RleHQlMjAlM0QlMjBwcm9jZXNzb3IuYmF0Y2hfZGVjb2RlKG91dHB1dHMlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSklNUIwJTVELnN0cmlwKCklMEFwcmludChnZW5lcmF0ZWRfdGV4dCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> InstructBlipVideoProcessor, InstructBlipVideoForConditionalGeneration
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> hf_hub_download
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> av
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np

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

<span class="hljs-meta">&gt;&gt;&gt; </span>model = InstructBlipVideoForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;Salesforce/instructblip-vicuna-7b&quot;</span>, device_map=<span class="hljs-string">&quot;auto&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = InstructBlipVideoProcessor.from_pretrained(<span class="hljs-string">&quot;Salesforce/instructblip-vicuna-7b&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>file_path = hf_hub_download(
<span class="hljs-meta">... </span>      repo_id=<span class="hljs-string">&quot;nielsr/video-demo&quot;</span>, filename=<span class="hljs-string">&quot;eating_spaghetti.mp4&quot;</span>, repo_type=<span class="hljs-string">&quot;dataset&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>container = av.<span class="hljs-built_in">open</span>(file_path)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># sample uniformly 4 frames from the videWhy is this video funny?o</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>total_frames = container.streams.video[<span class="hljs-number">0</span>].frames
<span class="hljs-meta">&gt;&gt;&gt; </span>indices = np.arange(<span class="hljs-number">0</span>, total_frames, total_frames / <span class="hljs-number">4</span>).astype(<span class="hljs-built_in">int</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>clip = read_video_pyav(container, indices)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;What is happening in the video?&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(text=prompt, images=clip, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).to(model.device)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.generate(
<span class="hljs-meta">... </span>    **inputs,
<span class="hljs-meta">... </span>    do_sample=<span class="hljs-literal">False</span>,
<span class="hljs-meta">... </span>    num_beams=<span class="hljs-number">5</span>,
<span class="hljs-meta">... </span>    max_length=<span class="hljs-number">256</span>,
<span class="hljs-meta">... </span>    repetition_penalty=<span class="hljs-number">1.5</span>,
<span class="hljs-meta">... </span>    length_penalty=<span class="hljs-number">1.0</span>,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>generated_text = processor.batch_decode(outputs, skip_special_tokens=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>].strip()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(generated_text)
<span class="hljs-string">&quot;A person is eating a bowl of pasta, and they are using a fork to eat it. The person is sitting at a table, and the plate of pasta is on the table in front&quot;</span>`,wrap:!1}}),{c(){l=d("p"),l.textContent=M,b=n(),m(p.$$.fragment)},l(a){l=c(a,"P",{"data-svelte-h":!0}),y(l)!=="svelte-kvfsh7"&&(l.textContent=M),b=r(a),u(p.$$.fragment,a)},m(a,I){i(a,l,I),i(a,b,I),f(p,a,I),v=!0},p:mt,i(a){v||(g(p.$$.fragment,a),v=!0)},o(a){h(p.$$.fragment,a),v=!1},d(a){a&&(t(l),t(b)),_(p,a)}}}function Bn($){let l,M,b,p,v,a,I,ft,ne,gt,re,Wo=`The InstructBLIPVideo is an extension of the models proposed in <a href="https://arxiv.org/abs/2305.06500" rel="nofollow">InstructBLIP: Towards General-purpose Vision-Language Models with Instruction Tuning</a> by Wenliang Dai, Junnan Li, Dongxu Li, Anthony Meng Huat Tiong, Junqi Zhao, Weisheng Wang, Boyang Li, Pascale Fung, Steven Hoi.
InstructBLIPVideo uses the same architecture as <a href="instructblip">InstructBLIP</a> and works with the same checkpoints as <a href="instructblip">InstructBLIP</a>. The only difference is the ability to process videos.`,ht,se,Zo="The abstract from the paper is the following:",_t,ae,zo="<em>General-purpose language models that can solve various language-domain tasks have emerged driven by the pre-training and instruction-tuning pipeline. However, building general-purpose vision-language models is challenging due to the increased task discrepancy introduced by the additional visual input. Although vision-language pre-training has been widely studied, vision-language instruction tuning remains relatively less explored. In this paper, we conduct a systematic and comprehensive study on vision-language instruction tuning based on the pre-trained BLIP-2 models. We gather a wide variety of 26 publicly available datasets, transform them into instruction tuning format and categorize them into two clusters for held-in instruction tuning and held-out zero-shot evaluation. Additionally, we introduce instruction-aware visual feature extraction, a crucial method that enables the model to extract informative features tailored to the given instruction. The resulting InstructBLIP models achieve state-of-the-art zero-shot performance across all 13 held-out datasets, substantially outperforming BLIP-2 and the larger Flamingo. Our models also lead to state-of-the-art performance when finetuned on individual downstream tasks (e.g., 90.7% accuracy on ScienceQA IMG). Furthermore, we qualitatively demonstrate the advantages of InstructBLIP over concurrent multimodal models.</em>",bt,Q,Uo,yt,ie,Fo='InstructBLIPVideo architecture. Taken from the <a href="https://arxiv.org/abs/2305.06500">original paper.</a>',vt,le,No=`This model was contributed by <a href="https://huggingface.co/RaushanTurganbay" rel="nofollow">RaushanTurganbay</a>.
The original code can be found <a href="https://github.com/salesforce/LAVIS/tree/main/projects/instructblip" rel="nofollow">here</a>.`,It,de,Mt,ce,Go="<li>The model was trained by sampling 4 frames per video, so it’s recommended to sample 4 frames</li>",Tt,pe,qo=`<p>[!NOTE]
BLIP models after release v4.46 will raise warnings about adding <code>processor.num_query_tokens = {{num_query_tokens}}</code> and expand model embeddings layer to add special <code>&lt;image&gt;</code> token. It is strongly recommended to add the attributes to the processor if you own the model checkpoint, or open a PR if it is not owned by you. Adding these attributes means that BLIP will add the number of query tokens required per image and expand the text with as many <code>&lt;image&gt;</code> placeholders as there will be query tokens. Usually it is around 500 tokens per image, so make sure that the text is not truncated as otherwise there wil be failure when merging the embeddings.
The attributes can be obtained from model config, as <code>model.config.num_query_tokens</code> and model embeddings expansion can be done by following <a href="https://gist.github.com/zucchini-nlp/e9f20b054fa322f84ac9311d9ab67042" rel="nofollow">this link</a>.</p>`,wt,me,Bt,j,ue,Xt,Ge,Po=`<a href="/docs/transformers/pr_30530/en/model_doc/instructblipvideo#transformers.InstructBlipVideoConfig">InstructBlipVideoConfig</a> is the configuration class to store the configuration of a
<a href="/docs/transformers/pr_30530/en/model_doc/instructblipvideo#transformers.InstructBlipVideoForConditionalGeneration">InstructBlipVideoForConditionalGeneration</a>. It is used to instantiate a Instructblipvideo model according to the specified
arguments, defining the vision model, Q-Former model and language model configs. Instantiating a configuration with
the defaults will yield a similar configuration to that of the Instructblipvideo
<a href="https://huggingface.co/Salesforce/instruct-blip-flan-t5" rel="nofollow">Salesforce/instruct-blip-flan-t5</a> architecture.`,Yt,qe,Ro=`Configuration objects inherit from <a href="/docs/transformers/pr_30530/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/pr_30530/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Dt,E,Ot,S,fe,Kt,Pe,Lo=`Instantiate a <a href="/docs/transformers/pr_30530/en/model_doc/instructblipvideo#transformers.InstructBlipVideoConfig">InstructBlipVideoConfig</a> (or a derived class) from a InstructBlipVideo vision model, Q-Former and
language model configurations.`,Vt,ge,jt,k,he,eo,Re,Qo=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_30530/en/model_doc/instructblipvideo#transformers.InstructBlipVideoVisionModel">InstructBlipVideoVisionModel</a>. It is used to
instantiate a InstructBlipVideo vision encoder according to the specified arguments, defining the model architecture.
Instantiating a configuration defaults will yield a similar configuration to that of the InstructBlipVideo
<a href="https://huggingface.co/Salesforce/instruct-blip-flan-t5" rel="nofollow">Salesforce/instruct-blip-flan-t5</a> architecture.`,to,Le,Eo=`Configuration objects inherit from <a href="/docs/transformers/pr_30530/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/pr_30530/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,oo,A,Ct,_e,$t,x,be,no,Qe,So=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_30530/en/model_doc/instructblipvideo#transformers.InstructBlipVideoQFormerModel">InstructBlipVideoQFormerModel</a>. It is used to
instantiate a InstructBlipVideo Querying Transformer (Q-Former) 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 InstructBlipVideo <a href="https://huggingface.co/Salesforce/instruct-blip-flan-t5" rel="nofollow">Salesforce/instruct-blip-flan-t5</a>
architecture. Configuration objects inherit from <a href="/docs/transformers/pr_30530/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/pr_30530/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,ro,Ee,Ao='Note that <a href="/docs/transformers/pr_30530/en/model_doc/instructblipvideo#transformers.InstructBlipVideoQFormerModel">InstructBlipVideoQFormerModel</a> is very similar to <a href="/docs/transformers/pr_30530/en/model_doc/bert#transformers.BertLMHeadModel">BertLMHeadModel</a> with interleaved cross-attention.',so,H,Jt,ye,kt,C,ve,ao,Se,Ho=`Constructs an InstructBLIPVideo processor which wraps a InstructBLIP image processor and a LLaMa/T5 tokenizer into a single
processor.`,io,Ae,Xo=`<a href="/docs/transformers/pr_30530/en/model_doc/instructblipvideo#transformers.InstructBlipVideoProcessor">InstructBlipVideoProcessor</a> offers all the functionalities of <a href="/docs/transformers/pr_30530/en/model_doc/instructblipvideo#transformers.InstructBlipVideoImageProcessor">InstructBlipVideoImageProcessor</a> and <a href="/docs/transformers/pr_30530/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See the
docstring of <code>__call__()</code> and <a href="/docs/transformers/pr_30530/en/model_doc/instructblipvideo#transformers.InstructBlipVideoProcessor.decode">decode()</a> for more information.`,lo,X,Ie,co,He,Yo=`This method forwards all its arguments to PreTrainedTokenizer’s <a href="/docs/transformers/pr_30530/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode">batch_decode()</a>. Please
refer to the docstring of this method for more information.`,po,Y,Me,mo,Xe,Do=`This method forwards all its arguments to PreTrainedTokenizer’s <a href="/docs/transformers/pr_30530/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode">decode()</a>. Please refer to
the docstring of this method for more information.`,xt,Te,Wt,F,we,uo,Ye,Oo="Constructs a InstructBLIPVideo image processor.",fo,D,Be,go,De,Ko="Preprocess a video or batch of images/videos.",Zt,Ve,zt,L,je,ho,P,Ce,_o,Oe,en='The <a href="/docs/transformers/pr_30530/en/model_doc/instructblipvideo#transformers.InstructBlipVideoVisionModel">InstructBlipVideoVisionModel</a> forward method, overrides the <code>__call__</code> special method.',bo,O,Ut,$e,Ft,N,Je,yo,Ke,tn=`Querying Transformer (Q-Former), used in InstructBlipVideo. Slightly modified from BLIP-2 as it also takes the
instruction as input.`,vo,R,ke,Io,et,on=`encoder_hidden_states  (<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 encoder. Used in the cross-attention if
the model is configured as a decoder.
encoder_attention_mask (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</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>:`,Mo,tt,nn=`<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> of length <code>config.n_layers</code> with each tuple having 4 tensors of:
shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>): 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>`,Nt,xe,Gt,w,We,To,ot,rn=`InstructBlipVideo Model for generating text given an image and an optional text prompt. The model consists of a vision
encoder, Querying Transformer (Q-Former) and a language model.`,wo,nt,sn=`One can optionally pass <code>input_ids</code> to the model, which serve as a text prompt, to make the language model continue
the prompt. Otherwise, the language model starts generating text from the [BOS] (beginning-of-sequence) token.`,Bo,rt,an=`This model inherits from <a href="/docs/transformers/pr_30530/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.)`,Vo,st,ln=`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.`,jo,z,Ze,Co,at,dn='The <a href="/docs/transformers/pr_30530/en/model_doc/instructblipvideo#transformers.InstructBlipVideoForConditionalGeneration">InstructBlipVideoForConditionalGeneration</a> forward method, overrides the <code>__call__</code> special method.',$o,K,Jo,ee,ko,te,ze,xo,it,cn="Overrides <code>generate</code> function to be able to use the model as a conditional generator.",qt,Ue,Pt,ut,Rt;return v=new U({props:{title:"InstructBlipVideo",local:"instructblipvideo",headingTag:"h1"}}),I=new U({props:{title:"Overview",local:"overview",headingTag:"h2"}}),ne=new U({props:{title:"Overview",local:"overview",headingTag:"h2"}}),de=new U({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),me=new U({props:{title:"InstructBlipVideoConfig",local:"transformers.InstructBlipVideoConfig",headingTag:"h2"}}),ue=new V({props:{name:"class transformers.InstructBlipVideoConfig",anchor:"transformers.InstructBlipVideoConfig",parameters:[{name:"vision_config",val:" = None"},{name:"qformer_config",val:" = None"},{name:"text_config",val:" = None"},{name:"num_query_tokens",val:" = 32"},{name:"video_token_index",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.InstructBlipVideoConfig.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/pr_30530/en/model_doc/instructblipvideo#transformers.InstructBlipVideoVisionConfig">InstructBlipVideoVisionConfig</a>.`,name:"vision_config"},{anchor:"transformers.InstructBlipVideoConfig.qformer_config",description:`<strong>qformer_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary of configuration options used to initialize <a href="/docs/transformers/pr_30530/en/model_doc/instructblipvideo#transformers.InstructBlipVideoQFormerConfig">InstructBlipVideoQFormerConfig</a>.`,name:"qformer_config"},{anchor:"transformers.InstructBlipVideoConfig.text_config",description:`<strong>text_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary of configuration options used to initialize any <a href="/docs/transformers/pr_30530/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a>.`,name:"text_config"},{anchor:"transformers.InstructBlipVideoConfig.num_query_tokens",description:`<strong>num_query_tokens</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
The number of query tokens passed through the Transformer.`,name:"num_query_tokens"},{anchor:"transformers.InstructBlipVideoConfig.video_token_index",description:`<strong>video_token_index</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Token index of special video token.`,name:"video_token_index"},{anchor:"transformers.InstructBlipVideoConfig.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Dictionary of keyword arguments.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/instructblipvideo/configuration_instructblipvideo.py#L220"}}),E=new At({props:{anchor:"transformers.InstructBlipVideoConfig.example",$$slots:{default:[yn]},$$scope:{ctx:$}}}),fe=new V({props:{name:"from_vision_qformer_text_configs",anchor:"transformers.InstructBlipVideoConfig.from_vision_qformer_text_configs",parameters:[{name:"vision_config",val:": InstructBlipVideoVisionConfig"},{name:"qformer_config",val:": InstructBlipVideoQFormerConfig"},{name:"text_config",val:": PretrainedConfig"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/instructblipvideo/configuration_instructblipvideo.py#L321",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/pr_30530/en/model_doc/instructblipvideo#transformers.InstructBlipVideoConfig"
>InstructBlipVideoConfig</a></p>
`}}),ge=new U({props:{title:"InstructBlipVideoVisionConfig",local:"transformers.InstructBlipVideoVisionConfig",headingTag:"h2"}}),he=new V({props:{name:"class transformers.InstructBlipVideoVisionConfig",anchor:"transformers.InstructBlipVideoVisionConfig",parameters:[{name:"hidden_size",val:" = 1408"},{name:"intermediate_size",val:" = 6144"},{name:"num_hidden_layers",val:" = 39"},{name:"num_attention_heads",val:" = 16"},{name:"image_size",val:" = 224"},{name:"patch_size",val:" = 14"},{name:"hidden_act",val:" = 'gelu'"},{name:"layer_norm_eps",val:" = 1e-06"},{name:"attention_dropout",val:" = 0.0"},{name:"initializer_range",val:" = 1e-10"},{name:"qkv_bias",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.InstructBlipVideoVisionConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1408) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.InstructBlipVideoVisionConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 6144) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.InstructBlipVideoVisionConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 39) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.InstructBlipVideoVisionConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.InstructBlipVideoVisionConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 224) &#x2014;
The size (resolution) of each image.`,name:"image_size"},{anchor:"transformers.InstructBlipVideoVisionConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 14) &#x2014;
The size (resolution) of each patch.`,name:"patch_size"},{anchor:"transformers.InstructBlipVideoVisionConfig.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. to 1e-5): The epsilon used by the layer
normalization layers.`,name:"hidden_act"},{anchor:"transformers.InstructBlipVideoVisionConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-06) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.InstructBlipVideoVisionConfig.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.InstructBlipVideoVisionConfig.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"},{anchor:"transformers.InstructBlipVideoVisionConfig.qkv_bias",description:`<strong>qkv_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to add a bias to the queries and values in the self-attention layers.`,name:"qkv_bias"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/instructblipvideo/configuration_instructblipvideo.py#L32"}}),A=new At({props:{anchor:"transformers.InstructBlipVideoVisionConfig.example",$$slots:{default:[vn]},$$scope:{ctx:$}}}),_e=new U({props:{title:"InstructBlipVideoQFormerConfig",local:"transformers.InstructBlipVideoQFormerConfig",headingTag:"h2"}}),be=new V({props:{name:"class transformers.InstructBlipVideoQFormerConfig",anchor:"transformers.InstructBlipVideoQFormerConfig",parameters:[{name:"vocab_size",val:" = 30522"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 512"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"pad_token_id",val:" = 0"},{name:"position_embedding_type",val:" = 'absolute'"},{name:"cross_attention_frequency",val:" = 2"},{name:"encoder_hidden_size",val:" = 1408"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.InstructBlipVideoQFormerConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the Q-Former model. Defines the number of different tokens that can be represented by
the <code>inputs_ids</code> passed when calling the model.`,name:"vocab_size"},{anchor:"transformers.InstructBlipVideoQFormerConfig.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.InstructBlipVideoQFormerConfig.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.InstructBlipVideoQFormerConfig.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.InstructBlipVideoQFormerConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.InstructBlipVideoQFormerConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>Callable</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;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.InstructBlipVideoQFormerConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.InstructBlipVideoQFormerConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.InstructBlipVideoQFormerConfig.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.InstructBlipVideoQFormerConfig.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.InstructBlipVideoQFormerConfig.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.InstructBlipVideoQFormerConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Token id used for padding sequences.`,name:"pad_token_id"},{anchor:"transformers.InstructBlipVideoQFormerConfig.position_embedding_type",description:`<strong>position_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;absolute&quot;</code>) &#x2014;
Type of position embedding. Choose one of <code>&quot;absolute&quot;</code>, <code>&quot;relative_key&quot;</code>, <code>&quot;relative_key_query&quot;</code>. For
positional embeddings use <code>&quot;absolute&quot;</code>. For more information on <code>&quot;relative_key&quot;</code>, please refer to
<a href="https://arxiv.org/abs/1803.02155" rel="nofollow">Self-Attention with Relative Position Representations (Shaw et al.)</a>.
For more information on <code>&quot;relative_key_query&quot;</code>, please refer to <em>Method 4</em> in <a href="https://arxiv.org/abs/2009.13658" rel="nofollow">Improve Transformer Models
with Better Relative Position Embeddings (Huang et al.)</a>.`,name:"position_embedding_type"},{anchor:"transformers.InstructBlipVideoQFormerConfig.cross_attention_frequency",description:`<strong>cross_attention_frequency</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The frequency of adding cross-attention to the Transformer layers.`,name:"cross_attention_frequency"},{anchor:"transformers.InstructBlipVideoQFormerConfig.encoder_hidden_size",description:`<strong>encoder_hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1408) &#x2014;
The hidden size of the hidden states for cross-attention.`,name:"encoder_hidden_size"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/instructblipvideo/configuration_instructblipvideo.py#L116"}}),H=new At({props:{anchor:"transformers.InstructBlipVideoQFormerConfig.example",$$slots:{default:[In]},$$scope:{ctx:$}}}),ye=new U({props:{title:"InstructBlipVideoProcessor",local:"transformers.InstructBlipVideoProcessor",headingTag:"h2"}}),ve=new V({props:{name:"class transformers.InstructBlipVideoProcessor",anchor:"transformers.InstructBlipVideoProcessor",parameters:[{name:"image_processor",val:""},{name:"tokenizer",val:""},{name:"qformer_tokenizer",val:""},{name:"num_query_tokens",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.InstructBlipVideoProcessor.image_processor",description:`<strong>image_processor</strong> (<code>InstructBlipVideoImageProcessor</code>) &#x2014;
An instance of <a href="/docs/transformers/pr_30530/en/model_doc/instructblipvideo#transformers.InstructBlipVideoImageProcessor">InstructBlipVideoImageProcessor</a>. The image processor is a required input.`,name:"image_processor"},{anchor:"transformers.InstructBlipVideoProcessor.tokenizer",description:"<strong>tokenizer</strong> (<code>AutoTokenizer</code>) &#x2014;\nAn instance of [&#x2018;PreTrainedTokenizer`]. The tokenizer is a required input.",name:"tokenizer"},{anchor:"transformers.InstructBlipVideoProcessor.qformer_tokenizer",description:"<strong>qformer_tokenizer</strong> (<code>AutoTokenizer</code>) &#x2014;\nAn instance of [&#x2018;PreTrainedTokenizer`]. The Q-Former tokenizer is a required input.",name:"qformer_tokenizer"},{anchor:"transformers.InstructBlipVideoProcessor.num_query_tokens",description:`<strong>num_query_tokens</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Number of tokens used by the Qformer as queries, should be same as in model&#x2019;s config.`,name:"num_query_tokens"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/instructblipvideo/processing_instructblipvideo.py#L40"}}),Ie=new V({props:{name:"batch_decode",anchor:"transformers.InstructBlipVideoProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/instructblipvideo/processing_instructblipvideo.py#L185"}}),Me=new V({props:{name:"decode",anchor:"transformers.InstructBlipVideoProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/instructblipvideo/processing_instructblipvideo.py#L193"}}),Te=new U({props:{title:"InstructBlipVideoImageProcessor",local:"transformers.InstructBlipVideoImageProcessor",headingTag:"h2"}}),we=new V({props:{name:"class transformers.InstructBlipVideoImageProcessor",anchor:"transformers.InstructBlipVideoImageProcessor",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.InstructBlipVideoImageProcessor.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.InstructBlipVideoImageProcessor.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.InstructBlipVideoImageProcessor.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.InstructBlipVideoImageProcessor.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.InstructBlipVideoImageProcessor.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.InstructBlipVideoImageProcessor.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.InstructBlipVideoImageProcessor.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.InstructBlipVideoImageProcessor.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.InstructBlipVideoImageProcessor.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/vr_30530/src/transformers/models/instructblipvideo/image_processing_instructblipvideo.py#L70"}}),Be=new V({props:{name:"preprocess",anchor:"transformers.InstructBlipVideoImageProcessor.preprocess",parameters:[{name:"images",val:": typing.Union[typing.List[ForwardRef('PIL.Image.Image')], ForwardRef('np.ndarray'), ForwardRef('torch.Tensor'), typing.List[ForwardRef('np.ndarray')], typing.List[ForwardRef('torch.Tensor')], typing.List[typing.List[ForwardRef('PIL.Image.Image')]], typing.List[typing.List[ForwardRef('np.ndarrray')]], typing.List[typing.List[ForwardRef('torch.Tensor')]]] = None"},{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.InstructBlipVideoImageProcessor.preprocess.videos",description:`<strong>videos</strong> (<code>VideoInput</code>) &#x2014;
Video frames to preprocess. Expects a single or batch of videos as a list of frames with pixel values
ranging from 0 to 255. If passing in video with pixel values between 0 and 1, set <code>do_rescale=False</code>.`,name:"videos"},{anchor:"transformers.InstructBlipVideoImageProcessor.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 video.`,name:"do_resize"},{anchor:"transformers.InstructBlipVideoImageProcessor.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 video 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.InstructBlipVideoImageProcessor.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 video. Only has an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"resample"},{anchor:"transformers.InstructBlipVideoImageProcessor.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 video values between [0 - 1].`,name:"do_rescale"},{anchor:"transformers.InstructBlipVideoImageProcessor.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 video by if <code>do_rescale</code> is set to <code>True</code>.`,name:"rescale_factor"},{anchor:"transformers.InstructBlipVideoImageProcessor.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 video.`,name:"do_normalize"},{anchor:"transformers.InstructBlipVideoImageProcessor.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 video by if <code>do_normalize</code> is set to <code>True</code>.`,name:"image_mean"},{anchor:"transformers.InstructBlipVideoImageProcessor.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 video by if <code>do_normalize</code> is set to <code>True</code>.`,name:"image_std"},{anchor:"transformers.InstructBlipVideoImageProcessor.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.InstructBlipVideoImageProcessor.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.InstructBlipVideoImageProcessor.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.InstructBlipVideoImageProcessor.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/vr_30530/src/transformers/models/instructblipvideo/image_processing_instructblipvideo.py#L185"}}),Ve=new U({props:{title:"InstructBlipVideoVisionModel",local:"transformers.InstructBlipVideoVisionModel",headingTag:"h2"}}),je=new V({props:{name:"class transformers.InstructBlipVideoVisionModel",anchor:"transformers.InstructBlipVideoVisionModel",parameters:[{name:"config",val:": InstructBlipVideoVisionConfig"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/instructblipvideo/modeling_instructblipvideo.py#L453"}}),Ce=new V({props:{name:"forward",anchor:"transformers.InstructBlipVideoVisionModel.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.InstructBlipVideoVisionModel.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. Pixel values can be obtained using <a href="/docs/transformers/pr_30530/en/model_doc/instructblipvideo#transformers.InstructBlipVideoProcessor">InstructBlipVideoProcessor</a>. See
<code>InstructBlipVideoProcessor.__call__()</code> for details.`,name:"pixel_values"},{anchor:"transformers.InstructBlipVideoVisionModel.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.InstructBlipVideoVisionModel.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.InstructBlipVideoVisionModel.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/pr_30530/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.InstructBlipVideoVisionModel.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/vr_30530/src/transformers/models/instructblipvideo/modeling_instructblipvideo.py#L468",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_30530/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.instructblipvideo.configuration_instructblipvideo.InstructBlipVideoVisionConfig'&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/pr_30530/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),O=new pn({props:{$$slots:{default:[Mn]},$$scope:{ctx:$}}}),$e=new U({props:{title:"InstructBlipVideoQFormerModel",local:"transformers.InstructBlipVideoQFormerModel",headingTag:"h2"}}),Je=new V({props:{name:"class transformers.InstructBlipVideoQFormerModel",anchor:"transformers.InstructBlipVideoQFormerModel",parameters:[{name:"config",val:": InstructBlipVideoQFormerConfig"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/instructblipvideo/modeling_instructblipvideo.py#L994"}}),ke=new V({props:{name:"forward",anchor:"transformers.InstructBlipVideoQFormerModel.forward",parameters:[{name:"input_ids",val:": LongTensor"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"query_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[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"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/instructblipvideo/modeling_instructblipvideo.py#L1067"}}),xe=new U({props:{title:"InstructBlipVideoForConditionalGeneration",local:"transformers.InstructBlipVideoForConditionalGeneration",headingTag:"h2"}}),We=new V({props:{name:"class transformers.InstructBlipVideoForConditionalGeneration",anchor:"transformers.InstructBlipVideoForConditionalGeneration",parameters:[{name:"config",val:": InstructBlipVideoConfig"}],parametersDescription:[{anchor:"transformers.InstructBlipVideoForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_30530/en/model_doc/instructblipvideo#transformers.InstructBlipVideoConfig">InstructBlipVideoConfig</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/pr_30530/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/vr_30530/src/transformers/models/instructblipvideo/modeling_instructblipvideo.py#L1271"}}),Ze=new V({props:{name:"forward",anchor:"transformers.InstructBlipVideoForConditionalGeneration.forward",parameters:[{name:"pixel_values",val:": FloatTensor"},{name:"qformer_input_ids",val:": FloatTensor"},{name:"qformer_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"input_ids",val:": typing.Optional[torch.FloatTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_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.InstructBlipVideoForConditionalGeneration.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. Pixel values can be obtained using <a href="/docs/transformers/pr_30530/en/model_doc/instructblipvideo#transformers.InstructBlipVideoProcessor">InstructBlipVideoProcessor</a>. See
<code>InstructBlipVideoProcessor.__call__()</code> for details.`,name:"pixel_values"},{anchor:"transformers.InstructBlipVideoForConditionalGeneration.forward.qformer_input_ids",description:`<strong>qformer_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary of the Q-Former. Input tokens can optionally be provided
to serve as text prompt, which the Q-Former model will encode.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30530/en/model_doc/instructblipvideo#transformers.InstructBlipVideoProcessor">InstructBlipVideoProcessor</a>. See <code>InstructBlipVideoProcessor.__call__()</code> for
details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"qformer_input_ids"},{anchor:"transformers.InstructBlipVideoForConditionalGeneration.forward.qformer_attention_mask",description:`<strong>qformer_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:"qformer_attention_mask"},{anchor:"transformers.InstructBlipVideoForConditionalGeneration.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of input sequence tokens in the vocabulary of the language model. Input tokens can optionally be
provided to serve as text prompt, which the language model can continue.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30530/en/model_doc/instructblipvideo#transformers.InstructBlipVideoProcessor">InstructBlipVideoProcessor</a>. See <code>InstructBlipVideoProcessor.__call__()</code> for
details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.InstructBlipVideoForConditionalGeneration.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.InstructBlipVideoForConditionalGeneration.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary of the language model. Only relevant in case an
encoder-decoder language model (like T5) is used.</p>
<p>Indices can be obtained using <a href="/docs/transformers/pr_30530/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_30530/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_30530/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#decoder-input-ids">What are decoder input IDs?</a>`,name:"decoder_input_ids"},{anchor:"transformers.InstructBlipVideoForConditionalGeneration.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.BoolTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>Only relevant in case an encoder-decoder language model (like T5) is used.`,name:"decoder_attention_mask"},{anchor:"transformers.InstructBlipVideoForConditionalGeneration.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.InstructBlipVideoForConditionalGeneration.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.InstructBlipVideoForConditionalGeneration.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/pr_30530/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.InstructBlipVideoForConditionalGeneration.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"},{anchor:"transformers.InstructBlipVideoForConditionalGeneration.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size - 1]</code>. All labels set to <code>-100</code> are ignored (masked), the loss is only computed for labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/instructblipvideo/modeling_instructblipvideo.py#L1354",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <code>transformers.models.instructblipvideo.modeling_instructblipvideo.InstructBlipVideoForConditionalGenerationModelOutput</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.instructblipvideo.configuration_instructblipvideo.InstructBlipVideoVisionConfig'&gt;</code>) and inputs.</p>
<ul>
<li><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>) — Language modeling loss from the language model.</li>
<li><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) — Prediction scores of the language modeling head of the language model.</li>
<li><strong>vision_outputs</strong> (<code>BaseModelOutputWithPooling</code>) — Outputs of the vision encoder.</li>
<li><strong>qformer_outputs</strong> (<code>BaseModelOutputWithPoolingAndCrossAttentions</code>) — Outputs of the Q-Former (Querying Transformer).</li>
<li><strong>language_model_outputs</strong> (<code>CausalLMOutputWithPast</code> or <code>Seq2SeqLMOutput</code>) — Outputs of the language model.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>transformers.models.instructblipvideo.modeling_instructblipvideo.InstructBlipVideoForConditionalGenerationModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),K=new pn({props:{$$slots:{default:[Tn]},$$scope:{ctx:$}}}),ee=new At({props:{anchor:"transformers.InstructBlipVideoForConditionalGeneration.forward.example",$$slots:{default:[wn]},$$scope:{ctx:$}}}),ze=new V({props:{name:"generate",anchor:"transformers.InstructBlipVideoForConditionalGeneration.generate",parameters:[{name:"pixel_values",val:": FloatTensor"},{name:"qformer_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"qformer_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"interpolate_pos_encoding",val:": bool = False"},{name:"**generate_kwargs",val:""}],parametersDescription:[{anchor:"transformers.InstructBlipVideoForConditionalGeneration.generate.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape (batch_size, num_channels, height, width) or &#x2014;
(batch_size, num_frames, num_channels, height, width)): Input images or videos to be processed.`,name:"pixel_values"},{anchor:"transformers.InstructBlipVideoForConditionalGeneration.generate.qformer_input_ids",description:`<strong>qformer_input_ids</strong> (<code>torch.LongTensor</code> of shape (batch_size, sequence_length), <em>optional</em>) &#x2014;
The sequence used as a prompt to be fed to the Q-Former module.`,name:"qformer_input_ids"},{anchor:"transformers.InstructBlipVideoForConditionalGeneration.generate.qformer_attention_mask",description:`<strong>qformer_attention_mask</strong> (<code>torch.LongTensor</code> of shape (batch_size, sequence_length), <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices.`,name:"qformer_attention_mask"},{anchor:"transformers.InstructBlipVideoForConditionalGeneration.generate.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape (batch_size, sequence_length), <em>optional</em>) &#x2014;
The sequence used as a prompt for the generation.`,name:"input_ids"},{anchor:"transformers.InstructBlipVideoForConditionalGeneration.generate.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape (batch_size, sequence_length), <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices.`,name:"attention_mask"},{anchor:"transformers.InstructBlipVideoForConditionalGeneration.generate.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 positional encoding of the image embeddings.`,name:"interpolate_pos_encoding"}],source:"https://github.com/huggingface/transformers/blob/vr_30530/src/transformers/models/instructblipvideo/modeling_instructblipvideo.py#L1556",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A list of strings of length batch_size * num_captions.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p>captions (list)</p>
`}}),Ue=new bn({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/instructblipvideo.md"}}),{c(){l=d("meta"),M=n(),b=d("p"),p=n(),m(v.$$.fragment),a=n(),m(I.$$.fragment),ft=n(),m(ne.$$.fragment),gt=n(),re=d("p"),re.innerHTML=Wo,ht=n(),se=d("p"),se.textContent=Zo,_t=n(),ae=d("p"),ae.innerHTML=zo,bt=n(),Q=d("img"),yt=n(),ie=d("small"),ie.innerHTML=Fo,vt=n(),le=d("p"),le.innerHTML=No,It=n(),m(de.$$.fragment),Mt=n(),ce=d("ul"),ce.innerHTML=Go,Tt=n(),pe=d("blockquote"),pe.innerHTML=qo,wt=n(),m(me.$$.fragment),Bt=n(),j=d("div"),m(ue.$$.fragment),Xt=n(),Ge=d("p"),Ge.innerHTML=Po,Yt=n(),qe=d("p"),qe.innerHTML=Ro,Dt=n(),m(E.$$.fragment),Ot=n(),S=d("div"),m(fe.$$.fragment),Kt=n(),Pe=d("p"),Pe.innerHTML=Lo,Vt=n(),m(ge.$$.fragment),jt=n(),k=d("div"),m(he.$$.fragment),eo=n(),Re=d("p"),Re.innerHTML=Qo,to=n(),Le=d("p"),Le.innerHTML=Eo,oo=n(),m(A.$$.fragment),Ct=n(),m(_e.$$.fragment),$t=n(),x=d("div"),m(be.$$.fragment),no=n(),Qe=d("p"),Qe.innerHTML=So,ro=n(),Ee=d("p"),Ee.innerHTML=Ao,so=n(),m(H.$$.fragment),Jt=n(),m(ye.$$.fragment),kt=n(),C=d("div"),m(ve.$$.fragment),ao=n(),Se=d("p"),Se.textContent=Ho,io=n(),Ae=d("p"),Ae.innerHTML=Xo,lo=n(),X=d("div"),m(Ie.$$.fragment),co=n(),He=d("p"),He.innerHTML=Yo,po=n(),Y=d("div"),m(Me.$$.fragment),mo=n(),Xe=d("p"),Xe.innerHTML=Do,xt=n(),m(Te.$$.fragment),Wt=n(),F=d("div"),m(we.$$.fragment),uo=n(),Ye=d("p"),Ye.textContent=Oo,fo=n(),D=d("div"),m(Be.$$.fragment),go=n(),De=d("p"),De.textContent=Ko,Zt=n(),m(Ve.$$.fragment),zt=n(),L=d("div"),m(je.$$.fragment),ho=n(),P=d("div"),m(Ce.$$.fragment),_o=n(),Oe=d("p"),Oe.innerHTML=en,bo=n(),m(O.$$.fragment),Ut=n(),m($e.$$.fragment),Ft=n(),N=d("div"),m(Je.$$.fragment),yo=n(),Ke=d("p"),Ke.textContent=tn,vo=n(),R=d("div"),m(ke.$$.fragment),Io=n(),et=d("p"),et.innerHTML=on,Mo=n(),tt=d("ul"),tt.innerHTML=nn,Nt=n(),m(xe.$$.fragment),Gt=n(),w=d("div"),m(We.$$.fragment),To=n(),ot=d("p"),ot.textContent=rn,wo=n(),nt=d("p"),nt.innerHTML=sn,Bo=n(),rt=d("p"),rt.innerHTML=an,Vo=n(),st=d("p"),st.innerHTML=ln,jo=n(),z=d("div"),m(Ze.$$.fragment),Co=n(),at=d("p"),at.innerHTML=dn,$o=n(),m(K.$$.fragment),Jo=n(),m(ee.$$.fragment),ko=n(),te=d("div"),m(ze.$$.fragment),xo=n(),it=d("p"),it.innerHTML=cn,qt=n(),m(Ue.$$.fragment),Pt=n(),ut=d("p"),this.h()},l(e){const o=_n("svelte-u9bgzb",document.head);l=c(o,"META",{name:!0,content:!0}),o.forEach(t),M=r(e),b=c(e,"P",{}),B(b).forEach(t),p=r(e),u(v.$$.fragment,e),a=r(e),u(I.$$.fragment,e),ft=r(e),u(ne.$$.fragment,e),gt=r(e),re=c(e,"P",{"data-svelte-h":!0}),y(re)!=="svelte-1yas5ek"&&(re.innerHTML=Wo),ht=r(e),se=c(e,"P",{"data-svelte-h":!0}),y(se)!=="svelte-vfdo9a"&&(se.textContent=Zo),_t=r(e),ae=c(e,"P",{"data-svelte-h":!0}),y(ae)!=="svelte-g3w4hv"&&(ae.innerHTML=zo),bt=r(e),Q=c(e,"IMG",{src:!0,alt:!0,width:!0}),yt=r(e),ie=c(e,"SMALL",{"data-svelte-h":!0}),y(ie)!=="svelte-1odm781"&&(ie.innerHTML=Fo),vt=r(e),le=c(e,"P",{"data-svelte-h":!0}),y(le)!=="svelte-1plrd7p"&&(le.innerHTML=No),It=r(e),u(de.$$.fragment,e),Mt=r(e),ce=c(e,"UL",{"data-svelte-h":!0}),y(ce)!=="svelte-l3xryg"&&(ce.innerHTML=Go),Tt=r(e),pe=c(e,"BLOCKQUOTE",{"data-svelte-h":!0}),y(pe)!=="svelte-w0b318"&&(pe.innerHTML=qo),wt=r(e),u(me.$$.fragment,e),Bt=r(e),j=c(e,"DIV",{class:!0});var W=B(j);u(ue.$$.fragment,W),Xt=r(W),Ge=c(W,"P",{"data-svelte-h":!0}),y(Ge)!=="svelte-fouqjy"&&(Ge.innerHTML=Po),Yt=r(W),qe=c(W,"P",{"data-svelte-h":!0}),y(qe)!=="svelte-l1blo3"&&(qe.innerHTML=Ro),Dt=r(W),u(E.$$.fragment,W),Ot=r(W),S=c(W,"DIV",{class:!0});var Fe=B(S);u(fe.$$.fragment,Fe),Kt=r(Fe),Pe=c(Fe,"P",{"data-svelte-h":!0}),y(Pe)!=="svelte-1i9w9zj"&&(Pe.innerHTML=Lo),Fe.forEach(t),W.forEach(t),Vt=r(e),u(ge.$$.fragment,e),jt=r(e),k=c(e,"DIV",{class:!0});var G=B(k);u(he.$$.fragment,G),eo=r(G),Re=c(G,"P",{"data-svelte-h":!0}),y(Re)!=="svelte-f4j8ai"&&(Re.innerHTML=Qo),to=r(G),Le=c(G,"P",{"data-svelte-h":!0}),y(Le)!=="svelte-l1blo3"&&(Le.innerHTML=Eo),oo=r(G),u(A.$$.fragment,G),G.forEach(t),Ct=r(e),u(_e.$$.fragment,e),$t=r(e),x=c(e,"DIV",{class:!0});var q=B(x);u(be.$$.fragment,q),no=r(q),Qe=c(q,"P",{"data-svelte-h":!0}),y(Qe)!=="svelte-1gjgk6i"&&(Qe.innerHTML=So),ro=r(q),Ee=c(q,"P",{"data-svelte-h":!0}),y(Ee)!=="svelte-lbzewu"&&(Ee.innerHTML=Ao),so=r(q),u(H.$$.fragment,q),q.forEach(t),Jt=r(e),u(ye.$$.fragment,e),kt=r(e),C=c(e,"DIV",{class:!0});var Z=B(C);u(ve.$$.fragment,Z),ao=r(Z),Se=c(Z,"P",{"data-svelte-h":!0}),y(Se)!=="svelte-vkjqyr"&&(Se.textContent=Ho),io=r(Z),Ae=c(Z,"P",{"data-svelte-h":!0}),y(Ae)!=="svelte-1n642k9"&&(Ae.innerHTML=Xo),lo=r(Z),X=c(Z,"DIV",{class:!0});var Ne=B(X);u(Ie.$$.fragment,Ne),co=r(Ne),He=c(Ne,"P",{"data-svelte-h":!0}),y(He)!=="svelte-86uk2u"&&(He.innerHTML=Yo),Ne.forEach(t),po=r(Z),Y=c(Z,"DIV",{class:!0});var Lt=B(Y);u(Me.$$.fragment,Lt),mo=r(Lt),Xe=c(Lt,"P",{"data-svelte-h":!0}),y(Xe)!=="svelte-sny0k4"&&(Xe.innerHTML=Do),Lt.forEach(t),Z.forEach(t),xt=r(e),u(Te.$$.fragment,e),Wt=r(e),F=c(e,"DIV",{class:!0});var lt=B(F);u(we.$$.fragment,lt),uo=r(lt),Ye=c(lt,"P",{"data-svelte-h":!0}),y(Ye)!=="svelte-7qjslq"&&(Ye.textContent=Oo),fo=r(lt),D=c(lt,"DIV",{class:!0});var Qt=B(D);u(Be.$$.fragment,Qt),go=r(Qt),De=c(Qt,"P",{"data-svelte-h":!0}),y(De)!=="svelte-llto5r"&&(De.textContent=Ko),Qt.forEach(t),lt.forEach(t),Zt=r(e),u(Ve.$$.fragment,e),zt=r(e),L=c(e,"DIV",{class:!0});var Et=B(L);u(je.$$.fragment,Et),ho=r(Et),P=c(Et,"DIV",{class:!0});var dt=B(P);u(Ce.$$.fragment,dt),_o=r(dt),Oe=c(dt,"P",{"data-svelte-h":!0}),y(Oe)!=="svelte-1xg2a6q"&&(Oe.innerHTML=en),bo=r(dt),u(O.$$.fragment,dt),dt.forEach(t),Et.forEach(t),Ut=r(e),u($e.$$.fragment,e),Ft=r(e),N=c(e,"DIV",{class:!0});var ct=B(N);u(Je.$$.fragment,ct),yo=r(ct),Ke=c(ct,"P",{"data-svelte-h":!0}),y(Ke)!=="svelte-cox9zr"&&(Ke.textContent=tn),vo=r(ct),R=c(ct,"DIV",{class:!0});var pt=B(R);u(ke.$$.fragment,pt),Io=r(pt),et=c(pt,"P",{"data-svelte-h":!0}),y(et)!=="svelte-1h74cdd"&&(et.innerHTML=on),Mo=r(pt),tt=c(pt,"UL",{"data-svelte-h":!0}),y(tt)!=="svelte-1yyv1jy"&&(tt.innerHTML=nn),pt.forEach(t),ct.forEach(t),Nt=r(e),u(xe.$$.fragment,e),Gt=r(e),w=c(e,"DIV",{class:!0});var J=B(w);u(We.$$.fragment,J),To=r(J),ot=c(J,"P",{"data-svelte-h":!0}),y(ot)!=="svelte-74lplt"&&(ot.textContent=rn),wo=r(J),nt=c(J,"P",{"data-svelte-h":!0}),y(nt)!=="svelte-1ks26sg"&&(nt.innerHTML=sn),Bo=r(J),rt=c(J,"P",{"data-svelte-h":!0}),y(rt)!=="svelte-19piw51"&&(rt.innerHTML=an),Vo=r(J),st=c(J,"P",{"data-svelte-h":!0}),y(st)!=="svelte-hswkmf"&&(st.innerHTML=ln),jo=r(J),z=c(J,"DIV",{class:!0});var oe=B(z);u(Ze.$$.fragment,oe),Co=r(oe),at=c(oe,"P",{"data-svelte-h":!0}),y(at)!=="svelte-16i95l0"&&(at.innerHTML=dn),$o=r(oe),u(K.$$.fragment,oe),Jo=r(oe),u(ee.$$.fragment,oe),oe.forEach(t),ko=r(J),te=c(J,"DIV",{class:!0});var St=B(te);u(ze.$$.fragment,St),xo=r(St),it=c(St,"P",{"data-svelte-h":!0}),y(it)!=="svelte-eq620n"&&(it.innerHTML=cn),St.forEach(t),J.forEach(t),qt=r(e),u(Ue.$$.fragment,e),Pt=r(e),ut=c(e,"P",{}),B(ut).forEach(t),this.h()},h(){T(l,"name","hf:doc:metadata"),T(l,"content",Vn),un(Q.src,Uo="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/instructblip_architecture.jpg")||T(Q,"src",Uo),T(Q,"alt","drawing"),T(Q,"width","600"),T(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),T(w,"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,o){s(document.head,l),i(e,M,o),i(e,b,o),i(e,p,o),f(v,e,o),i(e,a,o),f(I,e,o),i(e,ft,o),f(ne,e,o),i(e,gt,o),i(e,re,o),i(e,ht,o),i(e,se,o),i(e,_t,o),i(e,ae,o),i(e,bt,o),i(e,Q,o),i(e,yt,o),i(e,ie,o),i(e,vt,o),i(e,le,o),i(e,It,o),f(de,e,o),i(e,Mt,o),i(e,ce,o),i(e,Tt,o),i(e,pe,o),i(e,wt,o),f(me,e,o),i(e,Bt,o),i(e,j,o),f(ue,j,null),s(j,Xt),s(j,Ge),s(j,Yt),s(j,qe),s(j,Dt),f(E,j,null),s(j,Ot),s(j,S),f(fe,S,null),s(S,Kt),s(S,Pe),i(e,Vt,o),f(ge,e,o),i(e,jt,o),i(e,k,o),f(he,k,null),s(k,eo),s(k,Re),s(k,to),s(k,Le),s(k,oo),f(A,k,null),i(e,Ct,o),f(_e,e,o),i(e,$t,o),i(e,x,o),f(be,x,null),s(x,no),s(x,Qe),s(x,ro),s(x,Ee),s(x,so),f(H,x,null),i(e,Jt,o),f(ye,e,o),i(e,kt,o),i(e,C,o),f(ve,C,null),s(C,ao),s(C,Se),s(C,io),s(C,Ae),s(C,lo),s(C,X),f(Ie,X,null),s(X,co),s(X,He),s(C,po),s(C,Y),f(Me,Y,null),s(Y,mo),s(Y,Xe),i(e,xt,o),f(Te,e,o),i(e,Wt,o),i(e,F,o),f(we,F,null),s(F,uo),s(F,Ye),s(F,fo),s(F,D),f(Be,D,null),s(D,go),s(D,De),i(e,Zt,o),f(Ve,e,o),i(e,zt,o),i(e,L,o),f(je,L,null),s(L,ho),s(L,P),f(Ce,P,null),s(P,_o),s(P,Oe),s(P,bo),f(O,P,null),i(e,Ut,o),f($e,e,o),i(e,Ft,o),i(e,N,o),f(Je,N,null),s(N,yo),s(N,Ke),s(N,vo),s(N,R),f(ke,R,null),s(R,Io),s(R,et),s(R,Mo),s(R,tt),i(e,Nt,o),f(xe,e,o),i(e,Gt,o),i(e,w,o),f(We,w,null),s(w,To),s(w,ot),s(w,wo),s(w,nt),s(w,Bo),s(w,rt),s(w,Vo),s(w,st),s(w,jo),s(w,z),f(Ze,z,null),s(z,Co),s(z,at),s(z,$o),f(K,z,null),s(z,Jo),f(ee,z,null),s(w,ko),s(w,te),f(ze,te,null),s(te,xo),s(te,it),i(e,qt,o),f(Ue,e,o),i(e,Pt,o),i(e,ut,o),Rt=!0},p(e,[o]){const W={};o&2&&(W.$$scope={dirty:o,ctx:e}),E.$set(W);const Fe={};o&2&&(Fe.$$scope={dirty:o,ctx:e}),A.$set(Fe);const G={};o&2&&(G.$$scope={dirty:o,ctx:e}),H.$set(G);const q={};o&2&&(q.$$scope={dirty:o,ctx:e}),O.$set(q);const Z={};o&2&&(Z.$$scope={dirty:o,ctx:e}),K.$set(Z);const Ne={};o&2&&(Ne.$$scope={dirty:o,ctx:e}),ee.$set(Ne)},i(e){Rt||(g(v.$$.fragment,e),g(I.$$.fragment,e),g(ne.$$.fragment,e),g(de.$$.fragment,e),g(me.$$.fragment,e),g(ue.$$.fragment,e),g(E.$$.fragment,e),g(fe.$$.fragment,e),g(ge.$$.fragment,e),g(he.$$.fragment,e),g(A.$$.fragment,e),g(_e.$$.fragment,e),g(be.$$.fragment,e),g(H.$$.fragment,e),g(ye.$$.fragment,e),g(ve.$$.fragment,e),g(Ie.$$.fragment,e),g(Me.$$.fragment,e),g(Te.$$.fragment,e),g(we.$$.fragment,e),g(Be.$$.fragment,e),g(Ve.$$.fragment,e),g(je.$$.fragment,e),g(Ce.$$.fragment,e),g(O.$$.fragment,e),g($e.$$.fragment,e),g(Je.$$.fragment,e),g(ke.$$.fragment,e),g(xe.$$.fragment,e),g(We.$$.fragment,e),g(Ze.$$.fragment,e),g(K.$$.fragment,e),g(ee.$$.fragment,e),g(ze.$$.fragment,e),g(Ue.$$.fragment,e),Rt=!0)},o(e){h(v.$$.fragment,e),h(I.$$.fragment,e),h(ne.$$.fragment,e),h(de.$$.fragment,e),h(me.$$.fragment,e),h(ue.$$.fragment,e),h(E.$$.fragment,e),h(fe.$$.fragment,e),h(ge.$$.fragment,e),h(he.$$.fragment,e),h(A.$$.fragment,e),h(_e.$$.fragment,e),h(be.$$.fragment,e),h(H.$$.fragment,e),h(ye.$$.fragment,e),h(ve.$$.fragment,e),h(Ie.$$.fragment,e),h(Me.$$.fragment,e),h(Te.$$.fragment,e),h(we.$$.fragment,e),h(Be.$$.fragment,e),h(Ve.$$.fragment,e),h(je.$$.fragment,e),h(Ce.$$.fragment,e),h(O.$$.fragment,e),h($e.$$.fragment,e),h(Je.$$.fragment,e),h(ke.$$.fragment,e),h(xe.$$.fragment,e),h(We.$$.fragment,e),h(Ze.$$.fragment,e),h(K.$$.fragment,e),h(ee.$$.fragment,e),h(ze.$$.fragment,e),h(Ue.$$.fragment,e),Rt=!1},d(e){e&&(t(M),t(b),t(p),t(a),t(ft),t(gt),t(re),t(ht),t(se),t(_t),t(ae),t(bt),t(Q),t(yt),t(ie),t(vt),t(le),t(It),t(Mt),t(ce),t(Tt),t(pe),t(wt),t(Bt),t(j),t(Vt),t(jt),t(k),t(Ct),t($t),t(x),t(Jt),t(kt),t(C),t(xt),t(Wt),t(F),t(Zt),t(zt),t(L),t(Ut),t(Ft),t(N),t(Nt),t(Gt),t(w),t(qt),t(Pt),t(ut)),t(l),_(v,e),_(I,e),_(ne,e),_(de,e),_(me,e),_(ue),_(E),_(fe),_(ge,e),_(he),_(A),_(_e,e),_(be),_(H),_(ye,e),_(ve),_(Ie),_(Me),_(Te,e),_(we),_(Be),_(Ve,e),_(je),_(Ce),_(O),_($e,e),_(Je),_(ke),_(xe,e),_(We),_(Ze),_(K),_(ee),_(ze),_(Ue,e)}}}const Vn='{"title":"InstructBlipVideo","local":"instructblipvideo","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage tips","local":"usage-tips","sections":[],"depth":2},{"title":"InstructBlipVideoConfig","local":"transformers.InstructBlipVideoConfig","sections":[],"depth":2},{"title":"InstructBlipVideoVisionConfig","local":"transformers.InstructBlipVideoVisionConfig","sections":[],"depth":2},{"title":"InstructBlipVideoQFormerConfig","local":"transformers.InstructBlipVideoQFormerConfig","sections":[],"depth":2},{"title":"InstructBlipVideoProcessor","local":"transformers.InstructBlipVideoProcessor","sections":[],"depth":2},{"title":"InstructBlipVideoImageProcessor","local":"transformers.InstructBlipVideoImageProcessor","sections":[],"depth":2},{"title":"InstructBlipVideoVisionModel","local":"transformers.InstructBlipVideoVisionModel","sections":[],"depth":2},{"title":"InstructBlipVideoQFormerModel","local":"transformers.InstructBlipVideoQFormerModel","sections":[],"depth":2},{"title":"InstructBlipVideoForConditionalGeneration","local":"transformers.InstructBlipVideoForConditionalGeneration","sections":[],"depth":2}],"depth":1}';function jn($){return fn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class zn extends gn{constructor(l){super(),hn(this,l,jn,Bn,mn,{})}}export{zn as component};
