Spaces:
Runtime error
Runtime error
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Stable Diffusion Models Demo</title> | |
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous"> | |
<link href="https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@100&display=swap" rel="stylesheet" <meta | |
charset="UTF-8"> | |
<style> | |
body { | |
background-color: #030303; | |
color: #ffffff; | |
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | |
width: 100%; | |
overflow-x: hidden; | |
} | |
html,body{ | |
overflow-x: hidden; | |
} | |
.form-control, | |
.form-select { | |
background-color: #1a1a1a; | |
color: #ffffff; | |
border: none; | |
border-radius: 0; | |
} | |
.form-control::placeholder { | |
color: #d8d8d8; | |
} | |
.form-control:focus, | |
.form-select:focus { | |
outline: none; | |
border-color: transparent; | |
} | |
.btn-primary { | |
background: linear-gradient(155deg, rgb(0, 149, 249), #9D00FF, rgb(255, 0, 43)); | |
border: none; | |
} | |
.btn-primary:hover { | |
background: linear-gradient(145deg, #00ffab, rgb(255, 0, 43)); | |
} | |
.btn-primary:focus { | |
box-shadow: none; | |
} | |
#prompt{ | |
background-color: #030303; | |
outline: 4px solid #030303; | |
} | |
#negative-prompt{ | |
background-color: #1b1b1b; | |
border: 1px solid #141414; | |
border-radius: 10px; | |
outline: 3px solid #141414; | |
} | |
#modelLabel{ | |
background: linear-gradient(155deg, rgb(0, 249, 228), #d400ff, rgb(255, 0, 212)); | |
} | |
#ratioLabel{ | |
background: linear-gradient(155deg, rgb(0, 199, 249), #9D00FF, rgb(255, 0, 119)); | |
} | |
#styleLabel{ | |
background: linear-gradient(155deg, rgb(0, 249, 249), #a200ff, rgb(255, 0, 191)); | |
} | |
.form-range::-webkit-slider-runnable-track { | |
background-color: #1d1d1d; | |
} | |
.form-range::-moz-range-track { | |
background-color: #1d1d1d; | |
} | |
.form-range::-ms-track { | |
background-color: #1d1d1d; | |
} | |
.form-range::-webkit-slider-thumb { | |
background: linear-gradient(155deg, rgb(0, 249, 228), #d400ff, rgb(255, 0, 34));; | |
} | |
.form-range::-moz-range-thumb { | |
background: gray; | |
} | |
.form-range::-ms-thumb { | |
background: gray; | |
} | |
.input-group-div1{ | |
background-color: #030303; | |
padding: 5px; | |
background: linear-gradient(rgb(0, 0, 0), black) padding-box, | |
linear-gradient(to left, rgb(255, 1, 98), rgb(175, 2, 255)) border-box; | |
border: 1.5px solid transparent; | |
border-radius: 7px; | |
} | |
.input-group-div{ | |
padding: 5px; | |
background: #131313; | |
border-radius: 10px; | |
} | |
.input-group-div1:hover{ | |
background: linear-gradient(rgb(0, 0, 0), black) padding-box, | |
linear-gradient(to left, rgb(204, 1, 255), rgb(255, 2, 44)) border-box; | |
} | |
@keyframes colorChange { | |
0% { | |
color: rgb(7, 205, 240) ; | |
} | |
25% { | |
color: rgb(214, 12, 130); | |
} | |
50% { | |
color: #09cfe9; | |
} | |
75% { | |
color: #e2335f; | |
} | |
100% { | |
color: rgb(240, 4, 102); | |
} | |
} | |
.col-12 p{ | |
animation: colorChange 10s infinite; | |
font-family: 'Barlow Condensed'; | |
font-size: 25px; | |
font-weight: bold; | |
} | |
#imshow { | |
display: flex; | |
flex-wrap: wrap; | |
gap: 10px; | |
justify-content: center; | |
align-items: center; | |
} | |
#loader{ | |
margin: auto; | |
width: fit-content; | |
text-align: center; | |
} | |
#cont4{ | |
max-width: 95vw; | |
} | |
#imshow img{ | |
max-width: 280px; | |
margin: 0; | |
padding: 0; | |
} | |
#lds{ | |
max-width: 350px; | |
} | |
@media screen and (max-width: 600px) { | |
#imshow{ | |
justify-content: center; | |
align-items: center; | |
} | |
#imshow img{ | |
max-width: 320px; | |
} | |
} | |
</style> | |
</head> | |
<body> | |
<a href="https://discord.gg/tRC7hNXfPH" target="_blank" style="margin-left: 10px; font-size: 19px" >Join Discord</a> | |
<a href="https://buymeacoffee.com/Xyplon" target="_blank" style="margin-left: 10px; font-size: 19px">Buy me a coffee ☕ </a> | |
<div class="container mt-4"> | |
<div class="row mt-4"> | |
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12 mb-3"> | |
<div class="input-group-div1"> | |
<input type="text" class="form-control" id="prompt" placeholder="Prompt" autocomplete="off"> | |
</div> | |
</div> | |
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12 mb-3"> | |
<div class="input-group-div"> | |
<input type="text" class="form-control" id="negative-prompt" placeholder="Negative Prompt" autocomplete="off" > | |
</div> | |
</div> | |
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12 mb-3"> | |
<div class="input-group"> | |
<label class="input-group-text me-3" for="model" id="modelLabel" style="background-color: #1d1d1d;color: white;border: none;">Model</label> | |
<select class="form-select" id="model" aria-label="Model Select"> | |
<option value="rvs4" selected>real vision xl 4</option> | |
<option value="mobius">Mobius</option> | |
<option value="sd3">Stable Diffusion 3</option> | |
<option value="sdflash">SDXL Flash</option> | |
</select> | |
</div> | |
</div> | |
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12 mb-3"> | |
<div class="input-group"> | |
<label class="input-group-text me-3" id="ratioLabel" for="ratio" style="background-color: #1d1d1d;color: white;border: none;margin: 0;">Image Ratio</label> | |
<select class="form-select" id="ratio" aria-label="Ratio Select"> | |
<option selected value="1:1">1:1 (Square)</option> | |
<option value="16:9">16:9 (Landscape)</option> | |
<option value="9:16">9:16 (Portrait)</option> | |
<option value="1:2">1:2</option> | |
<option value="4:3">4:3</option> | |
</select> | |
</div> | |
</div> | |
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12 mb-3"> | |
<div class="input-group"> | |
<label class="input-group-text me-3" for="style" style="background-color: #1d1d1d;color: white;border: none;" id="styleLabel">Style:</label> | |
<select class="form-select" id="style" aria-label="Style Select"> | |
<option value="Cinematic" name="style">Cinematic</option> | |
<option value="Photography" name="style">Photography</option> | |
<option value="Anime" name="style">Anime</option> | |
<option value="Film" name="style">Film</option> | |
<option value="Creative" name="style">Creative</option> | |
<option value="Digital" name="style">Digital Art</option> | |
<option value="3d" name="style">3D Model</option> | |
<option value="No" name="style">No Style</option> | |
</select> | |
</div> | |
</div> | |
<div id="ranges" style="display: flex; gap: 15px; flex-wrap: wrap;"> | |
<div class="stepsRange" style="display: flex;gap: 10px;"> | |
<label for="stepsRange" class="form-label" style="background-color: #1d1d1d;color: white;border: none; padding-left: 10px; padding-right: 10px; padding-top: 6px; padding-bottom: 6px;">Steps: <p style="display: inline;" id="stepValue">30</p></label> | |
<input type="range" class="form-range" id="stepsRange" style="width: 200px;padding-top: 12px;" min="4" max="100" value="30"> | |
</div> | |
<div class="guidenceRange" style="display: flex;gap: 10px;"> | |
<label for="stepsRange" class="form-label" style="background-color: #1d1d1d;color: white;border: none; padding-left: 10px; padding-right: 10px; padding-top: 6px; padding-bottom: 6px;">Guidence Scale: <p style="display: inline;" id="guidenceValue">3</p></label> | |
<input type="range" class="form-range" id="guidenceRange" style="width: 200px; padding-top: 12px; " min="2" max="20" value="3"> | |
</div> | |
</div> | |
<div class="col-12 text-center mt-4"> | |
<button type="button" class="btn btn-primary" id="btn">Generate Image ( Ctr + Enter) </button> | |
</div> | |
</div> | |
<div class="container mt-4" id="cont4"> | |
<div id="imshow" > | |
</div> | |
</div> | |
</div> | |
</div> | |
<script> | |
document.getElementById('prompt').addEventListener('mouseover', () => { | |
document.getElementById('prompt').placeholder = 'Enter Your Prompt'; | |
}); | |
document.getElementById('prompt').addEventListener('mouseout', () => { | |
document.getElementById('prompt').placeholder = 'Prompt'; | |
}); | |
document.getElementById('prompt').addEventListener('input', function() { | |
this.style.color = 'white'; | |
}); | |
document.getElementById('negative-prompt').addEventListener('input', function() { | |
this.style.color = 'skyblue'; | |
}); | |
</script> | |
<script src="{{ url_for('static', filename='models.js') }}"></script> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script> | |
</body> | |
</html> |