toutjavascript / Fooocus-Log-Viewer

Fooocus Log Viewer : easy explorer of all your images and prompts from Fooocus UI
Apache License 2.0
42 stars 5 forks source link
fooocus stable-diffusion

Fooocus Log Viewer

Fooocus Log Viewer is an add-on to https://github.com/lllyasviel/Fooocus. It creates a powerfull view of all your generated images and how you made them. Capture d’écran 2024-01-08 à 12 10 14

Click to Zoom an image Capture d’écran 2024-01-08 à 12 10 27

New search box, search all your fooocus images by text, models and styles. It works well with over 10k images on SSD Capture d’écran 2024-01-24 à 11 25 15

What you can do with Fooocus Log Viewer

Fooocus Log Viewer can be integrated in UI with auto resize to fully fill the usable screen space.

You will be able to :

Installation of Fooocus Log Viewer

Installation is very easy. No npm nor pip install. Files are in archive and load extra JS and CSS from CDN.

1/ First step

Copy the archive files (viewer.html and viewer.js) in /Fooocus/outputs/ directory

You could directly open viewer.html with Fooocus localhost server Adress looks like http://localhost:7865/file=outputs/viewer.html Check the port number on Fooocus UI webpage

2/ Deep integration in Fooocus UI

A new deep integration is available. Quite easy to config, with only one file to modify. You open /modules/ui_gradio_extensions.py file. At line 43, add :

head += f'<script type="text/javascript" src="https://github.com/toutjavascript/Fooocus-Log-Viewer/raw/main/file=outputs/viewer.js"></script>\n'

Quit Fooocus if started and restart run.bat to reinit Fooocus

You will see new link [🎥 Image Log Viewer (iframe)] in bottom of [Setting] tab

Click on it to display the Log Viewer over the same UI

This integration will be overwritten every time Fooocus is autoupdated at start.

To avoid update, you can create a new run-no-update.bat with :

.\python_embeded\python.exe -s Fooocus\launch.py --theme=dark
pause

The dark theme offers a better experience.

Fooocus Version Compability

This add-on is validated from V2.1.852 to V2.3.1 Fooocus version.

Each Fooocus update is at risk to break the proper functionning of this script.

Please contact when broken.

Original idea and work

The idea and initial work is inspired by @sngazm at https://github.com/lllyasviel/Fooocus/discussions/693

Update log

1.5.6 Fix issue on search

1.5.5 Fix issue on row parsing log.html with .jpeg generated images

1.5.4 Fix issue on row parsing in viewer.html

1.5.3 Fix issue on generated image with input image

1.5.2 Fix issue opened and solved by friendly user

1.5.1 Fix issues opened by friendly users

1.5.0 New search box

1.4.0

1.3.0 (thanks @ItsNoted for some of these ideas)

1.2.0 Calendar Release

1.1.0 New Year Release

1.0.0 Initial public release

Next 1.x will be a more advanced version with :

Please share your ideas here by opening discussion.