Skip to content

Commit bdb7cdf

Browse files
committed
Fixed major issue
1 parent 5a2ca5e commit bdb7cdf

File tree

4 files changed

+44
-26
lines changed

4 files changed

+44
-26
lines changed

plugins/LocalVisage/LocalVisage.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
name: Local Visage
22
description: Local Performer Recognition plugin using DeepFace
33
# requires: PythonDepManager
4-
# requires: StashUserscriptLibrary
5-
version: 1.0
4+
# requires: stashUserscriptLibrary7dJx1qP
5+
version: 1.0.1
66
exec:
77
- python
88
- "{pluginDir}/LocalVisage.py"
99
interface: raw
1010
ui:
1111
requires:
12-
- StashUserscriptLibrary
12+
- stashUserscriptLibrary7dJx1qP
1313
javascript:
1414
- frontend.js
1515
- https://cdn.jsdelivr.net/npm/@gradio/[email protected]/dist/index.js

plugins/LocalVisage/frontend.js

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
(function (stash) {
1+
(function () {
22
"use strict";
3-
3+
console.log("LocalVisage frontend.js loaded");
4+
console.log("stash7dJx1qP:", stash7dJx1qP);
45
// Using CDN version of @gradio/client to avoid bundling issues
56
// import { Client, handle_file } from "@gradio/client";
67

@@ -42,7 +43,7 @@
4243
runPluginTask(plugin_id:"LocalVisage",task_name:"Start server")
4344
}`,
4445
};
45-
await stash.callGQL(reqData);
46+
await stash7dJx1qP.stash.callGQL(reqData);
4647
}
4748

4849
async function getPerformersForScene(scene_id) {
@@ -55,7 +56,7 @@
5556
}
5657
}`,
5758
};
58-
var result = await stash.callGQL(reqData);
59+
var result = await stash7dJx1qP.stash.callGQL(reqData);
5960
return result.data.findScene.performers.map((p) => p.id);
6061
}
6162

@@ -69,7 +70,7 @@
6970
}
7071
}`,
7172
};
72-
var result = await stash.callGQL(reqData);
73+
var result = await stash7dJx1qP.stash.callGQL(reqData);
7374
return result.data.findImage.performers.map((p) => p.id);
7475
}
7576

@@ -82,7 +83,7 @@
8283
}
8384
}`,
8485
};
85-
return stash.callGQL(reqData);
86+
return stash7dJx1qP.stash.callGQL(reqData);
8687
}
8788

8889
async function updateImage(image_id, performer_ids) {
@@ -94,7 +95,7 @@
9495
}
9596
}`,
9697
};
97-
return stash.callGQL(reqData);
98+
return stash7dJx1qP.stash.callGQL(reqData);
9899
}
99100

100101
async function getStashboxEndpoint() {
@@ -109,7 +110,7 @@
109110
}
110111
}`,
111112
};
112-
var result = await stash.callGQL(reqData);
113+
var result = await stash7dJx1qP.stash.callGQL(reqData);
113114
return result.data.configuration.general.stashBoxes[0].endpoint;
114115
}
115116

@@ -151,7 +152,7 @@
151152
}
152153
}`,
153154
};
154-
var result = await stash.callGQL(reqData);
155+
var result = await stash7dJx1qP.stash.callGQL(reqData);
155156
return result.data.scrapeSinglePerformer.filter(
156157
(p) => p.remote_site_id === stash_id
157158
)[0];
@@ -166,7 +167,7 @@
166167
}
167168
}`,
168169
};
169-
return stash.callGQL(reqData);
170+
return stash7dJx1qP.stash.callGQL(reqData);
170171
}
171172

