Code Monkey home page Code Monkey logo

stable-diffusion-webui-images-browser's Introduction

stable-diffusion-webui-images-browser

A custom extension for AUTOMATIC1111/stable-diffusion-webui.

This is an image browser for browsing past generated pictures, view their generated informations, send that information to txt2img, img2img and others, collect images to your "favorites" folder and delete the images you no longer need.

Installation

The extension can be installed directly from within the Extensions tab within the Webui.

You can also install it manually by running the following command from within the webui directory:

git clone https://github.com/AlUlkesh/stable-diffusion-webui-images-browser/ extensions/stable-diffusion-webui-images-browser

and restart your stable-diffusion-webui, then you can see the new tab "Image Browser".

Please be aware that when scanning a directory for the first time, the png-cache will be built. This can take several minutes, depending on the amount of images.

Recent updates

  • Improved Search
  • Formatted EXIF display
  • Initial support for videos
  • --image-browser-tmp-db command line parameter to offload database operations to a different location
  • "All"-tab showing all the images from all tabs combined
  • Size tooltip for thumbnails
  • Optimized images in the thumbnail interface
  • Send to ControlNet
  • Hidable UI components
  • Send to openOutpaint
  • Regex search
  • Maximum aesthetic_score filter
  • Save ranking to EXIF option
  • Maintenance tab
  • Custom tabs
  • Copy/Move to directory
  • Keybindings
  • Additional sorting and filtering by EXIF data including .txt file information
  • Recyle bin option
  • Add/Remove from saved directories, via buttons
  • New dropdown with subdirs
  • Option to not show the images from subdirs
  • Refresh button
  • Sort order
  • View and save favorites with individual folder depth
  • Now also supports jpg

Please also check the discussions for major update information.

Keybindings

Key Explanation
0-5 Ranks the current image, with 0 being the last option (None)
F Adds the current image to Favorites
R Refreshes the image gallery
Delete Deletes the current image
Ctrl + Arrow Left Goes to the previous page of images
Ctrl + Arrow Right Goes to the next page of images

(Ctrl can be changed in settings)

Credit

Credit goes to the original maintainer of this extension: https://github.com/yfszzx and to major contributors https://github.com/Klace and https://github.com/EllangoK

stable-diffusion-webui-images-browser's People

Contributors

alexanderchan avatar alulkesh avatar cjrsm avatar cobryan05 avatar ddpn08 avatar ellangok avatar est-r avatar ezekiel-rage avatar fennghuang avatar haylockgrant avatar ju1-js avatar kapowpenguin1 avatar klace avatar kohakublueleaf avatar liuhongbocm avatar margen67 avatar missionfloyd avatar pangbo13 avatar rocketgarden avatar rohan-pa avatar valyrie97 avatar vladmandic avatar w-e-w avatar yfszzx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

stable-diffusion-webui-images-browser's Issues

Gradio: tuple index out of range

@Woisek

I also experience an error:

Traceback (most recent call last): File "I:\Super SD 2.0\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict output = await app.get_blocks().process_api( File "I:\Super SD 2.0\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1018, in process_api data = self.postprocess_data(fn_index, result["prediction"], state) File "I:\Super SD 2.0\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 935, in postprocess_data if predictions[i] is components._Keywords.FINISHED_ITERATING: IndexError: tuple index out of range

While searching by exif keyword, some images only respond to the last line in prompt.

When i tried searching for images i noticed that some images cannot be found by typing their keyword in exif search. After some investigation i found that the images can only be found by searching keywords from the last line in the prompt. What is interesting is that not all images with line breaks in the prompt have this problem. If i need to provide the faulty images for investigation then i can do so.

Feature Request: Carry over ranks

I've noticed that the ranking of an image in "text2img" seems to be cleared if moved via "Move to favorites". Is it possible to retain the ranking?

[Feature Request] Ability to move images to directories defined in the saved directories

It quickly becomes necessary to manage all the images produced and not all users have direct folder access to the system running the webui.

The ability to move images to custom directories would be very useful for webui only users. We have a tendency to use our phones to access the webui and run ideas when we are not at our PCs.

