Spaces:
Running
Running
File size: 19,111 Bytes
e167b93 34a951f e167b93 7745745 e167b93 62b4936 e167b93 7745745 e167b93 7745745 e167b93 d17960c 7745745 e167b93 2b7af10 acbd4de 3026cba acbd4de f5175d0 38afd1e e167b93 7745745 31779d8 7745745 31779d8 7745745 31779d8 7745745 31779d8 7745745 97804f7 6cbb927 8b51725 6cbb927 97804f7 1e2b849 5351339 9c4cc83 f96f060 5351339 7745745 2c72e27 7745745 e167b93 7745745 46b5b13 6181ce0 7745745 e167b93 7745745 e167b93 3026cba e167b93 3e5f5d2 e167b93 7745745 e167b93 7622691 e167b93 7622691 e167b93 7745745 d229031 9066de5 7745745 e167b93 d229031 7745745 d229031 7745745 d229031 7745745 6181ce0 7745745 f610671 7745745 e167b93 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
<script type='text/javascript'>
window.smartlook||(function(d) {
var o=smartlook=function(){ o.api.push(arguments)},h=d.getElementsByTagName('head')[0];
var c=d.createElement('script');o.api=new Array();c.async=true;c.type='text/javascript';
c.charset='utf-8';c.src='https://web-sdk.smartlook.com/recorder.js';h.appendChild(c);
})(document);
smartlook('init', 'ab064cf709cc86cb945d2dfb051a3a1254d7fb19', { region: 'eu' });
</script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.11/katex.min.css">
<link href="https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@100&display=swap" rel="stylesheet" <meta
charset="UTF-8">
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8419334759638161"
crossorigin="anonymous"></script>
<title>AI Image Creator</title>
<style>
html, body {
margin: 0;
padding: 0;
box-sizing: border-box;
overflow-x: hidden !important;
}
body {
background-color: #000000;
margin: 0;
}
#main {
display: flex;
flex-direction: column;
margin: 50px;
margin: auto;
}
#cont {
background-color: #030303;
padding: 0px;
border-radius: 12px;
box-shadow: 8px 8px 16px #050505, -8px -8px 16px #080808;
display: flex;
align-items: center;
background: linear-gradient(black, black) padding-box,
linear-gradient(to left, cyan, purple) border-box;
border-radius: 12px;
border: 2.5px solid transparent;
width: 70%;
height: 9vh;
margin: auto;
margin-top: 5%;
margin-bottom: 20px;
}
#inp {
flex-grow: 1;
padding: 10px;
margin: 10px;
background: transparent;
border: none;
border-radius: 8px;
box-shadow: linear-gradient(145deg, rgb(0, 249, 153), #ff002b);
color: #fff;
outline: none;
min-height:40px;
}
#cont button {
padding: 2.5vh 4.6vh;
margin: 1vh;
background: linear-gradient(155deg, rgb(0, 149, 249), #9D00FF, rgb(255, 0, 43));
border: none;
border-radius: 8px;
color: #fff;
cursor: pointer;
}
#cont button:hover {
background: linear-gradient(145deg, #00ffab, rgb(255, 0, 43));
}
#as {
display: flex;
flex-direction: row;
width: 70%;
margin: auto;
justify-content: space-between;
}
#as button {
background-color: #0a0a0a;
border: none;
padding: 3vh 4.5vh;
font-size: 15px;
color: #ffffff;
cursor: pointer;
border-radius: 12px;
transition: box-shadow 0.3s ease-in-out;
}
#model{
background-color: #181717;
border: none;
padding: 3vh 4.5vh;
font-size: 15px;
color: #ffffff;
cursor: pointer;
border-radius: 12px;
transition: box-shadow 0.3s ease-in-out;
padding: 0px 0px 0px 20px ;
}
#as button:hover {
box-shadow: 15px 15px 30px #0d0d0d, -15px -15px 30px #1a1a1a; /* Adjusted shadow and highlight on hover */
}
@media only screen and (max-width: 600px) {
#cont {
width: 90%;
margin-bottom: 20px;
}
#main{
width: 90%;
}
#cont button {
padding: 15px 15px; /* Adjust button padding for smaller screens */
}
#as{
width: 88%;
}
#as button{
padding: 15px 20px; /* Adjust button padding for smaller screens */
}
.mod{
}
}
@media only screen and (max-width: 365px){
#cont{
width: 94%;
}
#main{
width: 94%;
}
#as{
width: 94%;
}
}
dialog{
background: rgba(29, 29, 29, 1);
border-radius: 16px;
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
margin-top: 20px;
border: 1px solid rgba(14, 13, 13, 0.3);
z-index: 100;
background: "Black";
}
#sli{
display: flex;
flex-direction: row;
align-items: center;
color: #eeeeee;
}
label{
font-family: 'Barlow Condensed';
font-size: 21px;
margin-right: 10px;
}
#sli input{
border: 1px solid rgb(137, 9, 223);
outline: none;
border-radius: 5px;
padding: 7px 20px;
background-color: transparent ;
color: white;
font-family: 'Barlow Condensed';
}
#Apply{
background-color: rgb(0, 247, 173);
padding: 5px 10px;
border: none;
color: #000000;
font-weight:500;
font-family: Arial, Helvetica, sans-serif;
font-size: 15px;
border-radius: 4px;
}
#close{
float: right;background-color: rgb(223, 7, 79); padding: 5px 10px;
border: none;
color: #000000;
font-weight:500;
font-family: Arial, Helvetica, sans-serif;
font-size: 15px;
border-radius: 4px;
}
#styles{
display: flex;
flex-direction: row;
gap: 6px;
color: white;
font-family: 'Barlow Condensed';
font-size: 20px;
flex-wrap: wrap;
}
@media screen and (min-width: 500px) and (max-width: 720px) {
dialog{
max-width: 420px;
}
#cont{
height: 7vh;
}
}
#styles{
align-items: center;
justify-content: center;
}
@media screen and (max-width: 500px) {
.ad{
display: flex;
flex-direction: row;
}
dialog {
max-width: 300px;
}
#jd {
font-size: 14px;
}
#styles{
align-items: center;
justify-content: center;
}
}
#jd{
margin: 10px;
padding: 5px;
background-color: transparent;
color: #eeeeee;
margin-right: 0;
margin-left: 0;
background: linear-gradient(black, rgb(0, 0, 0)) padding-box,
linear-gradient(to right, rgb(1, 255, 234),#ff0055) border-box;
border-radius: 20px;
border: 2.5px solid transparent;
border-radius: 7px;
margin-left: 0px;
font-family: 'Barlow Condensed';
font-size: 18px;
color: white;
}
#jd:hover{
background: linear-gradient(black, black) padding-box,
linear-gradient(to right, blue,#00ffdd) border-box;
border-radius: 10px;
border: 2.5px solid transparent;
}
#ow{
float: right;
margin: 10px;
padding: 10px;
background-color: transparent;
color: #eeeeee;
background: linear-gradient(black, black) padding-box,
linear-gradient(to right, rgb(0, 255, 149), rgb(174, 0, 255)) border-box;
border-radius: 10px;
border: 2.5px solid transparent;
border-radius: 10px;
margin-bottom: 0px;
margin-right: 0;
margin-left: 0;
border: 2px solid white;
}
#ow:hover{
background: linear-gradient(black, black) padding-box,
linear-gradient(to right, rgb(174, 0, 255),rgb(0, 255, 149)) border-box;
border-radius: 10px;
border: 2.5px solid transparent;
}
#dvv{
width: 100%;
margin-left: 10px;
}
#model{
width: 170px;
height: 50px;
overflow: visible;
}
#model option{
white-space: normal;
padding: 10px;
font-family: 'Barlow Condensed';
line-height: 1.2;
font-size: 24px;
}
.ad{
display: flex;
flex-direction: row;
}
#grad {
background-image: linear-gradient(45deg, rgb(0, 255, 149),rgb(255, 0, 43), rgb(174, 0, 255));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
color: #000;
margin-left:15px;
font-family: 'Barlow Condensed'
}
#imshow progress {
margin-left: auto;
margin-right: auto;
display: block;
height: 25px;
width: 250px;
margin-top: 20px;
}
#imshow h5{
display: block;
}
progress::-webkit-progress-bar {
background-color: rgb(0,5,60);
}
progress::-webkit-progress-value {
background-color: rgb(0, 255, 149);
}
progress {
background-color: rgb(0,5,60);
}
progress::-moz-progress-bar {
background-color: rgb(0, 255, 149); }
progress {
background: rgb(0,10,60);
}
#x{
width:300px;
padding:0px;
gap:0px;
}
#aaa{
color: blue;
margin-left: 15px;
font-family: Arial;
letter-spacing: 0.3px;
}
#imshow {
display: flex;
justify-content: center;
max-width: 500px;
margin: auto;
max-height: 400px;
margin-top: 25px;
}
#imshow img {
max-width: 100%;
max-height: 400px;
margin: 10px;
}
#ratio{
display: flex;
flex-direction: row;
gap: 6px;
color: white;
font-family: 'Barlow Condensed';
font-size: 20px;
flex-wrap: wrap;
}
@media screen and (max-width: 800px) {
#imshow {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
max-width: 330px;
margin-top: 50px;
margin: auto;
overflow: auto;
height: 400px;
}
#imshow progress{
margin-top: 5px;
}
#imshow img {
max-width: 100%;
max-height: 100%;
margin: 10px;
object-fit: contain;
}
#img1{
padding-top: 125%;
}
}
#main{
margin-bottom: 30px;
}
</style>
</head>
<body>
<div id="dvv">
<button id="jd">Discord</button>
<!--<button id="ow">
Donate
</button>-->
</div>
<h3 id="grad">Please like this space ❤️</h3><a href="https://www.buymeacoffee.com/mygX" id="aaa" target=”_blank”>BUY ME COFFE</a>
<p style="color:white;font-family:Barlow Condensed;margin-left:15px">Please open a community discussion if you face any problem or need some assistance. </p>
<div id="main">
<div id="cont">
<input type="text" name="" id="inp" placeholder=" Enter Prompt here..">
<button id="create">Create </button>
</div>
<div id="as">
<select name="" id="model">
<option value="p4" class="mod">Leonardo AI</option>
</select>
<div id="Advance Setting"><button>Setting</button></div>
</div>
</div>
<dialog id="dialog">
<p style="font-size: 23px; font-family: 'Barlow Condensed'; margin: 0px; color: rgb(197, 14, 188);">Styles: </p>
<div id="styles">
<p>Cinematic</p>
<input type="radio" name="style" value="cinema" checked>
<p>Photography</p>
<input type="radio" name="style" value="photo">
<p>FILM<p>
<input type="radio" name="style" value="fumes">
<p>Creative</p>
<input type="radio" name="style" value="fantasy">
<p>No Style</p>
<input type="radio" name="style" value="no">
</div>
<div id="sli">
<label for="#np" style="margin-bottom: 15px;">Negative Prompt: </label>
<input type="text" placeholder="Negative prompt" id="np" style="margin-bottom: 15px;">
</div>
<div id="sli">
<label for="#gds">Guidence Scale: </label>
<input type="range" id="gds" value="7" min="7" max="20" step="1"><p id="gdsp">7</p>
</div>
<div id="sli">
<label for="#step">Steps: </label>
<input type="range" id="step" value="20" min="10" max="40" step="1"><p id="stepp">20</p>
</div>
<div id="sli">
<label for="#gds">Seed: </label>
<input type="range" id="seed" min="0" value="0" step="1" max="99999"><p id="seedp">0</p>
</div>
<div id="ratio">
<p>1 : 1</p>
<input type="radio" name="ratio" value="1:1" checked>
<p>16 : 9</p>
<input type="radio" name="ratio" value="16:9">
<p>9 : 16<p>
<input type="radio" name="ratio" value="9:16">
<p>1 : 2</p>
<input type="radio" name="ratio" value="1:2">
<p>4 : 3</p>
<input type="radio" name="ratio" value="4:3">
</div>
<button id="close">Close</button>
</dialog>
<div id="imshow">
</div>
<script src="https://www.google.com/recaptcha/api.js?render=6Leqa5cpAAAAABVhh6FGouusHKaPjYz65-0Yy8kS"></script>
<script>
document.getElementById('jd').onclick = ()=>{
window.open('https://discord.gg/ju4yQBfQ7p')
}
/*document.getElementById('ow').onclick = ()=>{
window.open('https://www.buymeacoffee.com/mygx')
}*/
let isimg = false
if(isimg == true){
img = document.getElementById('hehe')
img.addEventListener("click", function() {
var imageUrl = this.src;
window.open(imageUrl, "_blank");
});
}
let dialog = document.getElementById('dialog')
let openbtn = document.getElementById('Advance Setting')
let closebtn = document.getElementById('close')
openbtn.onclick = ()=>{
dialog.show()
document.getElementById('imshow').style.border = '0px solid black transparent'
}
closebtn.onclick= ()=>{
dialog.close()
document.getElementById('imshow').style.background = 'linear-gradient(black, black) padding-box,linear-gradient(to right, red, blue) border-box'
}
let inp = document.getElementById('inp')
let np = document.getElementById('np')
let gd = document.getElementById('gds')
let step = document.getElementById('step')
let seed = document.getElementById('seed')
let seedp = document.getElementById('seedp')
let stepp = document.getElementById('stepp')
let gdsp = document.getElementById('gdsp')
let btn = document.getElementById('create')
let heightp = 1024
let widthp = 1024
let cn = false
gd.addEventListener('input',()=>{
gdsp.innerText = gd.value
})
step.addEventListener('input',()=>{
stepp.innerText = step.value
})
seed.addEventListener('input',()=>{
seedp.innerText = seed.value
})
isFumes = true
let prompt = 'CINEMATIC'
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'
let reload = false
document.getElementById('styles').onchange = ()=>{
const selectedStyle = document.querySelector('input[name="style"]:checked');
if(selectedStyle.value =='photo'){
prompt = 'PHOTOGRAPHY'
}
if(selectedStyle.value == 'cinema'){
prompt = "CINEMATIC"}
if(selectedStyle.value == 'fantasy'){
prompt = "CREATIVE"
}
if(selectedStyle.value == 'fumes'){
prompt = 'FILM'
}
if(selectedStyle.value == 'no'){
prompt = 'LEONARDO'
}
}
document.getElementById('ratio').onchange = ()=>{
const selectedStyle = document.querySelector('input[name="ratio"]:checked');
if(selectedStyle.value =='1:1'){
widthp = 1024
heightp = 1024
}
if(selectedStyle.value == '16:9'){
widthp = 1024
heightp = 576
document.getElementById("img1").style.marginTop = "30%";
}
if(selectedStyle.value == '9:16'){
widthp = 576
heightp = 1024
}
if(selectedStyle.value == '1:2'){
widthp = 544
heightp = 1088
}
if(selectedStyle.value == '4:3'){
widthp = 896
heightp = 672
}
}
btn.onclick = async () => {
grecaptcha.ready(function () {
grecaptcha.execute('6Leqa5cpAAAAABVhh6FGouusHKaPjYz65-0Yy8kS', { action: 'submit' }).then(async function (token) {
if (cn == true) {
window.location.reload();
}
btn.innerText = "CANCEL";
cn = true;
let div = document.getElementById('imshow');
if (reload == true) {
window.location.reload();
}
isimg = false;
let isc = false;
let id = '';
negative_prompt = nps;
// btn.disabled = true
div.innerHTML = '';
document.getElementById('imshow').innerHTML = '';
let pi = document.createElement('h5');
pi.innerText = 'Generating Image... Estimated Time: 20s';
// document.getElementById('imshow').append(pi)
let count = 0;
seed = seed;
let progress = document.createElement('progress');
progress.value = 1;
progress.max = 100;
div.appendChild(progress);
setInterval(() => {
progress.value += 3;
}, 1100);
async function generate() {
cookie = localStorage.getItem("cookie");
u = localStorage.getItem("u");
sub = localStorage.getItem("sub");
if (cookie == null) {
cookie = '';
}
if (cookie == "undefined") {
cookie = '';
}
params = {
'prompt': inp.value,
'nprompt': np.value,
"steps": Number(step.value),
'guidenceScale': Number(gd.value),
"style": prompt,
"width": Number(widthp),
"height": Number(heightp),
"alchemy": true,
"pr": true,
token: token
};
try {
const response = await fetch('https://fumes-api.onrender.com/leonardo', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Connection': 'keep-alive',
},
body: JSON.stringify(params)
});
if (response.status === 400) {
pi.innerText = 'reCaptcha human validation failed ⭕ user is suspected to be bot ';
}
cn = false
btn.innerText = "CREATE"
const data = await response.json();
localStorage.setItem("cookie", data.token);
localStorage.setItem("sub", data.sub);
localStorage.setItem("u", data.u);
console.log(data.result)
progress.innerHTML = ''
progress.style.display = 'none';
const img = document.createElement('img');
a = "1"
img.id = "hehe"
pi.innerHTML = ''
pi.innerText = ''
img.src = data.img[1];
if(window.innerWidth<600){
img.id = "img1"
}
div.appendChild(img);
console.log(widthp.innerText)
const img2 = document.createElement('img');
img2.src = data.img[2];
div.appendChild(img2);
btn.disabled = false
isimg = true
} catch (error) {
btn.disabled = false;
console.error('An error occurred:', error);
pi.innerText = 'An error occurred, try changing your prompt';
}
}
await Promise.all([generate()]);
});
});
};
</script>
</body>
</html> |