Comments (6)
Should be solved by commit that fixed #12
from promptvision.
Unfortunately, this is still an issue.
I can see a flash of the thumbnail view with image, but then it gets overlaid with the debugger window.
Error message
Thumbnail Section Output
OSError
OSError: cannot write mode RGBA as JPEG
Traceback (most recent call last)
File "/opt/homebrew/lib/python3.11/site-packages/PIL/JpegImagePlugin.py", line 643, in _save
rawmode = RAWMODE[im.mode]
^^^^^^^^^^^^^^^^
The above exception was the direct cause of the following exception:
File "/opt/homebrew/lib/python3.11/site-packages/flask/app.py", line 2551, in __call__
return self.wsgi_app(environ, start_response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/flask/app.py", line 2531, in wsgi_app
response = self.handle_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/flask/app.py", line 2528, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/flask/app.py", line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/don/Developer/Promptvision/gallery.py", line 392, in thumbnails
thumbnails = fetch_thumbnails(limit=limit, offset=offset, imgsrc=imgsrc)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/don/Developer/Promptvision/gallery.py", line 250, in fetch_thumbnails
thumbnail = (get_thumbnail_from_image(image))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/don/Developer/Promptvision/gallery.py", line 215, in get_thumbnail_from_image
img.save(thumbnail_path, format='JPEG', quality=85)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/PIL/Image.py", line 2431, in save
save_handler(self, fp, filename)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/PIL/JpegImagePlugin.py", line 646, in _save
raise OSError(msg) from e
^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: cannot write mode RGBA as JPEG
This is the Copy/Paste friendly version of the traceback.
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.11/site-packages/PIL/JpegImagePlugin.py", line 643, in _save
rawmode = RAWMODE[im.mode]
^^^^^^^^^^^^^^^^
KeyError: 'RGBA'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.11/site-packages/flask/app.py", line 2551, in __call__
return self.wsgi_app(environ, start_response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/flask/app.py", line 2531, in wsgi_app
response = self.handle_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/flask/app.py", line 2528, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/flask/app.py", line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/don/Developer/Promptvision/gallery.py", line 392, in thumbnails
thumbnails = fetch_thumbnails(limit=limit, offset=offset, imgsrc=imgsrc)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/don/Developer/Promptvision/gallery.py", line 250, in fetch_thumbnails
thumbnail = (get_thumbnail_from_image(image))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/don/Developer/Promptvision/gallery.py", line 215, in get_thumbnail_from_image
img.save(thumbnail_path, format='JPEG', quality=85)
File "/opt/homebrew/lib/python3.11/site-packages/PIL/Image.py", line 2431, in save
save_handler(self, fp, filename)
File "/opt/homebrew/lib/python3.11/site-packages/PIL/JpegImagePlugin.py", line 646, in _save
raise OSError(msg) from e
OSError: cannot write mode RGBA as JPEG
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error. If you enable JavaScript you can also use additional features such as code execution (if the evalex feature is enabled), automatic pasting of the exceptions and much more.
Brought to you by DON'T PANIC, your friendly Werkzeug powered traceback interpreter.
Terminal Output
127.0.0.1 - - [29/Mar/2023 19:00:26] "GET /thumbnails?limit=557&offset=45&imgsrc=/Users/user/GRABS/fashionista/188655.png HTTP/1.1" 500 -
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.11/site-packages/PIL/JpegImagePlugin.py", line 643, in _save
rawmode = RAWMODE[im.mode]
^^^^^^^^^^^^^^^^
KeyError: 'RGBA'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.11/site-packages/flask/app.py", line 2551, in __call__
return self.wsgi_app(environ, start_response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/flask/app.py", line 2531, in wsgi_app
response = self.handle_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/flask/app.py", line 2528, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/flask/app.py", line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/user/Promptvision/gallery.py", line 392, in thumbnails
thumbnails = fetch_thumbnails(limit=limit, offset=offset, imgsrc=imgsrc)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/user/Promptvision/gallery.py", line 250, in fetch_thumbnails
thumbnail = (get_thumbnail_from_image(image))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/user/Promptvision/gallery.py", line 215, in get_thumbnail_from_image
img.save(thumbnail_path, format='JPEG', quality=85)
File "/opt/homebrew/lib/python3.11/site-packages/PIL/Image.py", line 2431, in save
save_handler(self, fp, filename)
File "/opt/homebrew/lib/python3.11/site-packages/PIL/JpegImagePlugin.py", line 646, in _save
raise OSError(msg) from e
OSError: cannot write mode RGBA as JPEG
from promptvision.
And this was with the latest commit?
from promptvision.
Sorry, this fix disappeared since I was working on the wrong branch the other day.
I have added the fix now.
from promptvision.
This fixed it for me.
I'm still having some issues when using it my folder of images grabbed from model cards and etcetera -- there are multiple <div class=thumbnails">
that overlap each other -- but on the main output folder for my SD-UI renders, it works as expected. 👍
I have some suggestions for UI/CSS mods I've made to my local install.
I'll add them as a feature request when I get some time.
from promptvision.
The overlap is something I've fixed, but it's in the "extended" branch atm. I'll probably be merging them today. Working on some new features.
And if you have CSS / UI suggestions I am happy because the default CSS is the result of a little cram before publishing it.
(I should probably have used CSS variables, compiled it and had multiple colors, but CSS isn't my main forte)
from promptvision.
Related Issues (20)
- Avoid non-image files. HOT 2
- Feature Request: Thumbnail Viewer Should Show All Images in Source Folder HOT 1
- Feature Request: Word Wrap File Path Names HOT 1
- Dynamic Prompts Support + Minor Issues Reporting HOT 4
- no exception handling HOT 1
- Please add support for an image where the information is written in the 'UserComment' field.
- Potential improvements HOT 1
- Roadmap with planned future features HOT 2
- Changelog & Devupdate
- sweep: Create documentation for this repository HOT 1
- Imaged without Prompt data lead to crash HOT 1
- sd-parsers api changes
- Exceeded Memory Limit? HOT 1
- render_image in Image viewer doesn't get all metadata when browsing root directory
- AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'? HOT 1
- Does not read Prompt embedded in JPG files HOT 2
- UI Doesn't Load HOT 1
- Automatic1111 Extension & View Watermarking Data HOT 2
- Delete Button HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from promptvision.