The mockup by @Woisek mentioned in #5 would be a good design, though I would suggest a dropdown of directories that comes from the saved directories defined on the Others tab.

Mockup

Thank you for your great work on this extension! It has made webui only access possible for my team.

[Feature request] Option for browsing folders

This nice extension needs an folder option, IMHO.
I guess every one of us stores images in named folders. So it would only be logical to have an option to browse folders and then the images.
It would help, if we could use the "other" tab for that. So, when entering a root folder in "Images directory", it then would auto populate the dropdown with the existing sub-folders, so that we can use it to jump into the folders. Of yourse, this list had to be stored somewhere and must not be gone after a reload.
Would this be doable?

[Feature Request] Setting to remove scrollbar in thumbnail view

The scrollbar in the thumbnail view is totally unnecessary and only limits the ability to see all of the thumbnails on a large screen. I wouldn't mind if it was removed entirely but at least an option to disable it would be preferred. I've tried to handle it with a custom CSS rule but it causes the click handler to break.

Feature Request: Store Ranking in image metadata

Howdy, I love your extension, it has really great features πŸ˜„

I've been using the ranking feature a lot, and noticed when I moved my images, the rankings were lost. I'm assuming that data is getting stored in the sqlite db with the extension.

Is it possible to add those into the image metadata for image portability and to be used by other tools?

UNIQUE constraint failed

