GPUhead commited on
Commit
35237e9
·
verified ·
1 Parent(s): 9fd98e4

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +459 -19
index.html CHANGED
@@ -1,19 +1,459 @@
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": 6,
137
+ "last_link_id": 7,
138
+ "nodes": [
139
+ {
140
+ "id": 1,
141
+ "type": "LoadAudio",
142
+ "pos": [
143
+ 200,
144
+ 100
145
+ ],
146
+ "size": {
147
+ "0": 210,
148
+ "1": 74
149
+ },
150
+ "flags": {},
151
+ "order": 0,
152
+ "mode": 0,
153
+ "inputs": [],
154
+ "outputs": [
155
+ {
156
+ "name": "audio",
157
+ "type": "AUDIO",
158
+ "links": [
159
+ 1
160
+ ],
161
+ "slot_index": 0
162
+ }
163
+ ],
164
+ "properties": {
165
+ "audio_file": "input.mp3"
166
+ },
167
+ "widgets_values": [
168
+ "input.mp3"
169
+ ]
170
+ },
171
+ {
172
+ "id": 2,
173
+ "type": "AudioEffects",
174
+ "pos": [
175
+ 500,
176
+ 50
177
+ ],
178
+ "size": {
179
+ "0": 315,
180
+ "1": 582
181
+ },
182
+ "flags": {},
183
+ "order": 1,
184
+ "mode": 0,
185
+ "inputs": [
186
+ {
187
+ "name": "audio",
188
+ "type": "AUDIO",
189
+ "link": 1,
190
+ "slot_index": 0
191
+ }
192
+ ],
193
+ "outputs": [
194
+ {
195
+ "name": "slowed_reverb",
196
+ "type": "AUDIO",
197
+ "links": [
198
+ 2
199
+ ],
200
+ "slot_index": 0
201
+ },
202
+ {
203
+ "name": "8d_audio",
204
+ "type": "AUDIO",
205
+ "links": [
206
+ 3
207
+ ],
208
+ "slot_index": 1
209
+ },
210
+ {
211
+ "name": "16d_audio",
212
+ "type": "AUDIO",
213
+ "links": [
214
+ 4
215
+ ],
216
+ "slot_index": 2
217
+ },
218
+ {
219
+ "name": "sped_up",
220
+ "type": "AUDIO",
221
+ "links": [
222
+ 5
223
+ ],
224
+ "slot_index": 3
225
+ }
226
+ ],
227
+ "properties": {},
228
+ "widgets_values": [
229
+ 0.7,
230
+ 2.0,
231
+ 1.3,
232
+ 0.5
233
+ ]
234
+ },
235
+ {
236
+ "id": 3,
237
+ "type": "SaveAudio",
238
+ "pos": [
239
+ 900,
240
+ 50
241
+ ],
242
+ "size": {
243
+ "0": 210,
244
+ "1": 74
245
+ },
246
+ "flags": {},
247
+ "order": 2,
248
+ "mode": 0,
249
+ "inputs": [
250
+ {
251
+ "name": "audio",
252
+ "type": "AUDIO",
253
+ "link": 2,
254
+ "slot_index": 0
255
+ }
256
+ ],
257
+ "outputs": [],
258
+ "properties": {
259
+ "filename_prefix": "slowed_reverb_output"
260
+ },
261
+ "widgets_values": [
262
+ "slowed_reverb_output"
263
+ ]
264
+ },
265
+ {
266
+ "id": 4,
267
+ "type": "SaveAudio",
268
+ "pos": [
269
+ 900,
270
+ 150
271
+ ],
272
+ "size": {
273
+ "0": 210,
274
+ "1": 74
275
+ },
276
+ "flags": {},
277
+ "order": 3,
278
+ "mode": 0,
279
+ "inputs": [
280
+ {
281
+ "name": "audio",
282
+ "type": "AUDIO",
283
+ "link": 3,
284
+ "slot_index": 0
285
+ }
286
+ ],
287
+ "outputs": [],
288
+ "properties": {
289
+ "filename_prefix": "8d_output"
290
+ },
291
+ "widgets_values": [
292
+ "8d_output"
293
+ ]
294
+ },
295
+ {
296
+ "id": 5,
297
+ "type": "SaveAudio",
298
+ "pos": [
299
+ 900,
300
+ 250
301
+ ],
302
+ "size": {
303
+ "0": 210,
304
+ "1": 74
305
+ },
306
+ "flags": {},
307
+ "order": 4,
308
+ "mode": 0,
309
+ "inputs": [
310
+ {
311
+ "name": "audio",
312
+ "type": "AUDIO",
313
+ "link": 4,
314
+ "slot_index": 0
315
+ }
316
+ ],
317
+ "outputs": [],
318
+ "properties": {
319
+ "filename_prefix": "16d_output"
320
+ },
321
+ "widgets_values": [
322
+ "16d_output"
323
+ ]
324
+ },
325
+ {
326
+ "id": 6,
327
+ "type": "SaveAudio",
328
+ "pos": [
329
+ 900,
330
+ 350
331
+ ],
332
+ "size": {
333
+ "0": 210,
334
+ "1": 74
335
+ },
336
+ "flags": {},
337
+ "order": 5,
338
+ "mode": 0,
339
+ "inputs": [
340
+ {
341
+ "name": "audio",
342
+ "type": "AUDIO",
343
+ "link": 5,
344
+ "slot_index": 0
345
+ }
346
+ ],
347
+ "outputs": [],
348
+ "properties": {
349
+ "filename_prefix": "sped_up_output"
350
+ },
351
+ "widgets_values": [
352
+ "sped_up_output"
353
+ ]
354
+ }
355
+ ],
356
+ "links": [
357
+ [
358
+ 1,
359
+ 0,
360
+ 2,
361
+ 0,
362
+ "AUDIO"
363
+ ],
364
+ [
365
+ 2,
366
+ 0,
367
+ 3,
368
+ 0,
369
+ "AUDIO"
370
+ ],
371
+ [
372
+ 3,
373
+ 1,
374
+ 4,
375
+ 0,
376
+ "AUDIO"
377
+ ],
378
+ [
379
+ 4,
380
+ 2,
381
+ 5,
382
+ 0,
383
+ "AUDIO"
384
+ ],
385
+ [
386
+ 5,
387
+ 3,
388
+ 6,
389
+ 0,
390
+ "AUDIO"
391
+ ]
392
+ ],
393
+ "groups": [],
394
+ "config": {},
395
+ "extra": {},
396
+ "version": 0.4
397
+ }</pre>
398
+ </div>
399
+ </div>
400
+
401
+ <script>
402
+ function copyToClipboard() {
403
+ const jsonContent = document.getElementById('json-content').textContent;
404
+ navigator.clipboard.writeText(jsonContent).then(() => {
405
+ const btn = event.target;
406
+ const originalText = btn.textContent;
407
+ btn.textContent = 'Copied!';
408
+ btn.classList.add('success');
409
+ setTimeout(() => {
410
+ btn.textContent = originalText;
411
+ btn.classList.remove('success');
412
+ }, 2000);
413
+ }).catch(err => {
414
+ alert('Failed to copy to clipboard');
415
+ });
416
+ }
417
+
418
+ function downloadJSON() {
419
+ const jsonContent = document.getElementById('json-content').textContent;
420
+ const blob = new Blob([jsonContent], { type: 'application/json' });
421
+ const url = URL.createObjectURL(blob);
422
+ const a = document.createElement('a');
423
+ a.href = url;
424
+ a.download = 'comfyui_workflow.json';
425
+ document.body.appendChild(a);
426
+ a.click();
427
+ document.body.removeChild(a);
428
+ URL.revokeObjectURL(url);
429
+
430
+ const btn = event.target;
431
+ const originalText = btn.textContent;
432
+ btn.textContent = 'Downloaded!';
433
+ btn.classList.add('success');
434
+ setTimeout(() => {
435
+ btn.textContent = originalText;
436
+ btn.classList.remove('success');
437
+ }, 2000);
438
+ }
439
+
440
+ // Add syntax highlighting
441
+ function highlightJSON() {
442
+ const content = document.getElementById('json-content');
443
+ let html = content.innerHTML;
444
+
445
+ // Highlight different JSON elements
446
+ html = html.replace(/"([^"]+)":/g, '<span class="json-key">"$1":</span>');
447
+ html = html.replace(/: "([^"]*)"/g, ': <span class="json-string">"$1"</span>');
448
+ html = html.replace(/: (-?\d+\.?\d*)/g, ': <span class="json-number">$1</span>');
449
+ html = html.replace(/: (true|false)/g, ': <span class="json-boolean">$1</span>');
450
+ html = html.replace(/: null/g, ': <span class="json-null">null</span>');
451
+
452
+ content.innerHTML = html;
453
+ }
454
+
455
+ // Apply syntax highlighting after page load
456
+ window.addEventListener('load', highlightJSON);
457
+ </script>
458
+ </body>
459
+ </html>