Skip to content

Commit 46932c3

Browse files
V1.5.1: closing issues
1 parent f79a57d commit 46932c3

File tree

2 files changed

+31
-18
lines changed

2 files changed

+31
-18
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ The idea and initial work is inspired by @sngazm at https://github.com/lllyasvie
7676

7777
## Update log
7878

79+
1.5.1 Fix issues opened by friendly users
80+
- Close issues [#11](https://github.com/toutjavascript/Fooocus-Log-Viewer/issues/11)
81+
- Close issues [#10](https://github.com/toutjavascript/Fooocus-Log-Viewer/issues/10)
82+
- Close issues [#9](https://github.com/toutjavascript/Fooocus-Log-Viewer/issues/9)
83+
7984
1.5.0 New search box
8085
- Search for all images with prompt/models/styles
8186
- Auto-refresh with new generated images

viewer.html

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
Modestly updated by https://github.com/toutjavascript
1111
https://www.toutjavascript.com
1212
13-
File Version 2024-01-24/A1
13+
File Version 2024-02-06/A1
1414
-->
1515

1616
<html lang="us">
@@ -1097,18 +1097,20 @@
10971097
) : (
10981098
<>
10991099
{key == "Styles" ? (
1100-
<div class="flex">
1100+
<div class="flex">
11011101
{value.replace(/'/g, "").replace("[","").replace("]","").split(", ").map((style, i) => (
1102+
style.trim() !== "" && (
11021103
<div class="flex-initial text-center mx-1 styleContainer">
1103-
<img src={ ("/file=sdxl_styles/samples/"+style.replace(/ /g,"_")+".jpg") } class="styleImage"/>
1104-
<span class="styleTitle">{style}</span>
1104+
<img src={ ("/file=sdxl_styles/samples/"+style.toLowerCase().replace(/ /g,"_")+".jpg") } class="styleImage"/>
1105+
<span class="styleTitle">{style}</span>
11051106
</div>
1106-
))}
1107-
</div>
1108-
) :
1109-
(
1107+
)
1108+
))}
1109+
</div>
1110+
) :
1111+
(
11101112
value
1111-
)}
1113+
)}
11121114
</>
11131115
)}
11141116
</span>
@@ -1281,7 +1283,8 @@
12811283
const getBatchData = (data) => {
12821284
const batchData = [];
12831285
const isAsc = data.length < 2 || data[0].src < data[1].src;
1284-
1286+
console.log("getBatchData: data=")
1287+
console.log(data)
12851288
for (let i = 0; i < data.length; i++) {
12861289
if (i === 0 || !isSameBatch(data[i], data[i - 1])) {
12871290
batchData.push({
@@ -1316,18 +1319,23 @@
13161319
endIndex: i,
13171320
});
13181321
// filter out the property starting with "LoRA"
1322+
console.log("data["+i+"]"); console.log(data[i])
13191323
Object.keys(data[i]).forEach((key) => {
13201324
/* console.log("i="+i+" key:" +key) */
1321-
if (key.startsWith("LoRA ")) { /* After V2.1.854 log format */
1325+
if (key.startsWith("crudLoras")) { /* After V2.1.854 log format */
13221326
try {
1323-
console.log("LORA new "+data[i][key]+" / "+data[i][value]);
1324-
batchData[batchData.length - 1].batchSettings.LoRAs.push({
1325-
name: data[i][key].split(':')[0].trim(),
1326-
weight: data[i][key].split(':')[1].trim()
1327-
});
1328-
} catch(e) {}
1327+
for (let j=0; j<data[i][key].length; j++) {
1328+
const lora=data[i][key][j].split(":");
1329+
console.log("LORA new "+lora[0]+" / "+lora[1]);
1330+
batchData[batchData.length - 1].batchSettings.LoRAs.push({
1331+
name: lora[0].trim(),
1332+
weight: lora[1].trim()
1333+
});
1334+
}
1335+
} catch(e) {
1336+
console.log("error get lora "+e)
1337+
}
13291338
}
1330-
13311339
});
13321340
} else {
13331341
if (batchData.length > 0) {

0 commit comments

Comments
 (0)