Image Browser: Upgrading database from version 1 to version 3
Error executing callback ui_tabs_callback for E:\AI\Automatic1111\stable-diffusion-webui\extensions\stable-diffusion-webui-images-browser\scripts\image_browser.py
Traceback (most recent call last):
  File "E:\AI\Automatic1111\stable-diffusion-webui\modules\script_callbacks.py", line 119, in ui_tabs_callback
    res += c.callback() or []
  File "E:\AI\Automatic1111\stable-diffusion-webui\extensions\stable-diffusion-webui-images-browser\scripts\image_browser.py", line 1030, in on_ui_tabs
    create_tab(tab, current_gr_tab)
  File "E:\AI\Automatic1111\stable-diffusion-webui\extensions\stable-diffusion-webui-images-browser\scripts\image_browser.py", line 725, in create_tab
    db_version = wib_db.check()
  File "E:\AI\Automatic1111\stable-diffusion-webui\extensions\stable-diffusion-webui-images-browser\scripts\wib\wib_db.py", line 339, in check
    migrate_path_recorder_dirs(cursor)
  File "E:\AI\Automatic1111\stable-diffusion-webui\extensions\stable-diffusion-webui-images-browser\scripts\wib\wib_db.py", line 246, in migrate_path_recorder_dirs
    cursor.execute('''

[Feature request] Quick culling feature

Not surprisingly, there's al lot of images generated and getting rid of them / sorting is pretty fast-growing problem.
So, here's my suggestion:
In full-screen view use up and down arrows to do some culling

  • up: add image to Fav queue (or trigger add to fav)
  • down: add image to Del queue (or delete right away)

If the implementation uses queues, it's possible to review queue and then move all images to fav or recycle bin with one click...

Error reading a test png file

This is probably some sort of configuration error but on a fresh install when I go to the Images Browser tab and try to select "First Page" on any of the tabs I get the stacktrace below. I'm not sure why it's trying to read the gradio test images in the venv directory, but the last image where it throws an error trying to read a PNG file, namely .\venv\Lib\site-packages\gradio\test_data\test_image.png** appears to be accurate, since the image file looks like it's actually a GIF:

$ file venv/Lib/site-packages/gradio/test_data/test_image.png
venv/Lib/site-packages/gradio/test_data/test_image.png: GIF image data, version 89a, 61 x 68

The gradio version is 3.16.2

The stacktrace is here:


To create a public link, set `share=True` in `launch()`.
Traceback (most recent call last):
  File "D:\ghirp\Development\test\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict
    output = await app.get_blocks().process_api(
  File "D:\ghirp\Development\test\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1015, in process_api
    result = await self.call_function(
  File "D:\ghirp\Development\test\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 833, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "D:\ghirp\Development\test\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "D:\ghirp\Development\test\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "D:\ghirp\Development\test\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "D:\ghirp\Development\test\stable-diffusion-webui\extensions\stable-diffusion-webui-images-browser\scripts\image_browser.py", line 547, in get_image_page
    filenames = get_all_images(img_path, sort_by, sort_order, keyword, tab_base_tag_box, img_path_depth, ranking_filter, aes_filter, exif_keyword, negative_prompt_search)
  File "D:\ghirp\Development\test\stable-diffusion-webui\extensions\stable-diffusion-webui-images-browser\scripts\image_browser.py", line 456, in get_all_images
    cache_exif(fileinfos)
  File "D:\ghirp\Development\test\stable-diffusion-webui\extensions\stable-diffusion-webui-images-browser\scripts\image_browser.py", line 342, in cache_exif
    image = PngImageFile(fi_info[0])
  File "D:\ghirp\Development\test\stable-diffusion-webui\venv\lib\site-packages\PIL\ImageFile.py", line 117, in __init__
    self._open()
  File "D:\ghirp\Development\test\stable-diffusion-webui\venv\lib\site-packages\PIL\PngImagePlugin.py", line 732, in _open
    raise SyntaxError(msg)
SyntaxError: not a PNG file

Feature request: delete more than 1 page of images at a time

I use Image Browser in combination with Deforum. My usecase is to delete the last few hundred images as I adjust prompts while building Deforum animations. Currently, the 'delete_next' function seems to be limited to the currently displayed page of images. It would be wonderful if the logic allowed deleting n number of images across subsequent pages.

Feature request : Add a way to select/action multiple files

Feature overview.
Currently, when deleting a file, there's a great option to select N number of files and delete them.

At the same time, when MOVING a file to another folder, you cannot move multiple files.

It would be a great feature if there was a way to select multiple files and run an action like delete or move on a number of files.
This would also mean the files do not need to be continuous when deleting.

Use cases :
Generated 30 images in a grid
Move ALL 30 images to another grid folder rather than cluttering up the main A1111 output folder.

Generated 10 images in a batch, select 9 bad images and delete them while keeping 1 good image.

Error when using send to img2img

When using send to img2img/inpaint I get the following error:

Traceback (most recent call last):
File "N:\AI\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict
output = await app.get_blocks().process_api(
File "N:\AI\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1015, in process_api
result = await self.call_function(
File "N:\AI\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 833, in call_function
prediction = await anyio.to_thread.run_sync(
File "N:\AI\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "N:\AI\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "N:\AI\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
File "N:\AI\stable-diffusion-webui\modules\generation_parameters_copypaste.py", line 155, in send_image_and_dimensions
img = image_from_url_text(x)
File "N:\AI\stable-diffusion-webui\modules\generation_parameters_copypaste.py", line 72, in image_from_url_text
filedata = base64.decodebytes(filedata.encode('utf-8'))
File "C:\Users\Rance\AppData\Local\Programs\Python\Python310\lib\base64.py", line 562, in decodebytes
return binascii.a2b_base64(s)
binascii.Error: Incorrect padding

I'm on the latest version of auto. It used to work last week when I tried it.

Deleting or moving images sometimes throws off UI

If you delete an image or if you move an image to favorites the image you see and the image selected are out of sync. And when you get into that state clicking send to inpainting (sends another image) as moving to favorites and also deleting (ie your not deleting the image you're seeing). Also I think the UI delete the image that the next/previous page falls onto then that page just says "Error".
I haven't figured out the exact repro steps I did it yesterday where I add a bunch of images to favorites then I went to favorite's and it was a totally different set of images (like one image off from the ones I wanted).

Add webp support

Please add webp support, this updated fork will not display webp images.

Support of other extensions

Will there be a support of buttons "Send to" for other extensions such as OpenOutpaint and InstructPix2pix?

show_image_info: IndexError: list index out of range

@axemaster

Start UI. Get this message every time on Mac M1.

Traceback (most recent call last):
File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 337, in run_predict
output = await app.get_blocks().process_api(
File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1015, in process_api
result = await self.call_function(
File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 833, in call_function
prediction = await anyio.to_thread.run_sync(
File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/Users/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/Users/user/stable-diffusion-webui/extensions/stable-diffusion-webui-images-browser/scripts/image_browser.py", line 478, in show_image_info
file = filenames[int(num) + int((page_index - 1) * num_of_imgs_per_page)]
IndexError: list index out of range

Images left in appdata\local\temp

An issue with the previous repository version of this extension (yfszzx#56) appears to still be active. Whenever images are loaded, they are seemingly unnecessarily cached as duplicates in AppData\Local\Temp. To reproduce, just view any folder in the image browser. If this is strictly required, it might be good if the temp directory used could be defined by the user, and/or if there were an option to clear these temp files on exit. There were multiple gigabytes of images in there I had no idea existed, and it seems like that shouldn't be necessary considering the saved images already exist in other directories, although I assume it was set up this way for a reason.

Support Dynamic Prompts templates (Would Be Nice)

When an image has a template and a prompt, and the user presses a button to send the info to txt2img, the user could have the option to send the template instead of the actual prompt. Right now it's a manual copy paste, so there is a very workable work-around. This is a "would be nice" feature request.

FEATURE REQUEST: Mac: CTRL + arrow <- -> binding conflict with Mac desktop, make configurable

FEATURE REQUEST: Mac: CTRL + arrow <- -> binding conflict with Mac desktop, make configurable

Mac already uses these key combinations to navigate application Windows. Please make the key bindings configurable.
As of now I can't use them in Image Browser.

PS key to jump out of the image being viewed back up to the images summary pane would be nice. If I get time I might make a PR for that.

Cheers!

Still some mixed path notations remaining

One of the goals of the last update was to use the same path notations everywhere.

Unfortunately I just found out that "short" Windows filenames still are treated as different from "long" ones.

For example this should be the same on my system:

c:\tools\ai\STABLE~1
C:\tools\Ai\stable-diffusion-webui

I used abspath, so I will change it to realpath now.

issue: database is locked

Traceback (most recent call last):
File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict
output = await app.get_blocks().process_api(
File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1015, in process_api
result = await self.call_function(
File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 833, in call_function
prediction = await anyio.to_thread.run_sync(
File "D:\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "D:\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "D:\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
File "D:\stable-diffusion-webui\extensions\stable-diffusion-webui-images-browser\scripts\image_browser.py", line 444, in get_image_page
filenames = get_all_images(img_path, sort_by, sort_order, keyword, tabname_box, img_path_depth, ranking_filter, aes_filter, exif_keyword, negative_prompt_search)
File "D:\stable-diffusion-webui\extensions\stable-diffusion-webui-images-browser\scripts\image_browser.py", line 353, in get_all_images
cache_exif(fileinfos)
File "D:\stable-diffusion-webui\extensions\stable-diffusion-webui-images-browser\scripts\image_browser.py", line 265, in cache_exif
image = JpegImageFile(fi_info[0])
File "D:\stable-diffusion-webui\venv\lib\site-packages\PIL\ImageFile.py", line 117, in init
self._open()
File "D:\stable-diffusion-webui\venv\lib\site-packages\PIL\JpegImagePlugin.py", line 357, in _open
raise SyntaxError(msg)
SyntaxError: not a JPEG file
Traceback (most recent call last):
File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict
output = await app.get_blocks().process_api(
File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1015, in process_api
result = await self.call_function(
File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 833, in call_function
prediction = await anyio.to_thread.run_sync(
File "D:\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "D:\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "D:\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
File "D:\stable-diffusion-webui\extensions\stable-diffusion-webui-images-browser\scripts\image_browser.py", line 444, in get_image_page
filenames = get_all_images(img_path, sort_by, sort_order, keyword, tabname_box, img_path_depth, ranking_filter, aes_filter, exif_keyword, negative_prompt_search)
File "D:\stable-diffusion-webui\extensions\stable-diffusion-webui-images-browser\scripts\image_browser.py", line 353, in get_all_images
cache_exif(fileinfos)
File "D:\stable-diffusion-webui\extensions\stable-diffusion-webui-images-browser\scripts\image_browser.py", line 270, in cache_exif
wib_db.update_exif_data(conn, fi_info[0], allExif)
File "D:\stable-diffusion-webui\extensions\stable-diffusion-webui-images-browser\scripts\wib\wib_db.py", line 143, in update_exif_data
cursor.execute('''
sqlite3.OperationalError: database is locked

Error when using "Others" tab option with external folders

Process followed

  1. Add new directories to the "Others" tab
  2. Click the directory in the dropdown
  3. Click "First Page"
    Expected behavior : Images should be seen
    Current behavior : Error shows, and if the UI is reloaded, the image browser tab vanishes from the Automatic1111 UI.
    Restarting the webui-user.bat file restores the image browser tab.

Screenshot:
image

To create a public link, set `share=True` in `launch()`.
Traceback (most recent call last):
  File "O:\automatic1111\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict
    output = await app.get_blocks().process_api(
  File "O:\automatic1111\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1015, in process_api
    result = await self.call_function(
  File "O:\automatic1111\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 833, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "O:\automatic1111\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "O:\automatic1111\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "O:\automatic1111\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "O:\automatic1111\stable-diffusion-webui\extensions\stable-diffusion-webui-images-browser\scripts\image_browser.py", line 590, in get_image_page
    filenames = get_all_images(img_path, sort_by, sort_order, keyword, tab_base_tag_box, img_path_depth, ranking_filter, aes_filter, exif_keyword, negative_prompt_search)
  File "O:\automatic1111\stable-diffusion-webui\extensions\stable-diffusion-webui-images-browser\scripts\image_browser.py", line 499, in get_all_images
    cache_exif(fileinfos)
  File "O:\automatic1111\stable-diffusion-webui\extensions\stable-diffusion-webui-images-browser\scripts\image_browser.py", line 357, in cache_exif
    image = PngImageFile(fi_info[0])
  File "O:\automatic1111\stable-diffusion-webui\venv\lib\site-packages\PIL\ImageFile.py", line 117, in __init__
    self._open()
  File "O:\automatic1111\stable-diffusion-webui\venv\lib\site-packages\PIL\PngImagePlugin.py", line 732, in _open
    raise SyntaxError(msg)
SyntaxError: not a PNG file

Additional info:
This could possibly be happening because there are .log or .txt files within the InvokeAI output folder

Image Browser tab gone ... ?!

Did the last update and now the tab for the image browser is gone ... ?!
What happend?

Update: Sorry, false alarm. A complete restart made it working again. :)

Feature Request: Disable parts of side bar

I never use the aesthetic score stuff or the copy to directory so just an option for user to disable. Probably either a multiselect or dropdown so users don't need to like worry about the names.

In case you are worried we should be able to avoid any issues when we add new stuff unlike with the custom tab options, since this is only a disable list. Thus if a new item is added to the sidebar by default it will show up for all users as a new item can't be in the disable list.

--administrator ?

edited.
topic is about --administrator tag (my bad, i made a mistake)

so here the topic:
Is this --administrator really needed? talking here and there some people are not using this repo just because of this.
what is that about?

Feature Request: Allow sort by "order added"

Currently, sort by "date" only considers the time the image was generated. If I add an image to Favorites long after it was generated, and after adding many successive generations, it gets pushed behind all the new generations. I'd like to be able to view the images by the order they were added to Favorites, instead of by the order in which they were generated

edit: after some prodding, it seems that the windows file system doesn't count moving a file as "modifying" it [copy/paste doesn't change the time stamp] so ig the solution would be more involved than i thought

edit: now that i think about it, maybe the extension could create a list of file names and the date they were moved, then sort by move date for "order added". not sure exactly how to do that tho

Send to ControlNet

Can we have an option to send to ControlNet?

It could be a useful way to browse openpose images and send them to ControlNet.

Throwing errors when trying to load images

Traceback (most recent call last):
File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict
output = await app.get_blocks().process_api(
File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1015, in process_api
result = await self.call_function(
File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 833, in call_function
prediction = await anyio.to_thread.run_sync(
File "D:\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "D:\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "D:\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
File "D:\stable-diffusion-webui\extensions\stable-diffusion-webui-images-browser\scripts\image_browser.py", line 674, in get_image_page
filenames = get_all_images(img_path, sort_by, sort_order, keyword, tab_base_tag_box, img_path_depth, ranking_filter, aes_filter_min, aes_filter_max, exif_keyword, negative_prompt_search, use_regex, case_sensitive)
File "D:\stable-diffusion-webui\extensions\stable-diffusion-webui-images-browser\scripts\image_browser.py", line 547, in get_all_images
cache_exif(fileinfos)
File "D:\stable-diffusion-webui\extensions\stable-diffusion-webui-images-browser\scripts\image_browser.py", line 364, in cache_exif
image = PngImageFile(fi_info[0])
File "D:\stable-diffusion-webui\venv\lib\site-packages\PIL\ImageFile.py", line 117, in init
self._open()
File "D:\stable-diffusion-webui\venv\lib\site-packages\PIL\PngImagePlugin.py", line 730, in _open
if not _accept(self.fp.read(8)):
PermissionError: [Errno 13] Permission denied
Traceback (most recent call last):
File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict
output = await app.get_blocks().process_api(
File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1015, in process_api
result = await self.call_function(
File "D:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 833, in call_function
prediction = await anyio.to_thread.run_sync(
File "D:\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "D:\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "D:\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
File "D:\stable-diffusion-webui\extensions\stable-diffusion-webui-images-browser\scripts\image_browser.py", line 220, in tab_select
path_recorder, path_recorder_formatted, path_recorder_unformatted = read_path_recorder()
File "D:\stable-diffusion-webui\extensions\stable-diffusion-webui-images-browser\scripts\image_browser.py", line 189, in read_path_recorder
path_recorder = wib_db.load_path_recorder()
File "D:\stable-diffusion-webui\extensions\stable-diffusion-webui-images-browser\scripts\wib\wib_db.py", line 372, in load_path_recorder
cursor.execute('''
sqlite3.OperationalError: database is locked

Uncaught (in promise) TypeError when loading a new page of images in console.

When loading a page of images I always get a Uncaught (in promise) TypeError in the javascript console.

In chrome it is
index.4395ab38.js:76 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'forEach') at st

In firefox it is
Uncaught (in promise) TypeError: xt.data is undefined

The stack trace is not too useful either
image

This error has no effect as far as I can tell as the images still load and everything.

To Note: This has been existent before the db update and I think before the fork in general. It is not recent.

Feature request: Get Exif/PNG info or send to PNG Info

Automatic1111 generated PNGs and JPG have PNG and Exif info within them, and Image Browser captures and displays this info easily.

However, I noticed that Image browser does not grab PNG info from InvokeAI or other PNGs.
A 'nice to have' feature would be

  1. Get PNG / EXIF information from other applications
  2. If not, add "Send to PNG Info" button in the application (Next to "Send to extras") - the PNG info tab within the Automatic1111 UI is able to read any JPG/PNG information.

Feature Request: Image Categories

Why

Good organisation on large output folders is not easily possible without creating an over complicated folder tree which can introduce duplicate naming issues in some scenarios and just general annoyance.

Ideal implementation

  • Similar to the current image ranking system but with custom user defined categories. EG: Anime, Realism, SFW, NSFW, etc
  • User can select one or more categories and apply it to the image
  • An and/or/none filtering selection similar to how the dataset tag editor extension handles filtering tags on captioned images

Request feature: add regex for exif search

Currently, the code does a simple substring search when filtering out photos with exif.

fileinfos = [x for x in fileinfos if exif_keyword.lower() in finfo_exif[x[0]].lower()]

Sometimes I need to do a negative search instead of a positive one, for example, getting all of the photos that aren't upscaled.

Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 4212671468, Size: 512x512, Model hash: ..., Model: ..., Denoising strength: 0.7, ENSD: 31337, Hires upscale: 2, Hires upscaler: Latent

I can't just search for images that are 1024x1024 because Hires doesn't have that. So I need to do something like !Hires.

This could be implemented as a flag that reads the input as a regex instead of plain text.

Alternatively, this could be solved by adding a negative flag but I think the regex option is better because it doesn't seem that hard to implement and you solve a lot of other use cases.

sqlite3.OperationalError: unable to open database file, final result: no image browser tab

Error executing callback ui_tabs_callback for L:\stable-diffusion-webui\extensions\stable-diffusion-webui-images-browser\scripts\image_browser.py Traceback (most recent call last): File "L:\stable-diffusion-webui\modules\script_callbacks.py", line 106, in ui_tabs_callback res += c.callback() or [] File "L:\stable-diffusion-webui\extensions\stable-diffusion-webui-images-browser\scripts\image_browser.py", line 806, in on_ui_tabs create_tab(tab) File "L:\stable-diffusion-webui\extensions\stable-diffusion-webui-images-browser\scripts\image_browser.py", line 562, in create_tab exif_cache = wib_db.load_exif_data(exif_cache) File "L:\stable-diffusion-webui\extensions\stable-diffusion-webui-images-browser\scripts\wib\wib_db.py", line 305, in load_exif_data cursor.execute(''' sqlite3.OperationalError: unable to open database file

Extension version: just updated
OS: Win 10
WebUI version: latest
ΒΏAny suggestion?

Wrong interaction between delete function and left/right keys

@Woisek

When browsing the gallery and you use the "delete next" option and enter, say 2, and hit delete, it deletes the two images.
BUT: If you then use the arrow keys to navigate left and right, it displays the two deleted images, altough there are not visible in the image bar on the bottom. If one then hits delete again on a supposed to be deleted image again, it deletes the next one.
This is potential dangerous, as one could delete images that shouldn't or wanted to be deleted.

Yes, I was able to replicate that. Looking at the code, I think this is the issue:

  • The javascript function image_browser_delete does in fact not delete or remove anything. It simply hides the displayed thumbnails from the bottom row. The intention probably being, that if you can't click on them anymore, they are "out of the way".
  • However using left/right keys still selects them, since they are still there, just not visible.

The problem I have with this is that left/right handling seems to be done by gradio in this case. And while I could remove the files from the list on delete in the python function, I think this would bring you back to the overview gallery view.

I'll have to think about this one...

processed_input.append(block.preprocess(inputs[i])) IndexError: list index out of range

cache_exif: 0/2443 cache_aes: 0/2443 0.0 seconds Traceback (most recent call last): File "/home/piotr/VsCode/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 337, in run_predict output = await app.get_blocks().process_api( File "/home/piotr/VsCode/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1013, in process_api inputs = self.preprocess_data(fn_index, inputs, state) File "/home/piotr/VsCode/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 911, in preprocess_data processed_input.append(block.preprocess(inputs[i])) IndexError: list index out of range

I also get some pip DB errors when i launch WebUI. I don't know if it's related to this extension?

`stderr: Running command git clone --filter=blob:none --quiet https://github.com/NicolasBizzozzero/pattern /tmp/pip-install-hhbw76gc/pattern_ca2deaa566cd4d9cb4e5407a3d100287
error: subprocess-exited-with-error

Γ— python setup.py egg_info did not run successfully.
β”‚ exit code: 1
╰─> [16 lines of output]
/bin/sh: 1: mysql_config: not found
/bin/sh: 1: mariadb_config: not found
/bin/sh: 1: mysql_config: not found
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/tmp/pip-install-hhbw76gc/mysqlclient_c69309e1436e4cfbb235c16cadee145a/setup.py", line 15, in
metadata, options = get_config()
File "/tmp/pip-install-hhbw76gc/mysqlclient_c69309e1436e4cfbb235c16cadee145a/setup_posix.py", line 70, in get_config
libs = mysql_config("libs")
File "/tmp/pip-install-hhbw76gc/mysqlclient_c69309e1436e4cfbb235c16cadee145a/setup_posix.py", line 31, in mysql_config
raise OSError("{} not found".format(_mysql_config_path))
OSError: mysql_config not found
mysql_config --version
mariadb_config --version
mysql_config --libs
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

Γ— Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.