akhaliq HF Staff commited on
Commit
acf19ec
·
verified ·
1 Parent(s): 02e1e5e

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +591 -19
index.html CHANGED
@@ -1,19 +1,591 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
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": 15,
138
+ "nodes": [
139
+ {
140
+ "id": 1,
141
+ "type": "CheckpointLoaderSimple",
142
+ "pos": [
143
+ 100,
144
+ 100
145
+ ],
146
+ "size": [
147
+ 315,
148
+ 98
149
+ ],
150
+ "flags": {},
151
+ "order": 0,
152
+ "mode": 0,
153
+ "outputs": [
154
+ {
155
+ "name": "MODEL",
156
+ "type": "MODEL",
157
+ "links": [
158
+ 1
159
+ ]
160
+ },
161
+ {
162
+ "name": "CLIP",
163
+ "type": "CLIP",
164
+ "links": [
165
+ 2,
166
+ 3
167
+ ]
168
+ },
169
+ {
170
+ "name": "VAE",
171
+ "type": "VAE",
172
+ "links": [
173
+ 8
174
+ ]
175
+ }
176
+ ],
177
+ "properties": {
178
+ "Node name for S&R": "CheckpointLoaderSimple"
179
+ }
180
+ },
181
+ {
182
+ "id": 2,
183
+ "type": "CLIPTextEncode",
184
+ "pos": [
185
+ 450,
186
+ 100
187
+ ],
188
+ "size": [
189
+ 425,
190
+ 180
191
+ ],
192
+ "flags": {},
193
+ "order": 1,
194
+ "mode": 0,
195
+ "inputs": [
196
+ {
197
+ "name": "clip",
198
+ "type": "CLIP",
199
+ "link": 2
200
+ }
201
+ ],
202
+ "outputs": [
203
+ {
204
+ "name": "CONDITIONING",
205
+ "type": "CONDITIONING",
206
+ "links": [
207
+ 4
208
+ ]
209
+ }
210
+ ],
211
+ "title": "Positive Prompt",
212
+ "properties": {
213
+ "Node name for S&R": "CLIPTextEncode"
214
+ },
215
+ "widgets_values": [
216
+ "beautiful landscape, mountains, sunset, high quality, detailed"
217
+ ]
218
+ },
219
+ {
220
+ "id": 3,
221
+ "type": "CLIPTextEncode",
222
+ "pos": [
223
+ 450,
224
+ 300
225
+ ],
226
+ "size": [
227
+ 425,
228
+ 180
229
+ ],
230
+ "flags": {},
231
+ "order": 2,
232
+ "mode": 0,
233
+ "inputs": [
234
+ {
235
+ "name": "clip",
236
+ "type": "CLIP",
237
+ "link": 3
238
+ }
239
+ ],
240
+ "outputs": [
241
+ {
242
+ "name": "CONDITIONING",
243
+ "type": "CONDITIONING",
244
+ "links": [
245
+ 5
246
+ ]
247
+ }
248
+ ],
249
+ "title": "Negative Prompt",
250
+ "properties": {
251
+ "Node name for S&R": "CLIPTextEncode"
252
+ },
253
+ "widgets_values": [
254
+ "ugly, blurry, low quality, distorted"
255
+ ]
256
+ },
257
+ {
258
+ "id": 4,
259
+ "type": "KSampler",
260
+ "pos": [
261
+ 900,
262
+ 100
263
+ ],
264
+ "size": [
265
+ 315,
266
+ 262
267
+ ],
268
+ "flags": {},
269
+ "order": 4,
270
+ "mode": 0,
271
+ "inputs": [
272
+ {
273
+ "name": "model",
274
+ "type": "MODEL",
275
+ "link": 1
276
+ },
277
+ {
278
+ "name": "positive",
279
+ "type": "CONDITIONING",
280
+ "link": 4
281
+ },
282
+ {
283
+ "name": "negative",
284
+ "type": "CONDITIONING",
285
+ "link": 5
286
+ },
287
+ {
288
+ "name": "latent_image",
289
+ "type": "LATENT",
290
+ "link": 7
291
+ }
292
+ ],
293
+ "outputs": [
294
+ {
295
+ "name": "LATENT",
296
+ "type": "LATENT",
297
+ "links": [
298
+ 6
299
+ ]
300
+ }
301
+ ],
302
+ "title": "KSampler",
303
+ "properties": {
304
+ "Node name for S&R": "KSampler"
305
+ },
306
+ "widgets_values": [
307
+ 1234567890,
308
+ "randomize",
309
+ 20,
310
+ 7.0,
311
+ "euler_ancestral"
312
+ ]
313
+ },
314
+ {
315
+ "id": 5,
316
+ "type": "EmptyLatentImage",
317
+ "pos": [
318
+ 900,
319
+ 400
320
+ ],
321
+ "size": [
322
+ 315,
323
+ 106
324
+ ],
325
+ "flags": {},
326
+ "order": 3,
327
+ "mode": 0,
328
+ "outputs": [
329
+ {
330
+ "name": "LATENT",
331
+ "type": "LATENT",
332
+ "links": [
333
+ 7
334
+ ]
335
+ }
336
+ ],
337
+ "title": "Empty Latent Image",
338
+ "properties": {
339
+ "Node name for S&R": "EmptyLatentImage"
340
+ },
341
+ "widgets_values": [
342
+ 512,
343
+ 512,
344
+ 1
345
+ ]
346
+ },
347
+ {
348
+ "id": 6,
349
+ "type": "VAEDecode",
350
+ "pos": [
351
+ 1250,
352
+ 100
353
+ ],
354
+ "size": [
355
+ 210,
356
+ 46
357
+ ],
358
+ "flags": {},
359
+ "order": 5,
360
+ "mode": 0,
361
+ "inputs": [
362
+ {
363
+ "name": "samples",
364
+ "type": "LATENT",
365
+ "link": 6
366
+ },
367
+ {
368
+ "name": "vae",
369
+ "type": "VAE",
370
+ "link": 8
371
+ }
372
+ ],
373
+ "outputs": [
374
+ {
375
+ "name": "IMAGE",
376
+ "type": "IMAGE",
377
+ "links": [
378
+ 9
379
+ ]
380
+ }
381
+ ],
382
+ "title": "VAE Decode",
383
+ "properties": {
384
+ "Node name for S&R": "VAEDecode"
385
+ }
386
+ },
387
+ {
388
+ "id": 7,
389
+ "type": "SaveImage",
390
+ "pos": [
391
+ 1500,
392
+ 100
393
+ ],
394
+ "size": [
395
+ 315,
396
+ 270
397
+ ],
398
+ "flags": {},
399
+ "order": 6,
400
+ "mode": 0,
401
+ "inputs": [
402
+ {
403
+ "name": "images",
404
+ "type": "IMAGE",
405
+ "link": 9
406
+ }
407
+ ],
408
+ "title": "Save Image",
409
+ "properties": {
410
+ "Node name for S&R": "SaveImage"
411
+ },
412
+ "widgets_values": [
413
+ "stable_diffusion_output"
414
+ ]
415
+ }
416
+ ],
417
+ "links": [
418
+ [
419
+ 1,
420
+ 1,
421
+ 0,
422
+ 4,
423
+ 0,
424
+ "MODEL"
425
+ ],
426
+ [
427
+ 2,
428
+ 1,
429
+ 1,
430
+ 2,
431
+ 0,
432
+ "CLIP"
433
+ ],
434
+ [
435
+ 3,
436
+ 1,
437
+ 1,
438
+ 3,
439
+ 0,
440
+ "CLIP"
441
+ ],
442
+ [
443
+ 4,
444
+ 2,
445
+ 0,
446
+ 4,
447
+ 1,
448
+ "CONDITIONING"
449
+ ],
450
+ [
451
+ 5,
452
+ 3,
453
+ 0,
454
+ 4,
455
+ 2,
456
+ "CONDITIONING"
457
+ ],
458
+ [
459
+ 6,
460
+ 4,
461
+ 0,
462
+ 6,
463
+ 0,
464
+ "LATENT"
465
+ ],
466
+ [
467
+ 7,
468
+ 5,
469
+ 0,
470
+ 4,
471
+ 3,
472
+ "LATENT"
473
+ ],
474
+ [
475
+ 8,
476
+ 1,
477
+ 2,
478
+ 6,
479
+ 1,
480
+ "VAE"
481
+ ],
482
+ [
483
+ 9,
484
+ 6,
485
+ 0,
486
+ 7,
487
+ 0,
488
+ "IMAGE"
489
+ ]
490
+ ],
491
+ "groups": [
492
+ {
493
+ "title": "Text Prompts",
494
+ "bounding": [
495
+ 440,
496
+ 80,
497
+ 445,
498
+ 420
499
+ ],
500
+ "color": "#3f789e",
501
+ "font_size": 24
502
+ },
503
+ {
504
+ "title": "Sampling",
505
+ "bounding": [
506
+ 890,
507
+ 80,
508
+ 335,
509
+ 440
510
+ ],
511
+ "color": "#3f789e",
512
+ "font_size": 24
513
+ },
514
+ {
515
+ "title": "Output",
516
+ "bounding": [
517
+ 1490,
518
+ 80,
519
+ 335,
520
+ 310
521
+ ],
522
+ "color": "#3f789e",
523
+ "font_size": 24
524
+ }
525
+ ],
526
+ "config": {},
527
+ "extra": {},
528
+ "version": 0.4
529
+ }</pre>
530
+ </div>
531
+ </div>
532
+
533
+ <script>
534
+ function copyToClipboard() {
535
+ const jsonContent = document.getElementById('json-content').textContent;
536
+ navigator.clipboard.writeText(jsonContent).then(() => {
537
+ const btn = event.target;
538
+ const originalText = btn.textContent;
539
+ btn.textContent = 'Copied!';
540
+ btn.classList.add('success');
541
+ setTimeout(() => {
542
+ btn.textContent = originalText;
543
+ btn.classList.remove('success');
544
+ }, 2000);
545
+ }).catch(err => {
546
+ alert('Failed to copy to clipboard');
547
+ });
548
+ }
549
+
550
+ function downloadJSON() {
551
+ const jsonContent = document.getElementById('json-content').textContent;
552
+ const blob = new Blob([jsonContent], { type: 'application/json' });
553
+ const url = URL.createObjectURL(blob);
554
+ const a = document.createElement('a');
555
+ a.href = url;
556
+ a.download = 'comfyui_workflow.json';
557
+ document.body.appendChild(a);
558
+ a.click();
559
+ document.body.removeChild(a);
560
+ URL.revokeObjectURL(url);
561
+
562
+ const btn = event.target;
563
+ const originalText = btn.textContent;
564
+ btn.textContent = 'Downloaded!';
565
+ btn.classList.add('success');
566
+ setTimeout(() => {
567
+ btn.textContent = originalText;
568
+ btn.classList.remove('success');
569
+ }, 2000);
570
+ }
571
+
572
+ // Add syntax highlighting
573
+ function highlightJSON() {
574
+ const content = document.getElementById('json-content');
575
+ let html = content.innerHTML;
576
+
577
+ // Highlight different JSON elements
578
+ html = html.replace(/"([^"]+)":/g, '<span class="json-key">"$1":</span>');
579
+ html = html.replace(/: "([^"]*)"/g, ': <span class="json-string">"$1"</span>');
580
+ html = html.replace(/: (-?\d+\.?\d*)/g, ': <span class="json-number">$1</span>');
581
+ html = html.replace(/: (true|false)/g, ': <span class="json-boolean">$1</span>');
582
+ html = html.replace(/: null/g, ': <span class="json-null">null</span>');
583
+
584
+ content.innerHTML = html;
585
+ }
586
+
587
+ // Apply syntax highlighting after page load
588
+ window.addEventListener('load', highlightJSON);
589
+ </script>
590
+ </body>
591
+ </html>