Fix #21
This commit is contained in:
@@ -1900,9 +1900,13 @@
|
|||||||
"import torch\n",
|
"import torch\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# Load processor and main model\n",
|
"# Load processor and main model\n",
|
||||||
"blip_processor = AutoProcessor.from_pretrained(\"Salesforce/blip2-opt-2.7b\")\n",
|
"blip_processor = AutoProcessor.from_pretrained(\n",
|
||||||
|
" \"Salesforce/blip2-opt-2.7b\",\n",
|
||||||
|
" revision=\"51572668da0eb669e01a189dc22abe6088589a24\" # Choose specific model because of: https://huggingface.co/Salesforce/blip2-opt-2.7b/discussions/39\n",
|
||||||
|
")\n",
|
||||||
"model = Blip2ForConditionalGeneration.from_pretrained(\n",
|
"model = Blip2ForConditionalGeneration.from_pretrained(\n",
|
||||||
" \"Salesforce/blip2-opt-2.7b\",\n",
|
" \"Salesforce/blip2-opt-2.7b\",\n",
|
||||||
|
" revision=\"51572668da0eb669e01a189dc22abe6088589a24\",\n",
|
||||||
" torch_dtype=torch.float16\n",
|
" torch_dtype=torch.float16\n",
|
||||||
")\n",
|
")\n",
|
||||||
"\n",
|
"\n",
|
||||||
@@ -2649,7 +2653,7 @@
|
|||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.10.14"
|
"version": "3.10.13"
|
||||||
},
|
},
|
||||||
"widgets": {
|
"widgets": {
|
||||||
"application/vnd.jupyter.widget-state+json": {
|
"application/vnd.jupyter.widget-state+json": {
|
||||||
|
|||||||
Reference in New Issue
Block a user