bartokon commited on
Commit
e27dd46
·
verified ·
1 Parent(s): 5bd4b63

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +518 -19
index.html CHANGED
@@ -1,19 +1,518 @@
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": 5,
137
+ "last_link_id": 9,
138
+ "nodes": [
139
+ {
140
+ "id": 1,
141
+ "type": "CheckpointLoaderSimple",
142
+ "inputs": {},
143
+ "outputs": [
144
+ {
145
+ "name": "MODEL",
146
+ "type": "MODEL",
147
+ "links": [
148
+ 1
149
+ ],
150
+ "slot_index": 0
151
+ },
152
+ {
153
+ "name": "CLIP",
154
+ "type": "CLIP",
155
+ "links": [
156
+ 2
157
+ ],
158
+ "slot_index": 1
159
+ },
160
+ {
161
+ "name": "VAE",
162
+ "type": "VAE",
163
+ "links": [
164
+ 3
165
+ ],
166
+ "slot_index": 2
167
+ }
168
+ ],
169
+ "properties": {
170
+ "Node name for SDF": "CheckpointLoaderSimple"
171
+ },
172
+ "widgets_values": [
173
+ "v1-5-pruned-emaonly.ckpt",
174
+ "FP16"
175
+ ],
176
+ "title": "Load Model"
177
+ },
178
+ {
179
+ "id": 2,
180
+ "type": "CLIPTextEncode",
181
+ "inputs": [
182
+ {
183
+ "name": "clip",
184
+ "type": "CLIP",
185
+ "link": 2
186
+ }
187
+ ],
188
+ "outputs": [
189
+ {
190
+ "name": "CONDITIONING",
191
+ "type": "CONDITIONING",
192
+ "links": [
193
+ 4
194
+ ],
195
+ "slot_index": 0
196
+ }
197
+ ],
198
+ "properties": {
199
+ "Node name for SDF": "CLIPTextEncode"
200
+ },
201
+ "widgets_values": [
202
+ "best quality, masterpiece, ultra-detailed, 8k, highres, photorealistic, 1girl, solo, beautiful detailed face, beautiful detailed eyes, detailed skin texture, soft lighting, cinematic lighting, dramatic lighting",
203
+ "text"
204
+ ],
205
+ "title": "Positive Prompt"
206
+ },
207
+ {
208
+ "id": 3,
209
+ "type": "KSampler",
210
+ "inputs": [
211
+ {
212
+ "name": "model",
213
+ "type": "MODEL",
214
+ "link": 1
215
+ },
216
+ {
217
+ "name": "positive",
218
+ "type": "CONDITIONING",
219
+ "link": 4
220
+ },
221
+ {
222
+ "name": "negative",
223
+ "type": "CONDITIONING",
224
+ "link": 5
225
+ },
226
+ {
227
+ "name": "latent_image",
228
+ "type": "LATENT",
229
+ "link": 6
230
+ }
231
+ ],
232
+ "outputs": [
233
+ {
234
+ "name": "LATENT",
235
+ "type": "LATENT",
236
+ "links": [
237
+ 7
238
+ ],
239
+ "slot_index": 0
240
+ }
241
+ ],
242
+ "properties": {
243
+ "Node name for SDF": "KSampler"
244
+ },
245
+ "widgets_values": [
246
+ 20,
247
+ 8,
248
+ 7,
249
+ "dpmpp_2m",
250
+ "karras",
251
+ 1,
252
+ "randomize"
253
+ ],
254
+ "title": "Sampler"
255
+ },
256
+ {
257
+ "id": 4,
258
+ "type": "VAEDecode",
259
+ "inputs": [
260
+ {
261
+ "name": "samples",
262
+ "type": "LATENT",
263
+ "link": 7
264
+ },
265
+ {
266
+ "name": "vae",
267
+ "type": "VAE",
268
+ "link": 3
269
+ }
270
+ ],
271
+ "outputs": [
272
+ {
273
+ "name": "IMAGE",
274
+ "type": "IMAGE",
275
+ "links": [
276
+ 8
277
+ ],
278
+ "slot_index": 0
279
+ }
280
+ ],
281
+ "properties": {
282
+ "Node name for SDF": "VAEDecode"
283
+ },
284
+ "widgets_values": [],
285
+ "title": "Decode Latent"
286
+ },
287
+ {
288
+ "id": 5,
289
+ "type": "SaveImage",
290
+ "inputs": [
291
+ {
292
+ "name": "images",
293
+ "type": "IMAGE",
294
+ "link": 8
295
+ }
296
+ ],
297
+ "properties": {
298
+ "Node name for SDF": "SaveImage"
299
+ },
300
+ "widgets_values": [],
301
+ "title": "Save Output"
302
+ }
303
+ ],
304
+ "links": [
305
+ [
306
+ 1,
307
+ 1,
308
+ 0,
309
+ 3,
310
+ 0,
311
+ "MODEL"
312
+ ],
313
+ [
314
+ 2,
315
+ 1,
316
+ 1,
317
+ 2,
318
+ 0,
319
+ "CLIP"
320
+ ],
321
+ [
322
+ 3,
323
+ 1,
324
+ 2,
325
+ 4,
326
+ 1,
327
+ "VAE"
328
+ ],
329
+ [
330
+ 4,
331
+ 2,
332
+ 0,
333
+ 3,
334
+ 1,
335
+ "CONDITIONING"
336
+ ],
337
+ [
338
+ 5,
339
+ 2,
340
+ 1,
341
+ 3,
342
+ 2,
343
+ "CONDITIONING"
344
+ ],
345
+ [
346
+ 6,
347
+ 1,
348
+ -1,
349
+ 3,
350
+ 3,
351
+ "LATENT"
352
+ ],
353
+ [
354
+ 7,
355
+ 3,
356
+ 0,
357
+ 4,
358
+ 0,
359
+ "LATENT"
360
+ ],
361
+ [
362
+ 8,
363
+ 4,
364
+ 0,
365
+ 5,
366
+ 0,
367
+ "IMAGE"
368
+ ]
369
+ ],
370
+ "groups": [
371
+ {
372
+ "title": "Model Loading",
373
+ "bounds": [
374
+ 50,
375
+ 50,
376
+ 200,
377
+ 200
378
+ ]
379
+ },
380
+ {
381
+ "title": "Text Encoding",
382
+ "bounds": [
383
+ 350,
384
+ 50,
385
+ 200,
386
+ 200
387
+ ]
388
+ },
389
+ {
390
+ "title": "Sampling",
391
+ "bounds": [
392
+ 50,
393
+ 350,
394
+ 200,
395
+ 200
396
+ ]
397
+ },
398
+ {
399
+ "title": "Decoding & Saving",
400
+ "bounds": [
401
+ 350,
402
+ 350,
403
+ 200,
404
+ 200
405
+ ]
406
+ }
407
+ ],
408
+ "config": {},
409
+ "extra": {
410
+ "ds": {
411
+ "scale": 1,
412
+ "offset": [
413
+ 0,
414
+ 0
415
+ ]
416
+ }
417
+ },
418
+ "version": 0.4,
419
+ "metadata": {
420
+ "nodes": [
421
+ {
422
+ "type": "CheckpointLoaderSimple",
423
+ "parameters": {
424
+ "ckpt_name": "v1-5-pruned-emaonly.ckpt",
425
+ "weight_dtype": "FP16"
426
+ }
427
+ },
428
+ {
429
+ "type": "CLIPTextEncode",
430
+ "parameters": {
431
+ "text": "best quality, masterpiece, ultra-detailed, 8k, highres, photorealistic, 1girl, solo, beautiful detailed face, beautiful detailed eyes, detailed skin texture, soft lighting, cinematic lighting, dramatic lighting",
432
+ "clip_name": "CLIP"
433
+ }
434
+ },
435
+ {
436
+ "type": "KSampler",
437
+ "parameters": {
438
+ "steps": 20,
439
+ "cfg": 7,
440
+ "sampler_name": "dpmpp_2m",
441
+ "scheduler": "karras",
442
+ "denoise": 1,
443
+ "seed": "randomize"
444
+ }
445
+ }
446
+ ]
447
+ },
448
+ "description": "A basic Stable Diffusion 1.5 Text-to-Image workflow. Loads a model, encodes positive/negative prompts, samples from the latent space, decodes to image, and saves the result.",
449
+ "created_by": "ComfyUI",
450
+ "tags": [
451
+ "text-to-image",
452
+ "sd1.5",
453
+ "basic"
454
+ ],
455
+ "built_with": "https://huggingface.co/spaces/akhaliq/anycoder"
456
+ }</pre>
457
+ </div>
458
+ </div>
459
+
460
+ <script>
461
+ function copyToClipboard() {
462
+ const jsonContent = document.getElementById('json-content').textContent;
463
+ navigator.clipboard.writeText(jsonContent).then(() => {
464
+ const btn = event.target;
465
+ const originalText = btn.textContent;
466
+ btn.textContent = 'Copied!';
467
+ btn.classList.add('success');
468
+ setTimeout(() => {
469
+ btn.textContent = originalText;
470
+ btn.classList.remove('success');
471
+ }, 2000);
472
+ }).catch(err => {
473
+ alert('Failed to copy to clipboard');
474
+ });
475
+ }
476
+
477
+ function downloadJSON() {
478
+ const jsonContent = document.getElementById('json-content').textContent;
479
+ const blob = new Blob([jsonContent], { type: 'application/json' });
480
+ const url = URL.createObjectURL(blob);
481
+ const a = document.createElement('a');
482
+ a.href = url;
483
+ a.download = 'comfyui_workflow.json';
484
+ document.body.appendChild(a);
485
+ a.click();
486
+ document.body.removeChild(a);
487
+ URL.revokeObjectURL(url);
488
+
489
+ const btn = event.target;
490
+ const originalText = btn.textContent;
491
+ btn.textContent = 'Downloaded!';
492
+ btn.classList.add('success');
493
+ setTimeout(() => {
494
+ btn.textContent = originalText;
495
+ btn.classList.remove('success');
496
+ }, 2000);
497
+ }
498
+
499
+ // Add syntax highlighting
500
+ function highlightJSON() {
501
+ const content = document.getElementById('json-content');
502
+ let html = content.innerHTML;
503
+
504
+ // Highlight different JSON elements
505
+ html = html.replace(/"([^"]+)":/g, '<span class="json-key">"$1":</span>');
506
+ html = html.replace(/: "([^"]*)"/g, ': <span class="json-string">"$1"</span>');
507
+ html = html.replace(/: (-?\d+\.?\d*)/g, ': <span class="json-number">$1</span>');
508
+ html = html.replace(/: (true|false)/g, ': <span class="json-boolean">$1</span>');
509
+ html = html.replace(/: null/g, ': <span class="json-null">null</span>');
510
+
511
+ content.innerHTML = html;
512
+ }
513
+
514
+ // Apply syntax highlighting after page load
515
+ window.addEventListener('load', highlightJSON);
516
+ </script>
517
+ </body>
518
+ </html>