fix: embedding id

This commit is contained in:
Radionic
2023-12-20 17:09:45 +08:00
parent 240bc5d1b8
commit 420fbff0b9
+1 -1
View File
@@ -749,7 +749,7 @@ function injectUIComponentToComfyuimenu() {
app.graphToPrompt().then(p=>{
console.log('fkfk');
let json = JSON.stringify(p.output, null, 2); // convert the data to a JSON string
json = json.replace(/"seed": (\d+)/g, `"seed": "SEED"`).replace(/"image": "(?!.*mask.*\.png).*"/g, '"image": "reference_image_avatech"').replace(/"embedding_id": "(\d+)"/g, '"embedding_id": "embedding_id_avatech"');
json = json.replace(/"seed": (\d+)/g, `"seed": "SEED"`).replace(/"image": "(?!.*mask.*\.png).*"/g, '"image": "reference_image_avatech"').replace(/"embedding_id": ".*"/g, '"embedding_id": "embedding_id_avatech"');
const blob = new Blob([json], {type: "application/json"});
const url = URL.createObjectURL(blob);
a.href = url;