Update psv1.js
Browse files
psv1.js
CHANGED
|
@@ -3769,6 +3769,9 @@ function generateSexyPrompt(
|
|
| 3769 |
possibilityCharacter = 0.7
|
| 3770 |
) {
|
| 3771 |
function randomPick(array, n = 1) {
|
|
|
|
|
|
|
|
|
|
| 3772 |
if (n === 1) return array[Math.floor(Math.random() * array.length)];
|
| 3773 |
return Array.from(
|
| 3774 |
{ length: n },
|
|
@@ -3835,7 +3838,7 @@ function generateSexyPrompt(
|
|
| 3835 |
}
|
| 3836 |
|
| 3837 |
function generateBodyDescription() {
|
| 3838 |
-
|
| 3839 |
terms = []
|
| 3840 |
for (key in classifier.body_parts) {
|
| 3841 |
if (key === "genitals"){continue;}
|
|
@@ -3845,6 +3848,10 @@ function generateSexyPrompt(
|
|
| 3845 |
}
|
| 3846 |
return terms;
|
| 3847 |
}).filter(Boolean);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3848 |
}
|
| 3849 |
|
| 3850 |
function generateClothing() {
|
|
|
|
| 3769 |
possibilityCharacter = 0.7
|
| 3770 |
) {
|
| 3771 |
function randomPick(array, n = 1) {
|
| 3772 |
+
if (!array||array.length == 0){
|
| 3773 |
+
return "";
|
| 3774 |
+
}
|
| 3775 |
if (n === 1) return array[Math.floor(Math.random() * array.length)];
|
| 3776 |
return Array.from(
|
| 3777 |
{ length: n },
|
|
|
|
| 3838 |
}
|
| 3839 |
|
| 3840 |
function generateBodyDescription() {
|
| 3841 |
+
result = Array.from({ length: Math.floor(Math.random() * 3) + 1 }, () => {
|
| 3842 |
terms = []
|
| 3843 |
for (key in classifier.body_parts) {
|
| 3844 |
if (key === "genitals"){continue;}
|
|
|
|
| 3848 |
}
|
| 3849 |
return terms;
|
| 3850 |
}).filter(Boolean);
|
| 3851 |
+
if (result){
|
| 3852 |
+
return result;
|
| 3853 |
+
}
|
| 3854 |
+
return []
|
| 3855 |
}
|
| 3856 |
|
| 3857 |
function generateClothing() {
|