yasir
commited on
Commit
•
ec8fce8
1
Parent(s):
9a25f71
Update script.js
Browse files
script.js
CHANGED
@@ -2,6 +2,7 @@ document.getElementById('jd').onclick = ()=>{
|
|
2 |
window.open('https://discord.gg/ju4yQBfQ7p')
|
3 |
}
|
4 |
|
|
|
5 |
/*document.getElementById('ow').onclick = ()=>{
|
6 |
window.open('https://www.buymeacoffee.com/mygx')
|
7 |
}*/
|
@@ -36,32 +37,32 @@ seed.addEventListener('input',()=>{
|
|
36 |
seedp.innerText = seed.value
|
37 |
})
|
38 |
isFumes = true
|
39 |
-
let prompt = ',RAW photo,
|
40 |
let nps = ' ,(bad hands, bad anatomy, bad body, bad face, bad teeth, bad arms, bad legs, deformities:1.3),poorly drawn,deformed hands,deformed fingers,deformed faces,deformed eyes,mutated fingers,deformedbody parts,mutated body parts,mutated hands, disfigured,oversaturated,bad anatom,cropped, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, out of frame, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, deformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck,deformed eyes'
|
41 |
document.getElementById('styles').onchange = ()=>{
|
42 |
const selectedStyle = document.querySelector('input[name="style"]:checked');
|
43 |
if(selectedStyle.value =='photo'){
|
44 |
-
isFumes =
|
45 |
prompt = ' ,RAW photo, portrait photo,(high detailed skin:1. 2), 8k uhd, dslr, soft lighting, high quality, film grain, Fujifilm'
|
46 |
nps = ' ,deformed fingers,mutated hands,unrealistic hands,extra fingers,less fingers,mutated eyes,malformed hands,malformed fingers,malformed faces,malfromed eyes,malformed body parts,mutated body parts,mutated fingers,mutated hands,(deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime:1.4), text, close up, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck'
|
47 |
}
|
48 |
if(selectedStyle.value == 'cinema'){
|
49 |
-
isFumes =
|
50 |
prompt = ' ,cinematic film still awardwinning photo, highly detailed, high budget, bokeh, cinemascope, moody, epic, gorgeous, film grain, grainy'
|
51 |
nps = ' ,deformed fingers,mutated hands,unrealistic hands,extra fingers,less fingers,mutated eyes,malformed hands,malformed fingers,malformed faces,malfromed eyes,malformed body parts,mutated body parts,mutated fingers,mutated hands,(deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime:1.4), text, close up, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck'
|
52 |
}
|
53 |
if(selectedStyle.value == 'real'){
|
54 |
-
isFumes =
|
55 |
prompt = ' ,RAW candid cinema,Modern colors, 16mm, beautiful,attractive,color graded portra 400 film, remarkable color, ultra realistic, textured skin, remarkable detailed pupils, realistic dull skin noise, visible skin detail, skin fuzz, dry skin, shot with cinematic camera, sun soaked colors'
|
56 |
nps = ' ,deformed fingers,mutated hands,unrealistic hands,extra fingers,less fingers,mutated eyes,malformed hands,malformed fingers,malformed faces,malfromed eyes,malformed body parts,mutated body parts,mutated fingers,mutated hands,poorly drawn,lowres, disfigured,bad anatomy,deformed body features ,cropped, worst quality, low quality, jpeg artifacts, ugly, duplicate, out of frame, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck,deformed eyes'
|
57 |
}
|
58 |
if(selectedStyle.value == 'fantasy'){
|
59 |
-
isFumes =
|
60 |
prompt = ' ,centered shot, wide angle, full body, dd, fantasy, highly detailed, digital painting, artstation, smooth, sharp focus, digital art'
|
61 |
nps = ' ,deformed fingers,mutated hands,unrealistic hands,extra fingers,less fingers,mutated eyes,malformed hands,malformed fingers,malformed faces,malfromed eyes,malformed body parts,mutated body parts,mutated fingers,mutated hands,missing legs, missing feet, worst quality, low quality, jpeg artifacts, signature, logo, watermark, text, realistic, hyper-realistic, ultra-detailed, RAW photo'
|
62 |
}
|
63 |
if(selectedStyle.value == 'anime'){
|
64 |
-
isFumes =
|
65 |
prompt = ' ,masterpiece,HDR,anime,anime style,beuatiful anime'
|
66 |
nps = ' ,malformed hands,malformed fingers,malformed faces,malformed body parts,mutated body parts,malfromed eyes,mutated fingers,mutated hands,realistic,worst quality, low quality, blurry, pixelated, extra limb, extra fingers, bad hand, text, name, letters, out of frame, lowres, text, error, cropped, jpeg artifacts, ugly, duplicate, morbid, mutilated, out of frame, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck, username, watermark, signature'
|
67 |
}
|
@@ -78,10 +79,17 @@ let nps = ' ,deformed fingers,mutated hands,unrealistic hands,extra fingers,less
|
|
78 |
}
|
79 |
|
80 |
isf = false
|
|
|
81 |
let fullPrompt = inp.value+prompt
|
82 |
-
|
|
|
|
|
83 |
btn.onclick = async ()=>{
|
84 |
-
|
|
|
|
|
|
|
|
|
85 |
fullPrompt = inp.value
|
86 |
const div = document.getElementById('imshow');
|
87 |
div.innerHTML = '';
|
@@ -93,7 +101,7 @@ btn.onclick = async ()=>{
|
|
93 |
let data = {
|
94 |
prompt: inp.value+prompt
|
95 |
};
|
96 |
-
await fetch('https://
|
97 |
method: 'POST',
|
98 |
headers: {
|
99 |
'Content-Type': 'application/json'
|
@@ -102,27 +110,23 @@ body: JSON.stringify(data)
|
|
102 |
})
|
103 |
.then(response => response.json())
|
104 |
.then(data =>{
|
105 |
-
|
106 |
-
fullPrompt=inp.value+prompt
|
107 |
-
}
|
108 |
-
else{
|
109 |
-
fullPrompt=data.result
|
110 |
-
}
|
111 |
})
|
112 |
.catch((error) => {
|
113 |
console.error('Error:', error);
|
114 |
});
|
115 |
|
|
|
116 |
}
|
117 |
else{
|
118 |
fullPrompt = inp.value+prompt
|
119 |
}
|
120 |
|
121 |
|
122 |
-
|
123 |
-
let url2 = 'https://hacking-is-serious-illegal-crime-you.onrender.com/
|
124 |
let idlist = []
|
125 |
-
url = 'https://flask-hello-world-murex-sigma.vercel.app/
|
126 |
var selectElement = document.getElementById("model");
|
127 |
var selectedIndex = selectElement.selectedIndex;
|
128 |
if (selectedIndex === -1) {
|
@@ -146,7 +150,7 @@ if (selectedIndex === -1) {
|
|
146 |
|
147 |
}
|
148 |
if(selectedOption.value == 'ar'){
|
149 |
-
url = 'https://flask-hello-world-murex-sigma.vercel.app/
|
150 |
|
151 |
}
|
152 |
if(selectedOption.value == 'er'){
|
@@ -155,7 +159,8 @@ if (selectedIndex === -1) {
|
|
155 |
}
|
156 |
if(selectedOption.value == 'anything'){
|
157 |
url = 'https://flask-hello-world-murex-sigma.vercel.app/anything'
|
158 |
-
|
|
|
159 |
}
|
160 |
if(selectedOption.value == 'focus'){
|
161 |
url = 'https://flask-hello-world-murex-sigma.vercel.app/focus'
|
@@ -273,6 +278,6 @@ fetch(url2, {
|
|
273 |
|
274 |
final2()
|
275 |
final1()
|
276 |
-
},
|
277 |
|
278 |
}
|
|
|
2 |
window.open('https://discord.gg/ju4yQBfQ7p')
|
3 |
}
|
4 |
|
5 |
+
|
6 |
/*document.getElementById('ow').onclick = ()=>{
|
7 |
window.open('https://www.buymeacoffee.com/mygx')
|
8 |
}*/
|
|
|
37 |
seedp.innerText = seed.value
|
38 |
})
|
39 |
isFumes = true
|
40 |
+
let prompt = ',RAW photo, photorealistic, extremely detailed informations, hyper:realistic,HIGHLY INTRICATE DETAILS,EXTREMELY MASTERPIECE'
|
41 |
let nps = ' ,(bad hands, bad anatomy, bad body, bad face, bad teeth, bad arms, bad legs, deformities:1.3),poorly drawn,deformed hands,deformed fingers,deformed faces,deformed eyes,mutated fingers,deformedbody parts,mutated body parts,mutated hands, disfigured,oversaturated,bad anatom,cropped, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, out of frame, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, deformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck,deformed eyes'
|
42 |
document.getElementById('styles').onchange = ()=>{
|
43 |
const selectedStyle = document.querySelector('input[name="style"]:checked');
|
44 |
if(selectedStyle.value =='photo'){
|
45 |
+
isFumes = true
|
46 |
prompt = ' ,RAW photo, portrait photo,(high detailed skin:1. 2), 8k uhd, dslr, soft lighting, high quality, film grain, Fujifilm'
|
47 |
nps = ' ,deformed fingers,mutated hands,unrealistic hands,extra fingers,less fingers,mutated eyes,malformed hands,malformed fingers,malformed faces,malfromed eyes,malformed body parts,mutated body parts,mutated fingers,mutated hands,(deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime:1.4), text, close up, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck'
|
48 |
}
|
49 |
if(selectedStyle.value == 'cinema'){
|
50 |
+
isFumes = true
|
51 |
prompt = ' ,cinematic film still awardwinning photo, highly detailed, high budget, bokeh, cinemascope, moody, epic, gorgeous, film grain, grainy'
|
52 |
nps = ' ,deformed fingers,mutated hands,unrealistic hands,extra fingers,less fingers,mutated eyes,malformed hands,malformed fingers,malformed faces,malfromed eyes,malformed body parts,mutated body parts,mutated fingers,mutated hands,(deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime:1.4), text, close up, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck'
|
53 |
}
|
54 |
if(selectedStyle.value == 'real'){
|
55 |
+
isFumes = true
|
56 |
prompt = ' ,RAW candid cinema,Modern colors, 16mm, beautiful,attractive,color graded portra 400 film, remarkable color, ultra realistic, textured skin, remarkable detailed pupils, realistic dull skin noise, visible skin detail, skin fuzz, dry skin, shot with cinematic camera, sun soaked colors'
|
57 |
nps = ' ,deformed fingers,mutated hands,unrealistic hands,extra fingers,less fingers,mutated eyes,malformed hands,malformed fingers,malformed faces,malfromed eyes,malformed body parts,mutated body parts,mutated fingers,mutated hands,poorly drawn,lowres, disfigured,bad anatomy,deformed body features ,cropped, worst quality, low quality, jpeg artifacts, ugly, duplicate, out of frame, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck,deformed eyes'
|
58 |
}
|
59 |
if(selectedStyle.value == 'fantasy'){
|
60 |
+
isFumes = true
|
61 |
prompt = ' ,centered shot, wide angle, full body, dd, fantasy, highly detailed, digital painting, artstation, smooth, sharp focus, digital art'
|
62 |
nps = ' ,deformed fingers,mutated hands,unrealistic hands,extra fingers,less fingers,mutated eyes,malformed hands,malformed fingers,malformed faces,malfromed eyes,malformed body parts,mutated body parts,mutated fingers,mutated hands,missing legs, missing feet, worst quality, low quality, jpeg artifacts, signature, logo, watermark, text, realistic, hyper-realistic, ultra-detailed, RAW photo'
|
63 |
}
|
64 |
if(selectedStyle.value == 'anime'){
|
65 |
+
isFumes = true
|
66 |
prompt = ' ,masterpiece,HDR,anime,anime style,beuatiful anime'
|
67 |
nps = ' ,malformed hands,malformed fingers,malformed faces,malformed body parts,mutated body parts,malfromed eyes,mutated fingers,mutated hands,realistic,worst quality, low quality, blurry, pixelated, extra limb, extra fingers, bad hand, text, name, letters, out of frame, lowres, text, error, cropped, jpeg artifacts, ugly, duplicate, morbid, mutilated, out of frame, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck, username, watermark, signature'
|
68 |
}
|
|
|
79 |
}
|
80 |
|
81 |
isf = false
|
82 |
+
reload = false
|
83 |
let fullPrompt = inp.value+prompt
|
84 |
+
setTimeout(()=>{
|
85 |
+
reload = true
|
86 |
+
},200000)
|
87 |
btn.onclick = async ()=>{
|
88 |
+
let id = ''
|
89 |
+
if(reload == true){
|
90 |
+
window.location.reload();
|
91 |
+
}
|
92 |
+
if(isFumes == 'no'){
|
93 |
fullPrompt = inp.value
|
94 |
const div = document.getElementById('imshow');
|
95 |
div.innerHTML = '';
|
|
|
101 |
let data = {
|
102 |
prompt: inp.value+prompt
|
103 |
};
|
104 |
+
await fetch('https://flask-hello-world-murex-sigma.vercel.app/generate', {
|
105 |
method: 'POST',
|
106 |
headers: {
|
107 |
'Content-Type': 'application/json'
|
|
|
110 |
})
|
111 |
.then(response => response.json())
|
112 |
.then(data =>{
|
113 |
+
id = data
|
|
|
|
|
|
|
|
|
|
|
114 |
})
|
115 |
.catch((error) => {
|
116 |
console.error('Error:', error);
|
117 |
});
|
118 |
|
119 |
+
|
120 |
}
|
121 |
else{
|
122 |
fullPrompt = inp.value+prompt
|
123 |
}
|
124 |
|
125 |
|
126 |
+
//https://hacking-is-serious-illegal-crime-you.onrender.com/sdxl
|
127 |
+
let url2 = 'https://hacking-is-serious-illegal-crime-you.onrender.com/get_prediction'
|
128 |
let idlist = []
|
129 |
+
url = 'https://flask-hello-world-murex-sigma.vercel.app/predict'
|
130 |
var selectElement = document.getElementById("model");
|
131 |
var selectedIndex = selectElement.selectedIndex;
|
132 |
if (selectedIndex === -1) {
|
|
|
150 |
|
151 |
}
|
152 |
if(selectedOption.value == 'ar'){
|
153 |
+
url = 'https://flask-hello-world-murex-sigma.vercel.app/predict'
|
154 |
|
155 |
}
|
156 |
if(selectedOption.value == 'er'){
|
|
|
159 |
}
|
160 |
if(selectedOption.value == 'anything'){
|
161 |
url = 'https://flask-hello-world-murex-sigma.vercel.app/anything'
|
162 |
+
prompt = ',masterpiece,HDR,anime,anime style,beuatiful anime'
|
163 |
+
fullPrompt = inp.value+prompt
|
164 |
}
|
165 |
if(selectedOption.value == 'focus'){
|
166 |
url = 'https://flask-hello-world-murex-sigma.vercel.app/focus'
|
|
|
278 |
|
279 |
final2()
|
280 |
final1()
|
281 |
+
},8000)
|
282 |
|
283 |
}
|