Upload folder using huggingface_hub
Browse files- index.html +664 -821
index.html
CHANGED
|
@@ -3,886 +3,729 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>
|
| 7 |
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 8 |
<style>
|
| 9 |
* {
|
| 10 |
margin: 0;
|
| 11 |
padding: 0;
|
| 12 |
box-sizing: border-box;
|
| 13 |
}
|
| 14 |
-
|
| 15 |
-
:root {
|
| 16 |
-
--primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 17 |
-
--secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
|
| 18 |
-
--accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
|
| 19 |
-
--dark-bg: #0f0f23;
|
| 20 |
-
--card-bg: rgba(255, 255, 255, 0.05);
|
| 21 |
-
--text-primary: #ffffff;
|
| 22 |
-
--text-secondary: #b8b8d1;
|
| 23 |
-
--border-color: rgba(255, 255, 255, 0.1);
|
| 24 |
-
--success: #00ff88;
|
| 25 |
-
--warning: #ffaa00;
|
| 26 |
-
}
|
| 27 |
-
|
| 28 |
body {
|
| 29 |
-
font-family:
|
| 30 |
-
background:
|
| 31 |
-
color:
|
|
|
|
|
|
|
| 32 |
min-height: 100vh;
|
| 33 |
-
overflow-x: hidden;
|
| 34 |
-
position: relative;
|
| 35 |
-
}
|
| 36 |
-
|
| 37 |
-
body::before {
|
| 38 |
-
content: '';
|
| 39 |
-
position: fixed;
|
| 40 |
-
top: 0;
|
| 41 |
-
left: 0;
|
| 42 |
-
right: 0;
|
| 43 |
-
bottom: 0;
|
| 44 |
-
background:
|
| 45 |
-
radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
|
| 46 |
-
radial-gradient(circle at 80% 80%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
|
| 47 |
-
radial-gradient(circle at 40% 20%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
|
| 48 |
-
z-index: -1;
|
| 49 |
-
animation: floatGradient 20s ease infinite;
|
| 50 |
}
|
| 51 |
-
|
| 52 |
-
@keyframes floatGradient {
|
| 53 |
-
0%, 100% { transform: translate(0, 0) rotate(0deg); }
|
| 54 |
-
33% { transform: translate(-20px, -20px) rotate(120deg); }
|
| 55 |
-
66% { transform: translate(20px, -10px) rotate(240deg); }
|
| 56 |
-
}
|
| 57 |
-
|
| 58 |
-
header {
|
| 59 |
-
padding: 2rem;
|
| 60 |
-
text-align: center;
|
| 61 |
-
border-bottom: 1px solid var(--border-color);
|
| 62 |
-
backdrop-filter: blur(10px);
|
| 63 |
-
background: rgba(15, 15, 35, 0.8);
|
| 64 |
-
position: sticky;
|
| 65 |
-
top: 0;
|
| 66 |
-
z-index: 100;
|
| 67 |
-
}
|
| 68 |
-
|
| 69 |
-
.header-content {
|
| 70 |
max-width: 1200px;
|
| 71 |
margin: 0 auto;
|
| 72 |
}
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
-webkit-background-clip: text;
|
| 78 |
-
-webkit-text-fill-color: transparent;
|
| 79 |
-
margin-bottom: 0.5rem;
|
| 80 |
-
animation: glow 3s ease-in-out infinite;
|
| 81 |
-
}
|
| 82 |
-
|
| 83 |
-
@keyframes glow {
|
| 84 |
-
0%, 100% { filter: brightness(1); }
|
| 85 |
-
50% { filter: brightness(1.2); }
|
| 86 |
-
}
|
| 87 |
-
|
| 88 |
-
.subtitle {
|
| 89 |
-
color: var(--text-secondary);
|
| 90 |
-
font-size: 1.1rem;
|
| 91 |
-
margin-bottom: 1rem;
|
| 92 |
-
}
|
| 93 |
-
|
| 94 |
-
.built-with {
|
| 95 |
-
display: inline-block;
|
| 96 |
-
padding: 0.5rem 1rem;
|
| 97 |
-
background: var(--card-bg);
|
| 98 |
-
border: 1px solid var(--border-color);
|
| 99 |
-
border-radius: 20px;
|
| 100 |
-
text-decoration: none;
|
| 101 |
-
color: var(--text-secondary);
|
| 102 |
-
transition: all 0.3s ease;
|
| 103 |
-
}
|
| 104 |
-
|
| 105 |
-
.built-with:hover {
|
| 106 |
-
background: rgba(255, 255, 255, 0.1);
|
| 107 |
-
color: var(--text-primary);
|
| 108 |
-
transform: translateY(-2px);
|
| 109 |
-
box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
|
| 110 |
-
}
|
| 111 |
-
|
| 112 |
-
main {
|
| 113 |
-
max-width: 1200px;
|
| 114 |
-
margin: 0 auto;
|
| 115 |
-
padding: 3rem 2rem;
|
| 116 |
-
}
|
| 117 |
-
|
| 118 |
-
.controls-section {
|
| 119 |
-
display: grid;
|
| 120 |
-
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
| 121 |
-
gap: 2rem;
|
| 122 |
-
margin-bottom: 3rem;
|
| 123 |
-
}
|
| 124 |
-
|
| 125 |
-
.control-card {
|
| 126 |
-
background: var(--card-bg);
|
| 127 |
-
border: 1px solid var(--border-color);
|
| 128 |
-
border-radius: 20px;
|
| 129 |
-
padding: 1.5rem;
|
| 130 |
-
backdrop-filter: blur(10px);
|
| 131 |
-
transition: all 0.3s ease;
|
| 132 |
-
}
|
| 133 |
-
|
| 134 |
-
.control-card:hover {
|
| 135 |
-
transform: translateY(-5px);
|
| 136 |
-
box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
|
| 137 |
-
border-color: rgba(102, 126, 234, 0.3);
|
| 138 |
-
}
|
| 139 |
-
|
| 140 |
-
.control-card h3 {
|
| 141 |
-
margin-bottom: 1rem;
|
| 142 |
-
display: flex;
|
| 143 |
-
align-items: center;
|
| 144 |
-
gap: 0.5rem;
|
| 145 |
-
font-size: 1.2rem;
|
| 146 |
-
}
|
| 147 |
-
|
| 148 |
-
.control-card i {
|
| 149 |
-
background: var(--primary-gradient);
|
| 150 |
-
-webkit-background-clip: text;
|
| 151 |
-
-webkit-text-fill-color: transparent;
|
| 152 |
-
}
|
| 153 |
-
|
| 154 |
-
.tag-group {
|
| 155 |
-
display: flex;
|
| 156 |
-
flex-wrap: wrap;
|
| 157 |
-
gap: 0.5rem;
|
| 158 |
-
margin-top: 0.5rem;
|
| 159 |
-
}
|
| 160 |
-
|
| 161 |
-
.tag {
|
| 162 |
-
padding: 0.3rem 0.8rem;
|
| 163 |
-
background: rgba(102, 126, 234, 0.2);
|
| 164 |
-
border: 1px solid rgba(102, 126, 234, 0.3);
|
| 165 |
-
border-radius: 15px;
|
| 166 |
-
font-size: 0.85rem;
|
| 167 |
-
cursor: pointer;
|
| 168 |
-
transition: all 0.3s ease;
|
| 169 |
-
}
|
| 170 |
-
|
| 171 |
-
.tag:hover {
|
| 172 |
-
background: rgba(102, 126, 234, 0.3);
|
| 173 |
-
transform: scale(1.05);
|
| 174 |
-
}
|
| 175 |
-
|
| 176 |
-
.tag.active {
|
| 177 |
-
background: var(--primary-gradient);
|
| 178 |
-
border-color: transparent;
|
| 179 |
-
}
|
| 180 |
-
|
| 181 |
-
.prompt-display {
|
| 182 |
-
background: var(--card-bg);
|
| 183 |
-
border: 1px solid var(--border-color);
|
| 184 |
-
border-radius: 20px;
|
| 185 |
-
padding: 2rem;
|
| 186 |
-
margin-bottom: 2rem;
|
| 187 |
-
backdrop-filter: blur(10px);
|
| 188 |
-
min-height: 200px;
|
| 189 |
-
position: relative;
|
| 190 |
-
overflow: hidden;
|
| 191 |
-
}
|
| 192 |
-
|
| 193 |
-
.prompt-display::before {
|
| 194 |
-
content: '';
|
| 195 |
-
position: absolute;
|
| 196 |
-
top: -2px;
|
| 197 |
-
left: -2px;
|
| 198 |
-
right: -2px;
|
| 199 |
-
bottom: -2px;
|
| 200 |
-
background: var(--primary-gradient);
|
| 201 |
-
border-radius: 20px;
|
| 202 |
-
opacity: 0;
|
| 203 |
-
transition: opacity 0.3s ease;
|
| 204 |
-
z-index: -1;
|
| 205 |
-
}
|
| 206 |
-
|
| 207 |
-
.prompt-display.enhanced::before {
|
| 208 |
-
opacity: 0.3;
|
| 209 |
-
}
|
| 210 |
-
|
| 211 |
-
.prompt-text {
|
| 212 |
-
font-size: 1.2rem;
|
| 213 |
-
line-height: 1.6;
|
| 214 |
-
margin-bottom: 1rem;
|
| 215 |
-
animation: fadeIn 0.5s ease;
|
| 216 |
-
}
|
| 217 |
-
|
| 218 |
-
@keyframes fadeIn {
|
| 219 |
-
from { opacity: 0; transform: translateY(10px); }
|
| 220 |
-
to { opacity: 1; transform: translateY(0); }
|
| 221 |
}
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
}
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
border: 1px solid rgba(79, 172, 254, 0.3);
|
| 234 |
-
border-radius: 10px;
|
| 235 |
-
font-size: 0.75rem;
|
| 236 |
-
color: #4facfe;
|
| 237 |
}
|
| 238 |
-
|
| 239 |
-
.action-buttons {
|
| 240 |
display: flex;
|
| 241 |
-
gap:
|
|
|
|
| 242 |
justify-content: center;
|
| 243 |
-
flex-wrap: wrap;
|
| 244 |
}
|
| 245 |
-
|
| 246 |
.btn {
|
| 247 |
-
padding:
|
| 248 |
border: none;
|
| 249 |
-
border-radius:
|
| 250 |
-
font-size:
|
| 251 |
-
font-weight:
|
| 252 |
cursor: pointer;
|
| 253 |
-
transition: all 0.
|
| 254 |
-
|
| 255 |
-
align-items: center;
|
| 256 |
-
gap: 0.5rem;
|
| 257 |
-
position: relative;
|
| 258 |
-
overflow: hidden;
|
| 259 |
}
|
| 260 |
-
|
| 261 |
-
.btn::before {
|
| 262 |
-
content: '';
|
| 263 |
-
position: absolute;
|
| 264 |
-
top: 50%;
|
| 265 |
-
left: 50%;
|
| 266 |
-
width: 0;
|
| 267 |
-
height: 0;
|
| 268 |
-
border-radius: 50%;
|
| 269 |
-
background: rgba(255, 255, 255, 0.3);
|
| 270 |
-
transform: translate(-50%, -50%);
|
| 271 |
-
transition: width 0.6s, height 0.6s;
|
| 272 |
-
}
|
| 273 |
-
|
| 274 |
-
.btn:active::before {
|
| 275 |
-
width: 300px;
|
| 276 |
-
height: 300px;
|
| 277 |
-
}
|
| 278 |
-
|
| 279 |
.btn-primary {
|
| 280 |
-
background:
|
| 281 |
-
color:
|
| 282 |
-
box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
|
| 283 |
}
|
| 284 |
-
|
| 285 |
.btn-primary:hover {
|
| 286 |
-
|
| 287 |
-
|
| 288 |
}
|
| 289 |
-
|
| 290 |
.btn-secondary {
|
| 291 |
-
background:
|
| 292 |
-
color:
|
| 293 |
-
border:
|
| 294 |
}
|
| 295 |
-
|
| 296 |
.btn-secondary:hover {
|
| 297 |
-
background:
|
| 298 |
-
|
| 299 |
-
|
| 300 |
-
|
| 301 |
-
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
|
| 315 |
-
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
| 316 |
-
gap: 1rem;
|
| 317 |
-
}
|
| 318 |
-
|
| 319 |
-
.history-item {
|
| 320 |
-
background: var(--card-bg);
|
| 321 |
-
border: 1px solid var(--border-color);
|
| 322 |
-
border-radius: 15px;
|
| 323 |
-
padding: 1rem;
|
| 324 |
-
cursor: pointer;
|
| 325 |
-
transition: all 0.3s ease;
|
| 326 |
-
position: relative;
|
| 327 |
-
overflow: hidden;
|
| 328 |
-
}
|
| 329 |
-
|
| 330 |
-
.history-item:hover {
|
| 331 |
-
transform: scale(1.02);
|
| 332 |
-
border-color: rgba(102, 126, 234, 0.3);
|
| 333 |
-
box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
|
| 334 |
-
}
|
| 335 |
-
|
| 336 |
-
.history-item-text {
|
| 337 |
-
font-size: 0.9rem;
|
| 338 |
-
color: var(--text-secondary);
|
| 339 |
-
margin-bottom: 0.5rem;
|
| 340 |
-
display: -webkit-box;
|
| 341 |
-
-webkit-line-clamp: 2;
|
| 342 |
-
-webkit-box-orient: vertical;
|
| 343 |
-
overflow: hidden;
|
| 344 |
-
}
|
| 345 |
-
|
| 346 |
-
.history-item-time {
|
| 347 |
-
font-size: 0.75rem;
|
| 348 |
-
color: var(--text-secondary);
|
| 349 |
-
opacity: 0.6;
|
| 350 |
-
}
|
| 351 |
-
|
| 352 |
-
.toast {
|
| 353 |
-
position: fixed;
|
| 354 |
-
bottom: 2rem;
|
| 355 |
-
right: 2rem;
|
| 356 |
-
padding: 1rem 1.5rem;
|
| 357 |
-
background: var(--card-bg);
|
| 358 |
-
border: 1px solid var(--border-color);
|
| 359 |
-
border-radius: 15px;
|
| 360 |
-
backdrop-filter: blur(10px);
|
| 361 |
-
display: flex;
|
| 362 |
-
align-items: center;
|
| 363 |
-
gap: 0.5rem;
|
| 364 |
-
transform: translateX(400px);
|
| 365 |
-
transition: transform 0.3s ease;
|
| 366 |
-
z-index: 1000;
|
| 367 |
}
|
| 368 |
-
|
| 369 |
-
|
| 370 |
-
transform: translateX(0);
|
| 371 |
}
|
| 372 |
-
|
| 373 |
-
|
| 374 |
-
border-color: var(--success);
|
| 375 |
-
background: rgba(0, 255, 136, 0.1);
|
| 376 |
}
|
| 377 |
-
|
| 378 |
-
|
| 379 |
-
background: var(--card-bg);
|
| 380 |
-
border: 1px solid var(--border-color);
|
| 381 |
-
border-radius: 15px;
|
| 382 |
-
padding: 1.5rem;
|
| 383 |
-
margin-top: 2rem;
|
| 384 |
}
|
| 385 |
-
|
| 386 |
-
|
| 387 |
-
display: flex;
|
| 388 |
-
align-items: center;
|
| 389 |
-
gap: 0.5rem;
|
| 390 |
-
margin-bottom: 1rem;
|
| 391 |
-
font-size: 1.1rem;
|
| 392 |
}
|
| 393 |
-
|
| 394 |
-
|
| 395 |
-
list-style: none;
|
| 396 |
}
|
| 397 |
-
|
| 398 |
-
|
| 399 |
-
padding: 0.5rem 0;
|
| 400 |
-
color: var(--text-secondary);
|
| 401 |
-
display: flex;
|
| 402 |
-
align-items: center;
|
| 403 |
-
gap: 0.5rem;
|
| 404 |
}
|
| 405 |
-
|
| 406 |
-
.tips-list li::before {
|
| 407 |
-
content: '✨';
|
| 408 |
-
}
|
| 409 |
-
|
| 410 |
@media (max-width: 768px) {
|
| 411 |
-
h1 {
|
| 412 |
-
font-size:
|
| 413 |
}
|
| 414 |
-
|
| 415 |
-
|
| 416 |
-
grid-template-columns: 1fr;
|
| 417 |
}
|
| 418 |
-
|
| 419 |
-
|
| 420 |
-
grid-template-columns: 1fr;
|
| 421 |
}
|
| 422 |
-
|
| 423 |
-
.btn {
|
| 424 |
-
padding: 0.8rem 1.5rem;
|
| 425 |
-
font-size: 0.9rem;
|
| 426 |
-
}
|
| 427 |
-
}
|
| 428 |
-
|
| 429 |
-
.slider-container {
|
| 430 |
-
margin-top: 1rem;
|
| 431 |
-
}
|
| 432 |
-
|
| 433 |
-
.slider-label {
|
| 434 |
-
display: flex;
|
| 435 |
-
justify-content: space-between;
|
| 436 |
-
margin-bottom: 0.5rem;
|
| 437 |
-
font-size: 0.9rem;
|
| 438 |
-
color: var(--text-secondary);
|
| 439 |
-
}
|
| 440 |
-
|
| 441 |
-
.slider {
|
| 442 |
-
width: 100%;
|
| 443 |
-
height: 6px;
|
| 444 |
-
border-radius: 3px;
|
| 445 |
-
background: rgba(255, 255, 255, 0.1);
|
| 446 |
-
outline: none;
|
| 447 |
-
-webkit-appearance: none;
|
| 448 |
-
}
|
| 449 |
-
|
| 450 |
-
.slider::-webkit-slider-thumb {
|
| 451 |
-
-webkit-appearance: none;
|
| 452 |
-
appearance: none;
|
| 453 |
-
width: 20px;
|
| 454 |
-
height: 20px;
|
| 455 |
-
border-radius: 50%;
|
| 456 |
-
background: var(--primary-gradient);
|
| 457 |
-
cursor: pointer;
|
| 458 |
-
transition: all 0.3s ease;
|
| 459 |
-
}
|
| 460 |
-
|
| 461 |
-
.slider::-webkit-slider-thumb:hover {
|
| 462 |
-
transform: scale(1.2);
|
| 463 |
-
box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
|
| 464 |
-
}
|
| 465 |
-
|
| 466 |
-
.slider::-moz-range-thumb {
|
| 467 |
-
width: 20px;
|
| 468 |
-
height: 20px;
|
| 469 |
-
border-radius: 50%;
|
| 470 |
-
background: var(--primary-gradient);
|
| 471 |
-
cursor: pointer;
|
| 472 |
-
transition: all 0.3s ease;
|
| 473 |
}
|
| 474 |
</style>
|
| 475 |
</head>
|
| 476 |
<body>
|
| 477 |
-
<
|
| 478 |
-
<div class="header
|
| 479 |
-
<h1>
|
| 480 |
-
<p
|
| 481 |
-
|
| 482 |
-
|
| 483 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 484 |
</div>
|
| 485 |
-
</header>
|
| 486 |
-
|
| 487 |
-
<main>
|
| 488 |
-
<section class="controls-section">
|
| 489 |
-
<div class="control-card">
|
| 490 |
-
<h3><i class="fas fa-palette"></i> Art Style</h3>
|
| 491 |
-
<div class="tag-group" id="styleTags">
|
| 492 |
-
<span class="tag" data-type="style" data-value="photorealistic">Photorealistic</span>
|
| 493 |
-
<span class="tag" data-type="style" data-value="digital painting">Digital Painting</span>
|
| 494 |
-
<span class="tag" data-type="style" data-value="anime style">Anime Style</span>
|
| 495 |
-
<span class="tag" data-type="style" data-value="oil painting">Oil Painting</span>
|
| 496 |
-
<span class="tag" data-type="style" data-value="watercolor">Watercolor</span>
|
| 497 |
-
<span class="tag" data-type="style" data-value="3D render">3D Render</span>
|
| 498 |
-
<span class="tag" data-type="style" data-value="sketch">Sketch</span>
|
| 499 |
-
<span class="tag" data-type="style" data-value="abstract">Abstract</span>
|
| 500 |
-
</div>
|
| 501 |
-
</div>
|
| 502 |
-
|
| 503 |
-
<div class="control-card">
|
| 504 |
-
<h3><i class="fas fa-magic"></i> Enhancement Words</h3>
|
| 505 |
-
<div class="tag-group" id="enhancementTags">
|
| 506 |
-
<span class="tag" data-type="enhancement" data-value="hyperdetailed">Hyperdetailed</span>
|
| 507 |
-
<span class="tag" data-type="enhancement" data-value="cinematic lighting">Cinematic</span>
|
| 508 |
-
<span class="tag" data-type="enhancement" data-value="vibrant colors">Vibrant</span>
|
| 509 |
-
<span class="tag" data-type="enhancement" data-value="dramatic">Dramatic</span>
|
| 510 |
-
<span class="tag" data-type="enhancement" data-value="ethereal">Ethereal</span>
|
| 511 |
-
<span class="tag" data-type="enhancement" data-value="surreal">Surreal</span>
|
| 512 |
-
<span class="tag" data-type="enhancement" data-value="majestic">Majestic</span>
|
| 513 |
-
<span class="tag" data-type="enhancement" data-value="intricate">Intricate</span>
|
| 514 |
-
</div>
|
| 515 |
-
</div>
|
| 516 |
-
|
| 517 |
-
<div class="control-card">
|
| 518 |
-
<h3><i class="fas fa-camera"></i> Camera & Composition</h3>
|
| 519 |
-
<div class="tag-group" id="cameraTags">
|
| 520 |
-
<span class="tag" data-type="camera" data-value="wide angle">Wide Angle</span>
|
| 521 |
-
<span class="tag" data-type="camera" data-value="macro shot">Macro</span>
|
| 522 |
-
<span class="tag" data-type="camera" data-value="bird's eye view">Bird's Eye</span>
|
| 523 |
-
<span class="tag" data-type="camera" data-value="close up">Close Up</span>
|
| 524 |
-
<span class="tag" data-type="camera" data-value="panoramic">Panoramic</span>
|
| 525 |
-
<span class="tag" data-type="camera" data-value="portrait">Portrait</span>
|
| 526 |
-
<span class="tag" data-type="camera" data-value="action shot">Action Shot</span>
|
| 527 |
-
<span class="tag" data-type="camera" data-value="depth of field">Depth of Field</span>
|
| 528 |
-
</div>
|
| 529 |
-
</div>
|
| 530 |
-
|
| 531 |
-
<div class="control-card">
|
| 532 |
-
<h3><i class="fas fa-adjust"></i> Quality Settings</h3>
|
| 533 |
-
<div class="slider-container">
|
| 534 |
-
<div class="slider-label">
|
| 535 |
-
<span>Detail Level</span>
|
| 536 |
-
<span id="detailValue">50</span>
|
| 537 |
-
</div>
|
| 538 |
-
<input type="range" class="slider" id="detailSlider" min="0" max="100" value="50">
|
| 539 |
-
</div>
|
| 540 |
-
<div class="slider-container">
|
| 541 |
-
<div class="slider-label">
|
| 542 |
-
<span>Creativity</span>
|
| 543 |
-
<span id="creativityValue">50</span>
|
| 544 |
-
</div>
|
| 545 |
-
<input type="range" class="slider" id="creativitySlider" min="0" max="100" value="50">
|
| 546 |
-
</div>
|
| 547 |
-
</div>
|
| 548 |
-
</section>
|
| 549 |
-
|
| 550 |
-
<section class="prompt-display" id="promptDisplay">
|
| 551 |
-
<div class="prompt-text" id="promptText">
|
| 552 |
-
Click "Generate Prompt" to create a unique AI image prompt with artistic enhancements and professional composition techniques.
|
| 553 |
-
</div>
|
| 554 |
-
<div class="prompt-tags" id="promptTags"></div>
|
| 555 |
-
</section>
|
| 556 |
-
|
| 557 |
-
<section class="action-buttons">
|
| 558 |
-
<button class="btn btn-primary" id="generateBtn">
|
| 559 |
-
<i class="fas fa-sparkles"></i> Generate Prompt
|
| 560 |
-
</button>
|
| 561 |
-
<button class="btn btn-secondary" id="randomizeBtn">
|
| 562 |
-
<i class="fas fa-dice"></i> Randomize All
|
| 563 |
-
</button>
|
| 564 |
-
<button class="btn btn-secondary" id="copyBtn">
|
| 565 |
-
<i class="fas fa-copy"></i> Copy Prompt
|
| 566 |
-
</button>
|
| 567 |
-
<button class="btn btn-secondary" id="enhanceBtn">
|
| 568 |
-
<i class="fas fa-wand-magic-sparkles"></i> Enhance
|
| 569 |
-
</button>
|
| 570 |
-
</section>
|
| 571 |
-
|
| 572 |
-
<section class="enhancement-tips">
|
| 573 |
-
<div class="tips-header">
|
| 574 |
-
<i class="fas fa-lightbulb"></i>
|
| 575 |
-
<span>Pro Tips for Better Prompts</span>
|
| 576 |
-
</div>
|
| 577 |
-
<ul class="tips-list">
|
| 578 |
-
<li>Combine multiple styles for unique results (e.g., "photorealistic with anime elements")</li>
|
| 579 |
-
<li>Use specific lighting descriptions like "golden hour" or "neon glow"</li>
|
| 580 |
-
<li>Include emotional words like "nostalgic", "mysterious", or "serene"</li>
|
| 581 |
-
<li>Add technical details like "8K resolution", "Unreal Engine 5", or "Octane render"</li>
|
| 582 |
-
<li>Experiment with negative prompts to refine your results</li>
|
| 583 |
-
</ul>
|
| 584 |
-
</section>
|
| 585 |
-
|
| 586 |
-
<section class="history-section">
|
| 587 |
-
<div class="history-header">
|
| 588 |
-
<h2><i class="fas fa-history"></i> Recent Prompts</h2>
|
| 589 |
-
<button class="btn btn-secondary" id="clearHistoryBtn">
|
| 590 |
-
<i class="fas fa-trash"></i> Clear
|
| 591 |
-
</button>
|
| 592 |
-
</div>
|
| 593 |
-
<div class="history-grid" id="historyGrid">
|
| 594 |
-
<!-- History items will be added here -->
|
| 595 |
-
</div>
|
| 596 |
-
</section>
|
| 597 |
-
</main>
|
| 598 |
-
|
| 599 |
-
<div class="toast" id="toast">
|
| 600 |
-
<i class="fas fa-check-circle"></i>
|
| 601 |
-
<span id="toastMessage">Prompt copied to clipboard!</span>
|
| 602 |
</div>
|
| 603 |
|
| 604 |
<script>
|
| 605 |
-
|
| 606 |
-
|
| 607 |
-
|
| 608 |
-
|
| 609 |
-
|
| 610 |
-
|
| 611 |
-
|
| 612 |
-
'a serene Japanese garden in spring',
|
| 613 |
-
'a cosmic nebula with stars',
|
| 614 |
-
'a steampunk airship in clouds',
|
| 615 |
-
'an underwater coral kingdom',
|
| 616 |
-
'a medieval castle on a mountain',
|
| 617 |
-
'a cyberpunk street in rain',
|
| 618 |
-
'a magical library with floating books',
|
| 619 |
-
'a desert oasis with palm trees',
|
| 620 |
-
'a Viking longship in stormy seas',
|
| 621 |
-
'a space station orbiting Earth',
|
| 622 |
-
'a enchanted cottage with fairy lights',
|
| 623 |
-
'a tropical paradise waterfall'
|
| 624 |
-
];
|
| 625 |
-
|
| 626 |
-
this.atmospheres = [
|
| 627 |
-
'dreamlike atmosphere',
|
| 628 |
-
'mysterious ambiance',
|
| 629 |
-
'peaceful and serene',
|
| 630 |
-
'dramatic and intense',
|
| 631 |
-
'whimsical and playful',
|
| 632 |
-
'dark and moody',
|
| 633 |
-
'bright and cheerful',
|
| 634 |
-
'elegant and sophisticated',
|
| 635 |
-
'rustic and natural',
|
| 636 |
-
'futuristic and sleek'
|
| 637 |
-
];
|
| 638 |
-
|
| 639 |
-
this.technicalTerms = [
|
| 640 |
-
'8K resolution',
|
| 641 |
-
'Unreal Engine 5',
|
| 642 |
-
'Octane render',
|
| 643 |
-
'V-Ray',
|
| 644 |
-
'photorealistic details',
|
| 645 |
-
'sharp focus',
|
| 646 |
-
'depth of field',
|
| 647 |
-
'bokeh effect',
|
| 648 |
-
'global illumination',
|
| 649 |
-
'ambient occlusion'
|
| 650 |
-
];
|
| 651 |
-
|
| 652 |
-
this.selectedStyles = new Set();
|
| 653 |
-
this.selectedEnhancements = new Set();
|
| 654 |
-
this.selectedCamera = new Set();
|
| 655 |
-
this.detailLevel = 50;
|
| 656 |
-
this.creativity = 50;
|
| 657 |
-
this.history = [];
|
| 658 |
-
}
|
| 659 |
-
|
| 660 |
-
generatePrompt() {
|
| 661 |
-
const subject = this.getRandomElement(this.subjects);
|
| 662 |
-
const atmosphere = this.getRandomElement(this.atmospheres);
|
| 663 |
-
const technical = this.getRandomElement(this.technicalTerms);
|
| 664 |
-
|
| 665 |
-
let prompt = subject + ', ' + atmosphere;
|
| 666 |
-
|
| 667 |
-
// Add selected styles
|
| 668 |
-
if (this.selectedStyles.size > 0) {
|
| 669 |
-
prompt += ', ' + Array.from(this.selectedStyles).join(', ');
|
| 670 |
-
}
|
| 671 |
-
|
| 672 |
-
// Add selected enhancements
|
| 673 |
-
if (this.selectedEnhancements.size > 0) {
|
| 674 |
-
prompt += ', ' + Array.from(this.selectedEnhancements).join(', ');
|
| 675 |
-
}
|
| 676 |
-
|
| 677 |
-
// Add camera/composition
|
| 678 |
-
if (this.selectedCamera.size > 0) {
|
| 679 |
-
prompt += ', ' + Array.from(this.selectedCamera).join(' ');
|
| 680 |
-
}
|
| 681 |
-
|
| 682 |
-
// Add technical terms based on detail level
|
| 683 |
-
if (this.detailLevel > 70) {
|
| 684 |
-
prompt += ', ' + technical;
|
| 685 |
-
}
|
| 686 |
-
if (this.detailLevel > 85) {
|
| 687 |
-
prompt += ', masterpiece, best quality';
|
| 688 |
-
}
|
| 689 |
-
|
| 690 |
-
// Add creativity boosters
|
| 691 |
-
if (this.creativity > 70) {
|
| 692 |
-
prompt += ', surreal, imaginative, unique perspective';
|
| 693 |
-
}
|
| 694 |
-
|
| 695 |
-
return prompt;
|
| 696 |
-
}
|
| 697 |
-
|
| 698 |
-
getRandomElement(array) {
|
| 699 |
-
return array[Math.floor(Math.random() * array.length)];
|
| 700 |
-
}
|
| 701 |
-
|
| 702 |
-
enhancePrompt(prompt) {
|
| 703 |
-
const enhancements = [
|
| 704 |
-
'masterpiece, best quality, highly detailed',
|
| 705 |
-
'ultra realistic, 8K, sharp focus',
|
| 706 |
-
'cinematic lighting, dramatic shadows',
|
| 707 |
-
'vibrant colors, rich textures',
|
| 708 |
-
'award-winning photography',
|
| 709 |
-
'professional composition'
|
| 710 |
-
];
|
| 711 |
-
|
| 712 |
-
const randomEnhancement = this.getRandomElement(enhancements);
|
| 713 |
-
return prompt + ', ' + randomEnhancement;
|
| 714 |
-
}
|
| 715 |
-
|
| 716 |
-
addToHistory(prompt) {
|
| 717 |
-
const historyItem = {
|
| 718 |
-
text: prompt,
|
| 719 |
-
timestamp: new Date().toLocaleTimeString()
|
| 720 |
-
};
|
| 721 |
-
this.history.unshift(historyItem);
|
| 722 |
-
if (this.history.length > 6) {
|
| 723 |
-
this.history.pop();
|
| 724 |
-
}
|
| 725 |
-
this.updateHistoryDisplay();
|
| 726 |
-
}
|
| 727 |
-
|
| 728 |
-
updateHistoryDisplay() {
|
| 729 |
-
const historyGrid = document.getElementById('historyGrid');
|
| 730 |
-
historyGrid.innerHTML = '';
|
| 731 |
-
|
| 732 |
-
this.history.forEach(item => {
|
| 733 |
-
const historyDiv = document.createElement('div');
|
| 734 |
-
historyDiv.className = 'history-item';
|
| 735 |
-
historyDiv.innerHTML = `
|
| 736 |
-
<div class="history-item-text">${item.text}</div>
|
| 737 |
-
<div class="history-item-time">${item.timestamp}</div>
|
| 738 |
-
`;
|
| 739 |
-
historyDiv.addEventListener('click', () => {
|
| 740 |
-
document.getElementById('promptText').textContent = item.text;
|
| 741 |
-
this.showToast('History prompt loaded!');
|
| 742 |
-
});
|
| 743 |
-
historyGrid.appendChild(historyDiv);
|
| 744 |
-
});
|
| 745 |
-
}
|
| 746 |
-
|
| 747 |
-
showToast(message, type = 'success') {
|
| 748 |
-
const toast = document.getElementById('toast');
|
| 749 |
-
const toastMessage = document.getElementById('toastMessage');
|
| 750 |
-
toastMessage.textContent = message;
|
| 751 |
-
toast.className = `toast ${type} show`;
|
| 752 |
setTimeout(() => {
|
| 753 |
-
|
| 754 |
-
|
| 755 |
-
|
| 756 |
-
|
| 757 |
-
|
| 758 |
-
// Initialize
|
| 759 |
-
const generator = new PromptGenerator();
|
| 760 |
-
|
| 761 |
-
// Event Listeners
|
| 762 |
-
document.getElementById('generateBtn').addEventListener('click', () => {
|
| 763 |
-
const prompt = generator.generatePrompt();
|
| 764 |
-
const promptText = document.getElementById('promptText');
|
| 765 |
-
promptText.style.animation = 'none';
|
| 766 |
-
setTimeout(() => {
|
| 767 |
-
promptText.textContent = prompt;
|
| 768 |
-
promptText.style.animation = 'fadeIn 0.5s ease';
|
| 769 |
-
}, 10);
|
| 770 |
-
|
| 771 |
-
generator.addToHistory(prompt);
|
| 772 |
-
updatePromptTags();
|
| 773 |
-
generator.showToast('New prompt generated!');
|
| 774 |
-
});
|
| 775 |
-
|
| 776 |
-
document.getElementById('randomizeBtn').addEventListener('click', () => {
|
| 777 |
-
// Randomize all tags
|
| 778 |
-
document.querySelectorAll('.tag').forEach(tag => {
|
| 779 |
-
if (Math.random() > 0.5) {
|
| 780 |
-
tag.classList.add('active');
|
| 781 |
-
} else {
|
| 782 |
-
tag.classList.remove('active');
|
| 783 |
-
}
|
| 784 |
});
|
|
|
|
| 785 |
|
| 786 |
-
|
| 787 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 788 |
|
| 789 |
-
|
| 790 |
-
const
|
| 791 |
-
|
| 792 |
-
|
| 793 |
-
document.getElementById('creativitySlider').value = randomCreativity;
|
| 794 |
-
document.getElementById('detailValue').textContent = randomDetail;
|
| 795 |
-
document.getElementById('creativityValue').textContent = randomCreativity;
|
| 796 |
-
generator.detailLevel = randomDetail;
|
| 797 |
-
generator.creativity = randomCreativity;
|
| 798 |
-
|
| 799 |
-
// Generate new prompt
|
| 800 |
-
document.getElementById('generateBtn').click();
|
| 801 |
-
});
|
| 802 |
-
|
| 803 |
-
document.getElementById('copyBtn').addEventListener('click', () => {
|
| 804 |
-
const promptText = document.getElementById('promptText').textContent;
|
| 805 |
-
navigator.clipboard.writeText(promptText).then(() => {
|
| 806 |
-
generator.showToast('Prompt copied to clipboard!');
|
| 807 |
-
});
|
| 808 |
-
});
|
| 809 |
-
|
| 810 |
-
document.getElementById('enhanceBtn').addEventListener('click', () => {
|
| 811 |
-
const currentPrompt = document.getElementById('promptText').textContent;
|
| 812 |
-
const enhanced = generator.enhancePrompt(currentPrompt);
|
| 813 |
-
const promptText = document.getElementById('promptText');
|
| 814 |
-
promptText.textContent = enhanced;
|
| 815 |
-
document.getElementById('promptDisplay').classList.add('enhanced');
|
| 816 |
setTimeout(() => {
|
| 817 |
-
|
| 818 |
-
|
| 819 |
-
|
| 820 |
-
});
|
| 821 |
-
|
| 822 |
-
document.getElementById('clearHistoryBtn').addEventListener('click', () => {
|
| 823 |
-
generator.history = [];
|
| 824 |
-
generator.updateHistoryDisplay();
|
| 825 |
-
generator.showToast('History cleared!');
|
| 826 |
-
});
|
| 827 |
-
|
| 828 |
-
// Tag selection
|
| 829 |
-
document.querySelectorAll('.tag').forEach(tag => {
|
| 830 |
-
tag.addEventListener('click', function() {
|
| 831 |
-
this.classList.toggle('active');
|
| 832 |
-
updateSelections();
|
| 833 |
-
});
|
| 834 |
-
});
|
| 835 |
-
|
| 836 |
-
function updateSelections() {
|
| 837 |
-
generator.selectedStyles.clear();
|
| 838 |
-
generator.selectedEnhancements.clear();
|
| 839 |
-
generator.selectedCamera.clear();
|
| 840 |
-
|
| 841 |
-
document.querySelectorAll('.tag.active').forEach(tag => {
|
| 842 |
-
const type = tag.dataset.type;
|
| 843 |
-
const value = tag.dataset.value;
|
| 844 |
-
|
| 845 |
-
if (type === 'style') generator.selectedStyles.add(value);
|
| 846 |
-
else if (type === 'enhancement') generator.selectedEnhancements.add(value);
|
| 847 |
-
else if (type === 'camera') generator.selectedCamera.add(value);
|
| 848 |
-
});
|
| 849 |
}
|
| 850 |
|
| 851 |
-
|
| 852 |
-
|
| 853 |
-
|
|
|
|
| 854 |
|
| 855 |
-
|
| 856 |
-
|
| 857 |
-
|
| 858 |
-
|
| 859 |
-
|
|
|
|
| 860 |
|
| 861 |
-
|
| 862 |
-
const tagSpan = document.createElement('span');
|
| 863 |
-
tagSpan.className = 'prompt-tag';
|
| 864 |
-
tagSpan.textContent = tag;
|
| 865 |
-
promptTags.appendChild(tagSpan);
|
| 866 |
-
});
|
| 867 |
}
|
| 868 |
|
| 869 |
-
//
|
| 870 |
-
|
| 871 |
-
generator.detailLevel = this.value;
|
| 872 |
-
document.getElementById('detailValue').textContent = this.value;
|
| 873 |
-
});
|
| 874 |
-
|
| 875 |
-
document.getElementById('creativitySlider').addEventListener('input', function() {
|
| 876 |
-
generator.creativity = this.value;
|
| 877 |
-
document.getElementById('creativityValue').textContent = this.value;
|
| 878 |
-
});
|
| 879 |
-
|
| 880 |
-
// Initialize with a random prompt on load
|
| 881 |
-
window.addEventListener('load', () => {
|
| 882 |
-
setTimeout(() => {
|
| 883 |
-
document.getElementById('generateBtn').click();
|
| 884 |
-
}, 500);
|
| 885 |
-
});
|
| 886 |
</script>
|
| 887 |
</body>
|
| 888 |
</html>
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>ComfyUI Workflow</title>
|
|
|
|
| 7 |
<style>
|
| 8 |
* {
|
| 9 |
margin: 0;
|
| 10 |
padding: 0;
|
| 11 |
box-sizing: border-box;
|
| 12 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
body {
|
| 14 |
+
font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
|
| 15 |
+
background-color: #000000;
|
| 16 |
+
color: #f5f5f7;
|
| 17 |
+
line-height: 1.6;
|
| 18 |
+
padding: 20px;
|
| 19 |
min-height: 100vh;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
}
|
| 21 |
+
.container {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
max-width: 1200px;
|
| 23 |
margin: 0 auto;
|
| 24 |
}
|
| 25 |
+
.header {
|
| 26 |
+
text-align: center;
|
| 27 |
+
margin-bottom: 40px;
|
| 28 |
+
padding: 40px 20px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
}
|
| 30 |
+
.header h1 {
|
| 31 |
+
font-size: 48px;
|
| 32 |
+
font-weight: 600;
|
| 33 |
+
color: #ffffff;
|
| 34 |
+
margin-bottom: 12px;
|
| 35 |
+
letter-spacing: -0.02em;
|
| 36 |
}
|
| 37 |
+
.header p {
|
| 38 |
+
font-size: 18px;
|
| 39 |
+
color: #86868b;
|
| 40 |
+
font-weight: 400;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
}
|
| 42 |
+
.controls {
|
|
|
|
| 43 |
display: flex;
|
| 44 |
+
gap: 12px;
|
| 45 |
+
margin-bottom: 24px;
|
| 46 |
justify-content: center;
|
|
|
|
| 47 |
}
|
|
|
|
| 48 |
.btn {
|
| 49 |
+
padding: 12px 24px;
|
| 50 |
border: none;
|
| 51 |
+
border-radius: 24px;
|
| 52 |
+
font-size: 14px;
|
| 53 |
+
font-weight: 500;
|
| 54 |
cursor: pointer;
|
| 55 |
+
transition: all 0.2s;
|
| 56 |
+
font-family: inherit;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
.btn-primary {
|
| 59 |
+
background: #ffffff;
|
| 60 |
+
color: #000000;
|
|
|
|
| 61 |
}
|
|
|
|
| 62 |
.btn-primary:hover {
|
| 63 |
+
background: #f5f5f7;
|
| 64 |
+
transform: scale(0.98);
|
| 65 |
}
|
|
|
|
| 66 |
.btn-secondary {
|
| 67 |
+
background: #1d1d1f;
|
| 68 |
+
color: #f5f5f7;
|
| 69 |
+
border: 1px solid #424245;
|
| 70 |
}
|
|
|
|
| 71 |
.btn-secondary:hover {
|
| 72 |
+
background: #2d2d2f;
|
| 73 |
+
transform: scale(0.98);
|
| 74 |
+
}
|
| 75 |
+
.json-container {
|
| 76 |
+
background-color: #1d1d1f;
|
| 77 |
+
border-radius: 16px;
|
| 78 |
+
padding: 32px;
|
| 79 |
+
overflow-x: auto;
|
| 80 |
+
border: 1px solid #424245;
|
| 81 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
|
| 82 |
+
}
|
| 83 |
+
pre {
|
| 84 |
+
margin: 0;
|
| 85 |
+
font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
|
| 86 |
+
font-size: 13px;
|
| 87 |
+
line-height: 1.6;
|
| 88 |
+
white-space: pre-wrap;
|
| 89 |
+
word-wrap: break-word;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
}
|
| 91 |
+
.json-key {
|
| 92 |
+
color: #9cdcfe;
|
|
|
|
| 93 |
}
|
| 94 |
+
.json-string {
|
| 95 |
+
color: #ce9178;
|
|
|
|
|
|
|
| 96 |
}
|
| 97 |
+
.json-number {
|
| 98 |
+
color: #b5cea8;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
}
|
| 100 |
+
.json-boolean {
|
| 101 |
+
color: #569cd6;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
}
|
| 103 |
+
.json-null {
|
| 104 |
+
color: #569cd6;
|
|
|
|
| 105 |
}
|
| 106 |
+
.success {
|
| 107 |
+
color: #30d158;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 109 |
@media (max-width: 768px) {
|
| 110 |
+
.header h1 {
|
| 111 |
+
font-size: 32px;
|
| 112 |
}
|
| 113 |
+
.controls {
|
| 114 |
+
flex-direction: column;
|
|
|
|
| 115 |
}
|
| 116 |
+
.json-container {
|
| 117 |
+
padding: 20px;
|
|
|
|
| 118 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
}
|
| 120 |
</style>
|
| 121 |
</head>
|
| 122 |
<body>
|
| 123 |
+
<div class="container">
|
| 124 |
+
<div class="header">
|
| 125 |
+
<h1>ComfyUI Workflow</h1>
|
| 126 |
+
<p>View and download your workflow JSON</p>
|
| 127 |
+
</div>
|
| 128 |
+
|
| 129 |
+
<div class="controls">
|
| 130 |
+
<button class="btn btn-primary" onclick="downloadJSON()">Download JSON</button>
|
| 131 |
+
<button class="btn btn-secondary" onclick="copyToClipboard()">Copy to Clipboard</button>
|
| 132 |
+
</div>
|
| 133 |
+
|
| 134 |
+
<div class="json-container">
|
| 135 |
+
<pre id="json-content">{
|
| 136 |
+
"last_node_id": 10,
|
| 137 |
+
"last_link_id": 12,
|
| 138 |
+
"nodes": [
|
| 139 |
+
{
|
| 140 |
+
"id": 1,
|
| 141 |
+
"type": "CheckpointLoaderSimple",
|
| 142 |
+
"pos": [
|
| 143 |
+
20,
|
| 144 |
+
50
|
| 145 |
+
],
|
| 146 |
+
"size": {
|
| 147 |
+
"0": 350,
|
| 148 |
+
"1": 100
|
| 149 |
+
},
|
| 150 |
+
"flags": {},
|
| 151 |
+
"order": 0,
|
| 152 |
+
"mode": 0,
|
| 153 |
+
"outputs": [
|
| 154 |
+
{
|
| 155 |
+
"name": "MODEL",
|
| 156 |
+
"type": "MODEL",
|
| 157 |
+
"links": [
|
| 158 |
+
1
|
| 159 |
+
],
|
| 160 |
+
"shape": 3,
|
| 161 |
+
"slot_index": 0
|
| 162 |
+
},
|
| 163 |
+
{
|
| 164 |
+
"name": "CLIP",
|
| 165 |
+
"type": "CLIP",
|
| 166 |
+
"links": [
|
| 167 |
+
2,
|
| 168 |
+
3
|
| 169 |
+
],
|
| 170 |
+
"shape": 3,
|
| 171 |
+
"slot_index": 1
|
| 172 |
+
},
|
| 173 |
+
{
|
| 174 |
+
"name": "VAE",
|
| 175 |
+
"type": "VAE",
|
| 176 |
+
"links": [
|
| 177 |
+
7
|
| 178 |
+
],
|
| 179 |
+
"shape": 3,
|
| 180 |
+
"slot_index": 2
|
| 181 |
+
}
|
| 182 |
+
],
|
| 183 |
+
"properties": {
|
| 184 |
+
"Node name for S&R": "CheckpointLoaderSimple"
|
| 185 |
+
},
|
| 186 |
+
"widgets_values": [
|
| 187 |
+
"v1-5-pruned-emaonly.safetensors"
|
| 188 |
+
]
|
| 189 |
+
},
|
| 190 |
+
{
|
| 191 |
+
"id": 3,
|
| 192 |
+
"type": "CLIPTextEncode",
|
| 193 |
+
"pos": [
|
| 194 |
+
420,
|
| 195 |
+
50
|
| 196 |
+
],
|
| 197 |
+
"size": {
|
| 198 |
+
"0": 425,
|
| 199 |
+
"1": 180
|
| 200 |
+
},
|
| 201 |
+
"flags": {},
|
| 202 |
+
"order": 1,
|
| 203 |
+
"mode": 0,
|
| 204 |
+
"inputs": [
|
| 205 |
+
{
|
| 206 |
+
"name": "CLIP",
|
| 207 |
+
"type": "CLIP",
|
| 208 |
+
"link": 2
|
| 209 |
+
}
|
| 210 |
+
],
|
| 211 |
+
"outputs": [
|
| 212 |
+
{
|
| 213 |
+
"name": "CONDITIONING",
|
| 214 |
+
"type": "CONDITIONING",
|
| 215 |
+
"links": [
|
| 216 |
+
4
|
| 217 |
+
],
|
| 218 |
+
"shape": 3,
|
| 219 |
+
"slot_index": 0
|
| 220 |
+
}
|
| 221 |
+
],
|
| 222 |
+
"properties": {
|
| 223 |
+
"Node name for S&R": "CLIPTextEncode"
|
| 224 |
+
},
|
| 225 |
+
"widgets_values": [
|
| 226 |
+
"beautiful landscape, mountains, sunset, detailed, 8k, masterpiece"
|
| 227 |
+
]
|
| 228 |
+
},
|
| 229 |
+
{
|
| 230 |
+
"id": 4,
|
| 231 |
+
"type": "CLIPTextEncode",
|
| 232 |
+
"pos": [
|
| 233 |
+
420,
|
| 234 |
+
280
|
| 235 |
+
],
|
| 236 |
+
"size": {
|
| 237 |
+
"0": 425,
|
| 238 |
+
"1": 180
|
| 239 |
+
},
|
| 240 |
+
"flags": {},
|
| 241 |
+
"order": 2,
|
| 242 |
+
"mode": 0,
|
| 243 |
+
"inputs": [
|
| 244 |
+
{
|
| 245 |
+
"name": "CLIP",
|
| 246 |
+
"type": "CLIP",
|
| 247 |
+
"link": 3
|
| 248 |
+
}
|
| 249 |
+
],
|
| 250 |
+
"outputs": [
|
| 251 |
+
{
|
| 252 |
+
"name": "CONDITIONING",
|
| 253 |
+
"type": "CONDITIONING",
|
| 254 |
+
"links": [
|
| 255 |
+
5
|
| 256 |
+
],
|
| 257 |
+
"shape": 3,
|
| 258 |
+
"slot_index": 0
|
| 259 |
+
}
|
| 260 |
+
],
|
| 261 |
+
"properties": {
|
| 262 |
+
"Node name for S&R": "CLIPTextEncode"
|
| 263 |
+
},
|
| 264 |
+
"widgets_values": [
|
| 265 |
+
"ugly, blurry, low quality, distorted"
|
| 266 |
+
]
|
| 267 |
+
},
|
| 268 |
+
{
|
| 269 |
+
"id": 5,
|
| 270 |
+
"type": "EmptyLatentImage",
|
| 271 |
+
"pos": [
|
| 272 |
+
420,
|
| 273 |
+
500
|
| 274 |
+
],
|
| 275 |
+
"size": {
|
| 276 |
+
"0": 315,
|
| 277 |
+
"1": 110
|
| 278 |
+
},
|
| 279 |
+
"flags": {},
|
| 280 |
+
"order": 3,
|
| 281 |
+
"mode": 0,
|
| 282 |
+
"outputs": [
|
| 283 |
+
{
|
| 284 |
+
"name": "LATENT",
|
| 285 |
+
"type": "LATENT",
|
| 286 |
+
"links": [
|
| 287 |
+
6
|
| 288 |
+
],
|
| 289 |
+
"shape": 3,
|
| 290 |
+
"slot_index": 0
|
| 291 |
+
}
|
| 292 |
+
],
|
| 293 |
+
"properties": {
|
| 294 |
+
"Node name for S&R": "EmptyLatentImage"
|
| 295 |
+
},
|
| 296 |
+
"widgets_values": [
|
| 297 |
+
512,
|
| 298 |
+
512,
|
| 299 |
+
1
|
| 300 |
+
]
|
| 301 |
+
},
|
| 302 |
+
{
|
| 303 |
+
"id": 6,
|
| 304 |
+
"type": "KSampler",
|
| 305 |
+
"pos": [
|
| 306 |
+
900,
|
| 307 |
+
150
|
| 308 |
+
],
|
| 309 |
+
"size": {
|
| 310 |
+
"0": 300,
|
| 311 |
+
"1": 260
|
| 312 |
+
},
|
| 313 |
+
"flags": {},
|
| 314 |
+
"order": 4,
|
| 315 |
+
"mode": 0,
|
| 316 |
+
"inputs": [
|
| 317 |
+
{
|
| 318 |
+
"name": "model",
|
| 319 |
+
"type": "MODEL",
|
| 320 |
+
"link": 1
|
| 321 |
+
},
|
| 322 |
+
{
|
| 323 |
+
"name": "positive",
|
| 324 |
+
"type": "CONDITIONING",
|
| 325 |
+
"link": 4
|
| 326 |
+
},
|
| 327 |
+
{
|
| 328 |
+
"name": "negative",
|
| 329 |
+
"type": "CONDITIONING",
|
| 330 |
+
"link": 5
|
| 331 |
+
},
|
| 332 |
+
{
|
| 333 |
+
"name": "latent_image",
|
| 334 |
+
"type": "LATENT",
|
| 335 |
+
"link": 6
|
| 336 |
+
}
|
| 337 |
+
],
|
| 338 |
+
"outputs": [
|
| 339 |
+
{
|
| 340 |
+
"name": "LATENT",
|
| 341 |
+
"type": "LATENT",
|
| 342 |
+
"links": [
|
| 343 |
+
8
|
| 344 |
+
],
|
| 345 |
+
"shape": 3,
|
| 346 |
+
"slot_index": 0
|
| 347 |
+
}
|
| 348 |
+
],
|
| 349 |
+
"properties": {
|
| 350 |
+
"Node name for S&R": "KSampler"
|
| 351 |
+
},
|
| 352 |
+
"widgets_values": [
|
| 353 |
+
123456789,
|
| 354 |
+
"randomize",
|
| 355 |
+
20,
|
| 356 |
+
7,
|
| 357 |
+
"euler",
|
| 358 |
+
"normal",
|
| 359 |
+
1
|
| 360 |
+
]
|
| 361 |
+
},
|
| 362 |
+
{
|
| 363 |
+
"id": 7,
|
| 364 |
+
"type": "VAEDecode",
|
| 365 |
+
"pos": [
|
| 366 |
+
1280,
|
| 367 |
+
150
|
| 368 |
+
],
|
| 369 |
+
"size": {
|
| 370 |
+
"0": 210,
|
| 371 |
+
"1": 50
|
| 372 |
+
},
|
| 373 |
+
"flags": {},
|
| 374 |
+
"order": 5,
|
| 375 |
+
"mode": 0,
|
| 376 |
+
"inputs": [
|
| 377 |
+
{
|
| 378 |
+
"name": "samples",
|
| 379 |
+
"type": "LATENT",
|
| 380 |
+
"link": 8
|
| 381 |
+
},
|
| 382 |
+
{
|
| 383 |
+
"name": "vae",
|
| 384 |
+
"type": "VAE",
|
| 385 |
+
"link": 7
|
| 386 |
+
}
|
| 387 |
+
],
|
| 388 |
+
"outputs": [
|
| 389 |
+
{
|
| 390 |
+
"name": "IMAGE",
|
| 391 |
+
"type": "IMAGE",
|
| 392 |
+
"links": [
|
| 393 |
+
9
|
| 394 |
+
],
|
| 395 |
+
"shape": 3,
|
| 396 |
+
"slot_index": 0
|
| 397 |
+
}
|
| 398 |
+
],
|
| 399 |
+
"properties": {
|
| 400 |
+
"Node name for S&R": "VAEDecode"
|
| 401 |
+
}
|
| 402 |
+
},
|
| 403 |
+
{
|
| 404 |
+
"id": 8,
|
| 405 |
+
"type": "SaveImage",
|
| 406 |
+
"pos": [
|
| 407 |
+
1560,
|
| 408 |
+
150
|
| 409 |
+
],
|
| 410 |
+
"size": {
|
| 411 |
+
"0": 315,
|
| 412 |
+
"1": 60
|
| 413 |
+
},
|
| 414 |
+
"flags": {},
|
| 415 |
+
"order": 6,
|
| 416 |
+
"mode": 0,
|
| 417 |
+
"inputs": [
|
| 418 |
+
{
|
| 419 |
+
"name": "images",
|
| 420 |
+
"type": "IMAGE",
|
| 421 |
+
"link": 9
|
| 422 |
+
}
|
| 423 |
+
],
|
| 424 |
+
"properties": {
|
| 425 |
+
"Node name for S&R": "SaveImage"
|
| 426 |
+
},
|
| 427 |
+
"widgets_values": [
|
| 428 |
+
"ComfyUI_Image"
|
| 429 |
+
]
|
| 430 |
+
},
|
| 431 |
+
{
|
| 432 |
+
"id": 9,
|
| 433 |
+
"type": "KSamplerAdvanced",
|
| 434 |
+
"pos": [
|
| 435 |
+
900,
|
| 436 |
+
500
|
| 437 |
+
],
|
| 438 |
+
"size": {
|
| 439 |
+
"0": 300,
|
| 440 |
+
"1": 330
|
| 441 |
+
},
|
| 442 |
+
"flags": {},
|
| 443 |
+
"order": 7,
|
| 444 |
+
"mode": 0,
|
| 445 |
+
"inputs": [
|
| 446 |
+
{
|
| 447 |
+
"name": "model",
|
| 448 |
+
"type": "MODEL",
|
| 449 |
+
"link": 1
|
| 450 |
+
},
|
| 451 |
+
{
|
| 452 |
+
"name": "positive",
|
| 453 |
+
"type": "CONDITIONING",
|
| 454 |
+
"link": 4
|
| 455 |
+
},
|
| 456 |
+
{
|
| 457 |
+
"name": "negative",
|
| 458 |
+
"type": "CONDITIONING",
|
| 459 |
+
"link": 5
|
| 460 |
+
},
|
| 461 |
+
{
|
| 462 |
+
"name": "latent_image",
|
| 463 |
+
"type": "LATENT",
|
| 464 |
+
"link": 6
|
| 465 |
+
}
|
| 466 |
+
],
|
| 467 |
+
"outputs": [
|
| 468 |
+
{
|
| 469 |
+
"name": "LATENT",
|
| 470 |
+
"type": "LATENT",
|
| 471 |
+
"links": [
|
| 472 |
+
10
|
| 473 |
+
],
|
| 474 |
+
"shape": 3,
|
| 475 |
+
"slot_index": 0
|
| 476 |
+
},
|
| 477 |
+
{
|
| 478 |
+
"name": "LATENT",
|
| 479 |
+
"type": "LATENT",
|
| 480 |
+
"links": null,
|
| 481 |
+
"shape": 3
|
| 482 |
+
}
|
| 483 |
+
],
|
| 484 |
+
"properties": {
|
| 485 |
+
"Node name for S&R": "KSamplerAdvanced"
|
| 486 |
+
},
|
| 487 |
+
"widgets_values": [
|
| 488 |
+
"enable",
|
| 489 |
+
123456789,
|
| 490 |
+
"randomize",
|
| 491 |
+
20,
|
| 492 |
+
7,
|
| 493 |
+
"euler",
|
| 494 |
+
"normal",
|
| 495 |
+
0,
|
| 496 |
+
20,
|
| 497 |
+
"disable"
|
| 498 |
+
]
|
| 499 |
+
},
|
| 500 |
+
{
|
| 501 |
+
"id": 10,
|
| 502 |
+
"type": "PreviewImage",
|
| 503 |
+
"pos": [
|
| 504 |
+
1280,
|
| 505 |
+
500
|
| 506 |
+
],
|
| 507 |
+
"size": {
|
| 508 |
+
"0": 295,
|
| 509 |
+
"1": 290
|
| 510 |
+
},
|
| 511 |
+
"flags": {},
|
| 512 |
+
"order": 8,
|
| 513 |
+
"mode": 0,
|
| 514 |
+
"inputs": [
|
| 515 |
+
{
|
| 516 |
+
"name": "images",
|
| 517 |
+
"type": "IMAGE",
|
| 518 |
+
"link": 11
|
| 519 |
+
}
|
| 520 |
+
],
|
| 521 |
+
"properties": {
|
| 522 |
+
"Node name for S&R": "PreviewImage"
|
| 523 |
+
}
|
| 524 |
+
},
|
| 525 |
+
{
|
| 526 |
+
"id": 11,
|
| 527 |
+
"type": "VAEDecode",
|
| 528 |
+
"pos": [
|
| 529 |
+
1280,
|
| 530 |
+
320
|
| 531 |
+
],
|
| 532 |
+
"size": {
|
| 533 |
+
"0": 210,
|
| 534 |
+
"1": 50
|
| 535 |
+
},
|
| 536 |
+
"flags": {},
|
| 537 |
+
"order": 9,
|
| 538 |
+
"mode": 0,
|
| 539 |
+
"inputs": [
|
| 540 |
+
{
|
| 541 |
+
"name": "samples",
|
| 542 |
+
"type": "LATENT",
|
| 543 |
+
"link": 10
|
| 544 |
+
},
|
| 545 |
+
{
|
| 546 |
+
"name": "vae",
|
| 547 |
+
"type": "VAE",
|
| 548 |
+
"link": 7
|
| 549 |
+
}
|
| 550 |
+
],
|
| 551 |
+
"outputs": [
|
| 552 |
+
{
|
| 553 |
+
"name": "IMAGE",
|
| 554 |
+
"type": "IMAGE",
|
| 555 |
+
"links": [
|
| 556 |
+
11
|
| 557 |
+
],
|
| 558 |
+
"shape": 3,
|
| 559 |
+
"slot_index": 0
|
| 560 |
+
}
|
| 561 |
+
],
|
| 562 |
+
"properties": {
|
| 563 |
+
"Node name for S&R": "VAEDecode"
|
| 564 |
+
}
|
| 565 |
+
}
|
| 566 |
+
],
|
| 567 |
+
"links": [
|
| 568 |
+
[
|
| 569 |
+
1,
|
| 570 |
+
1,
|
| 571 |
+
0,
|
| 572 |
+
6,
|
| 573 |
+
0,
|
| 574 |
+
"MODEL"
|
| 575 |
+
],
|
| 576 |
+
[
|
| 577 |
+
2,
|
| 578 |
+
1,
|
| 579 |
+
1,
|
| 580 |
+
3,
|
| 581 |
+
0,
|
| 582 |
+
"CLIP"
|
| 583 |
+
],
|
| 584 |
+
[
|
| 585 |
+
3,
|
| 586 |
+
1,
|
| 587 |
+
1,
|
| 588 |
+
4,
|
| 589 |
+
0,
|
| 590 |
+
"CLIP"
|
| 591 |
+
],
|
| 592 |
+
[
|
| 593 |
+
4,
|
| 594 |
+
3,
|
| 595 |
+
0,
|
| 596 |
+
6,
|
| 597 |
+
1,
|
| 598 |
+
"CONDITIONING"
|
| 599 |
+
],
|
| 600 |
+
[
|
| 601 |
+
5,
|
| 602 |
+
4,
|
| 603 |
+
0,
|
| 604 |
+
6,
|
| 605 |
+
2,
|
| 606 |
+
"CONDITIONING"
|
| 607 |
+
],
|
| 608 |
+
[
|
| 609 |
+
6,
|
| 610 |
+
5,
|
| 611 |
+
0,
|
| 612 |
+
6,
|
| 613 |
+
3,
|
| 614 |
+
"LATENT"
|
| 615 |
+
],
|
| 616 |
+
[
|
| 617 |
+
7,
|
| 618 |
+
1,
|
| 619 |
+
2,
|
| 620 |
+
7,
|
| 621 |
+
1,
|
| 622 |
+
"VAE"
|
| 623 |
+
],
|
| 624 |
+
[
|
| 625 |
+
8,
|
| 626 |
+
6,
|
| 627 |
+
0,
|
| 628 |
+
7,
|
| 629 |
+
0,
|
| 630 |
+
"LATENT"
|
| 631 |
+
],
|
| 632 |
+
[
|
| 633 |
+
9,
|
| 634 |
+
7,
|
| 635 |
+
0,
|
| 636 |
+
8,
|
| 637 |
+
0,
|
| 638 |
+
"IMAGE"
|
| 639 |
+
],
|
| 640 |
+
[
|
| 641 |
+
10,
|
| 642 |
+
9,
|
| 643 |
+
0,
|
| 644 |
+
11,
|
| 645 |
+
0,
|
| 646 |
+
"LATENT"
|
| 647 |
+
],
|
| 648 |
+
[
|
| 649 |
+
11,
|
| 650 |
+
11,
|
| 651 |
+
0,
|
| 652 |
+
10,
|
| 653 |
+
0,
|
| 654 |
+
"IMAGE"
|
| 655 |
+
]
|
| 656 |
+
],
|
| 657 |
+
"groups": [],
|
| 658 |
+
"config": {},
|
| 659 |
+
"extra": {
|
| 660 |
+
"ds": {
|
| 661 |
+
"scale": 1,
|
| 662 |
+
"offset": [
|
| 663 |
+
0,
|
| 664 |
+
0
|
| 665 |
+
]
|
| 666 |
+
}
|
| 667 |
+
},
|
| 668 |
+
"version": 0.4
|
| 669 |
+
}</pre>
|
| 670 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 671 |
</div>
|
| 672 |
|
| 673 |
<script>
|
| 674 |
+
function copyToClipboard() {
|
| 675 |
+
const jsonContent = document.getElementById('json-content').textContent;
|
| 676 |
+
navigator.clipboard.writeText(jsonContent).then(() => {
|
| 677 |
+
const btn = event.target;
|
| 678 |
+
const originalText = btn.textContent;
|
| 679 |
+
btn.textContent = 'Copied!';
|
| 680 |
+
btn.classList.add('success');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 681 |
setTimeout(() => {
|
| 682 |
+
btn.textContent = originalText;
|
| 683 |
+
btn.classList.remove('success');
|
| 684 |
+
}, 2000);
|
| 685 |
+
}).catch(err => {
|
| 686 |
+
alert('Failed to copy to clipboard');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 687 |
});
|
| 688 |
+
}
|
| 689 |
|
| 690 |
+
function downloadJSON() {
|
| 691 |
+
const jsonContent = document.getElementById('json-content').textContent;
|
| 692 |
+
const blob = new Blob([jsonContent], { type: 'application/json' });
|
| 693 |
+
const url = URL.createObjectURL(blob);
|
| 694 |
+
const a = document.createElement('a');
|
| 695 |
+
a.href = url;
|
| 696 |
+
a.download = 'comfyui_workflow.json';
|
| 697 |
+
document.body.appendChild(a);
|
| 698 |
+
a.click();
|
| 699 |
+
document.body.removeChild(a);
|
| 700 |
+
URL.revokeObjectURL(url);
|
| 701 |
|
| 702 |
+
const btn = event.target;
|
| 703 |
+
const originalText = btn.textContent;
|
| 704 |
+
btn.textContent = 'Downloaded!';
|
| 705 |
+
btn.classList.add('success');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 706 |
setTimeout(() => {
|
| 707 |
+
btn.textContent = originalText;
|
| 708 |
+
btn.classList.remove('success');
|
| 709 |
+
}, 2000);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 710 |
}
|
| 711 |
|
| 712 |
+
// Add syntax highlighting
|
| 713 |
+
function highlightJSON() {
|
| 714 |
+
const content = document.getElementById('json-content');
|
| 715 |
+
let html = content.innerHTML;
|
| 716 |
|
| 717 |
+
// Highlight different JSON elements
|
| 718 |
+
html = html.replace(/"([^"]+)":/g, '<span class="json-key">"$1":</span>');
|
| 719 |
+
html = html.replace(/: "([^"]*)"/g, ': <span class="json-string">"$1"</span>');
|
| 720 |
+
html = html.replace(/: (-?\d+\.?\d*)/g, ': <span class="json-number">$1</span>');
|
| 721 |
+
html = html.replace(/: (true|false)/g, ': <span class="json-boolean">$1</span>');
|
| 722 |
+
html = html.replace(/: null/g, ': <span class="json-null">null</span>');
|
| 723 |
|
| 724 |
+
content.innerHTML = html;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 725 |
}
|
| 726 |
|
| 727 |
+
// Apply syntax highlighting after page load
|
| 728 |
+
window.addEventListener('load', highlightJSON);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 729 |
</script>
|
| 730 |
</body>
|
| 731 |
</html>
|