Browse Source

Fix for when uploaded image has alpha channel

replicate
pharmapsychotic 2 years ago committed by GitHub
parent
commit
b423f7b090
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      clip_interrogator.ipynb

4
clip_interrogator.ipynb

@ -315,7 +315,7 @@
" print(uploader.value)\n",
" print(uploader.value.items())\n",
" for name, file_info in uploader.value.items():\n",
" image = Image.open(io.BytesIO(file_info['content']))\n",
" image = Image.open(io.BytesIO(file_info['content'])).convert('RGB')\n",
" break\n",
" else:\n",
" if str(image_url).startswith('http://') or str(image_url).startswith('https://'):\n",
@ -2180,4 +2180,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}

Loading…
Cancel
Save