172173
let gradioClientModule = null;
@@ -433,7 +434,7 @@
433434
}
434435
}`,
435436
};
436-
var result = await stash.callGQL(reqData);
437+
var result = await stash7dJx1qP.stash.callGQL(reqData);
437438
const url = result.data.findScene.paths["sprite"];
438439
const response = await fetch(url);
439440
if (response.status === 404) {
@@ -2563,7 +2564,7 @@
25632564
a,
25642565
"href",
25652566
(a_href_value =
2566-
window.stash.serverUrl.slice(0, -1) +
2567+
window.stash7dJx1qP.stash.serverUrl.slice(0, -1) +
25672568
"/performers/" +
25682569
/*match*/ ctx[14].id)
25692570
);
@@ -2647,7 +2648,7 @@
26472648
dirty & /*matches*/ 1 &&
26482649
a_href_value !==
26492650
(a_href_value =
2650-
window.stash.serverUrl.slice(0, -1) +
2651+
window.stash7dJx1qP.stash.serverUrl.slice(0, -1) +
26512652
"/performers/" +
26522653
/*match*/ ctx[14].id)
26532654
) {
@@ -13970,14 +13971,17 @@
1397013971
if (
1397113972
performer.image &&
1397213973
typeof performer.image === "string" &&
13973-
!performer.image.startsWith(window.stash.serverUrl)
13974+
!performer.image.startsWith(
13975+
window.stash7dJx1qP.stash.serverUrl
13976+
)
1397413977
) {
1397513978
performer.image =
13976-
window.stash.serverUrl.slice(0, -1) + performer.image;
13979+
window.stash7dJx1qP.stash.serverUrl.slice(0, -1) +
13980+
performer.image;
1397713981
}
1397813982
if (performer.performer_url) {
1397913983
performer.performer_url =
13980-
window.stash.serverUrl.slice(0, -1) +
13984+
window.stash7dJx1qP.stash.serverUrl.slice(0, -1) +
1398113985
performer.performer_url;
1398213986
}
1398313987
});
@@ -14553,8 +14557,9 @@
1455314557
init(this, options, instance, create_fragment, safe_not_equal, {});
1455414558
}
1455514559
}
14556-
14557-
stash.addEventListener("stash:page:scene", function () {
14560+
console.log("Local Faces loaded");
14561+
stash7dJx1qP.stash.addEventListener("page:scene", function () {
14562+
console.log("Local Faces scene toolbar");
1455814563
let elms = ".scene-toolbar-group:nth-child(1)";
1455914564
waitForElm(elms).then(() => {
1456014565
const e = document.querySelector(elms);
@@ -14567,7 +14572,7 @@
1456714572
//To use the above, a compatible version of mediapipe is required and i didnt find it
1456814573
});
1456914574
});
14570-
stash.addEventListener("stash:page:image", function () {
14575+
stash7dJx1qP.stash.addEventListener("page:image", function () {
1457114576
let elms = ".image-toolbar-group:nth-child(1)";
1457214577
waitForElm(elms).then(() => {
1457314578
if (!document.querySelector("#localFaces")) {
@@ -14576,4 +14581,4 @@
1457614581
}
1457714582
});
1457814583
});
14579-
})(window.stash || stash);
14584+
})(window.stash7dJx1qP);

plugins/LocalVisage/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ A plugin for recognizing performers from their images using [DeepFace](https://g
2222

2323
- Python 3.10.11 (temporarily, see instructions below)
2424
- `PythonDepManager`
25-
- `StashUserscriptLibrary`
25+
- `stashUserscriptLibrary7djx1qp` (add repo https://7djx1qp.github.io/stash-plugins/
2626

2727
## ⚙️ Tasks
2828

plugins/LocalVisage/requirements.txt

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
#Dont install this manually. The plugin will create a venv and install the requirements automatically.
2+
#
3+
#nvidia-cublas-cu12==12.4.5.8
4+
#nvidia-cuda-cupti-cu12==12.4.127
5+
#nvidia-cuda-nvrtc-cu12==12.4.127
6+
#nvidia-cuda-runtime-cu12==12.4.127
7+
#nvidia-cudnn-cu12==9.1.0.70
8+
#nvidia-cufft-cu12==11.2.1.3
9+
#nvidia-curand-cu12==10.3.5.147
10+
#nvidia-cusolver-cu12==11.6.1.9
11+
#nvidia-cusparse-cu12==12.3.1.170
12+
#nvidia-cusparselt-cu12==0.6.2
13+
#nvidia-nccl-cu12==2.21.5
14+
#nvidia-nvjitlink-cu12==12.4.127
15+
#nvidia-nvtx-cu12==12.4.127
216
stashapp-tools>=0.2.58
3-
psutil==7.0.0
417
absl-py==2.2.2
518
aiofiles==24.1.0
619
annotated-types==0.7.0
@@ -49,7 +62,6 @@ markdown-it-py==3.0.0
4962
markupsafe==3.0.2
5063
matplotlib==3.10.1
5164
mdurl==0.1.2
52-
mediapipe>=0.10.21
5365
ml-dtypes==0.5.1
5466
mpmath==1.3.0
5567
mtcnn==1.0.0
@@ -110,6 +122,7 @@ ultralytics==8.3.69
110122
ultralytics-thop==2.0.14
111123
urllib3==2.4.0
112124
uvicorn==0.34.2
125+
voyager==2.1.0
113126
websockets==15.0.1
114127
werkzeug==3.1.3
115128
wheel==0.45.1

0 commit comments

Comments
 (0)