Fooocus-Log-Viewer icon indicating copy to clipboard operation
Fooocus-Log-Viewer copied to clipboard

No images in Calendar Mode

Open Yp-pro opened this issue 1 year ago • 15 comments

Hello,

Good job! I like your Log Viewer more than the native one.

But I've got an issue with Calendar Mode:

image

When I click on a date (pink bar) the Viewer doesn't show images and says "No images" but there are many ones in this folder and the native log shows them.

Windows 10 Pro, Chrome. Other browsers - the same situation

Yp-pro avatar Feb 13 '24 09:02 Yp-pro

Hi Thanks

It seems linked to this issue (with a proposal of fix) https://github.com/toutjavascript/Fooocus-Log-Viewer/issues/13

Can you confirm ? I will merge the fix (even if I cannot reproduce because of international date format display)

toutjavascript avatar Feb 13 '24 10:02 toutjavascript

Sure, thank you

Yp-pro avatar Feb 13 '24 10:02 Yp-pro

New release is published with fix

toutjavascript avatar Feb 15 '24 14:02 toutjavascript

Sorry, but it doesn't work.

Here's the Calendar Mode:

image

I checked it in the regular mode, the same issue:

image

Of course, there're many images in that folder:

image

And the native log shows it:

image

I tryed it in Chrome and Firefox. No difference.

Sure, I deleted the old files and unzipped the new ones (1.5.2). Fooocus was closed and opened again after update, as you have mentioned. No difference.

Somewhere it works well:

image

Yp-pro avatar Feb 17 '24 13:02 Yp-pro

I have a clue. All images that I can see are PNG. I can't see JPG. Is it important?

Yp-pro avatar Feb 17 '24 14:02 Yp-pro

I think .jpg extension could be the reason Fooocus generates .png How do you have .jpg ?

toutjavascript avatar Feb 17 '24 14:02 toutjavascript

I think .jpg extension could be the reason Fooocus generates .png How do you have .jpg ?

Converted them with IrfanView for saving the space on the disc (I generate a lot)

Yp-pro avatar Feb 17 '24 14:02 Yp-pro

And you change the name in log.html at the same time ?

toutjavascript avatar Feb 17 '24 14:02 toutjavascript

Not name, just an extension

Yp-pro avatar Feb 17 '24 14:02 Yp-pro

yes, you're right, but is the extension changed every where in log.html (not only where it is viewable in browser)

toutjavascript avatar Feb 17 '24 14:02 toutjavascript

I just do Find/Replace and change all "png" to "jpg" in log.html. Everything works well after that (except your Viewer)

Yp-pro avatar Feb 17 '24 15:02 Yp-pro

Log.html is not used by Fooocus itself. I will check if I am looking for .png file or the exact full name that is stored in log.html

thanx

toutjavascript avatar Feb 17 '24 16:02 toutjavascript

So I checked the log viewer. It works on my computer if I : 1- convert 2024-02-17 files from .png to .jpg with irfanview 2- replace all .png to .jpg in 2024-02-17/log.html file (3 times per image)

They are displayed... Capture d’écran 2024-02-17 à 19 08 18

We are not lucky with your config :(

toutjavascript avatar Feb 17 '24 18:02 toutjavascript

It seems like I found the problem. Look:

  1. When I generate as usual (PNG), everything is okay:

image

  1. If I convert these images to JPG (without changing log.html) I see the following:

image

and see nothing if I open log.html in a browser:

image

  1. Important! If I do Find/Replace in log.html and replace every "png" there, your Viewer won't show these images.
  2. Important! If I rename only image extensions, your Viewer works well:

image

Wrap up:

It's very important not to change the div id in this part, only the image extensions. The div id should always end with "_png".:

<div id="2024-02-17_20-30-34_5910_png" class="image-container"><hr><table><tr>
<td><a href="2024-02-17_20-30-34_5910.png" target="_blank"><img src='2024-02-17_20-30-34_5910.png' onerror="this.closest('.image-container').style.display='none';" loading='lazy'></img></a><div>2024-02-17_20-30-34_5910.png

It brokes evertything.

  • It would be great if you fixed that somehow

Yp-pro avatar Feb 17 '24 18:02 Yp-pro

Well done buddy !

I will try to fix the div#id content to be ok with _png or _jpg

toutjavascript avatar Feb 17 '24 20:02 toutjavascript