Skip to content

Commit

Permalink
Release V1.5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
toutjavascript committed Apr 18, 2024
1 parent ddc9aec commit 3c5e8df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ 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 41, add :
You open `/modules/ui_gradio_extensions.py` file. At line 43, add :

```python
head += f'<script type="text/javascript" src="file=outputs/viewer.js"></script>\n'
Expand Down Expand Up @@ -75,6 +75,9 @@ The idea and initial work is inspired by @sngazm at https://github.com/lllyasvie


## Update log
1.5.5 Fix issue on row parsing log.html with .jpeg generated images
- Close issue https://github.com/toutjavascript/Fooocus-Log-Viewer/discussions/19#discussioncomment-9139711

1.5.4 Fix issue on row parsing in viewer.html
- https://github.com/toutjavascript/Fooocus-Log-Viewer/pull/18

Expand Down
8 changes: 4 additions & 4 deletions viewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<div id="app"></div>
<script type="text/babel">

var LOGVIEWER_RELEASE="1.5.4"
var LOGVIEWER_RELEASE="1.5.5"

$("span#logviewer-release").html("Release "+LOGVIEWER_RELEASE)

Expand Down Expand Up @@ -107,7 +107,7 @@
if ((nb>nbTodayImages)&&(nbTodayImages>0)) {
let n=nbTodayImages-nb;
matches.sort();
let src=matches[matches.length-1].replace('<div id="',"").replace("_png",".png").replace("_jpg",".jpg").replace("_webp",".webp").replace('"',"");
let src=matches[matches.length-1].replace('<div id="',"").replace("_png",".png").replace("_jpg",".jpg").replace("_jpeg",".jpeg").replace("_webp",".webp").replace('"',"");
new jBox('Notice', {
content: "Yeah! "+n+" new Image"+(n>1?'s':'')+" generated now on today folder<br><img src='./"+today+"/"+src+"' class='imageNotice'>",
theme: "TooltipNewImage"
Expand Down Expand Up @@ -1243,7 +1243,7 @@
const data = [];
const parser = new DOMParser();
const doc = parser.parseFromString(html, "text/html");
const images = doc.querySelectorAll("div[id$='_png'],div[id$='_jpg'],div[id$='_webp']");
const images = doc.querySelectorAll("div[id$='_png'],div[id$='_jpg'],div[id$='_jpeg'],div[id$='_webp']");
for (let i = 0; i < images.length; i++) {
const paragraphs = images[i].querySelectorAll("p");
const divs = images[i].querySelectorAll("div");
Expand All @@ -1255,7 +1255,7 @@
/* From v2.1.852 (2023-12-18), log changed to <table> tag */
src = divs[0].innerText;
settings.crudLoras=[];
for (let j = 1; j < trs.length; j++) {
for (let j = 1; j < trs.length; j++) {
const row = trs[j];
const labelTd = row.querySelector("td.label");
const key = labelTd? labelTd.textContent : row.querySelector("td.key").textContent;
Expand Down

0 comments on commit 3c5e8df

Please sign in to comment.