Update PNG_info_web.js
Browse files- PNG_info_web.js +6 -4
PNG_info_web.js
CHANGED
|
@@ -796,12 +796,14 @@ let imgStorage=(img)=>{
|
|
| 796 |
.match(/(?<=Negative prompt:)(.*)(?=Steps:)/s)[0]
|
| 797 |
.trim();
|
| 798 |
let resArr = res[0].text
|
| 799 |
-
.split(result.negativePrompt)[1]
|
| 800 |
-
|
| 801 |
-
|
|
|
|
| 802 |
resArr.forEach((e) => {
|
| 803 |
-
result[e.split(":")[0].replace(/\s+/g, "")] = e.split(":")[1].trim();
|
| 804 |
});
|
|
|
|
| 805 |
this.result = result;
|
| 806 |
|
| 807 |
//txt2img
|
|
|
|
| 796 |
.match(/(?<=Negative prompt:)(.*)(?=Steps:)/s)[0]
|
| 797 |
.trim();
|
| 798 |
let resArr = res[0].text
|
| 799 |
+
.split(result.negativePrompt)[1].replace(/"([^"]*)"/g, function(match, group) {
|
| 800 |
+
return match.replace(/,/g, "<comma>").replace(/:/g, "<maohao>");
|
| 801 |
+
}).trim().split(",");
|
| 802 |
+
console.log(resArr)
|
| 803 |
resArr.forEach((e) => {
|
| 804 |
+
result[e.split(":")[0].replace(/\s+/g, "")] = e.split(":")[1].replace(/<comma>/g, ",").replace(/<maohao>/g, ":").trim();
|
| 805 |
});
|
| 806 |
+
console.log(result)
|
| 807 |
this.result = result;
|
| 808 |
|
| 809 |
//txt2img
|