abilashs003 commited on
Commit
3f633fb
·
verified ·
1 Parent(s): 666fe87

Upload folder using huggingface_hub

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