hasanalrobasi commited on
Commit
60931ea
·
verified ·
1 Parent(s): 50c0338

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +348 -19
index.html CHANGED
@@ -1,19 +1,348 @@
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": 4,
137
+ "last_link_id": 3,
138
+ "nodes": [
139
+ {
140
+ "id": 1,
141
+ "type": "CheckpointLoaderSimple",
142
+ "pos": [
143
+ 100,
144
+ 100
145
+ ],
146
+ "inputs": {
147
+ "ckpt_name": "v1-5-pruned-emaonly.safetensors"
148
+ },
149
+ "outputs": {
150
+ "MODEL": [
151
+ 2,
152
+ 0
153
+ ],
154
+ "CLIP": [
155
+ 2,
156
+ 1
157
+ ],
158
+ "VAE": [
159
+ 4,
160
+ 0
161
+ ]
162
+ }
163
+ },
164
+ {
165
+ "id": 2,
166
+ "type": "CLIPTextEncode",
167
+ "pos": [
168
+ 300,
169
+ 100
170
+ ],
171
+ "inputs": {
172
+ "text": "a beautiful landscape, sunset, mountains, highly detailed",
173
+ "clip": [
174
+ 1,
175
+ 1
176
+ ]
177
+ },
178
+ "outputs": {
179
+ "CONDITIONING": [
180
+ 3,
181
+ 0
182
+ ]
183
+ }
184
+ },
185
+ {
186
+ "id": 3,
187
+ "type": "KSampler",
188
+ "pos": [
189
+ 500,
190
+ 100
191
+ ],
192
+ "inputs": {
193
+ "model": [
194
+ 1,
195
+ 0
196
+ ],
197
+ "seed": 42,
198
+ "steps": 20,
199
+ "cfg": 7,
200
+ "sampler_name": "euler",
201
+ "scheduler": "normal",
202
+ "positive": [
203
+ 2,
204
+ 0
205
+ ],
206
+ "negative": null,
207
+ "latent_image": [
208
+ 4,
209
+ 1
210
+ ]
211
+ },
212
+ "outputs": {
213
+ "LATENT": [
214
+ 4,
215
+ 1
216
+ ]
217
+ }
218
+ },
219
+ {
220
+ "id": 4,
221
+ "type": "VAEDecode",
222
+ "pos": [
223
+ 700,
224
+ 100
225
+ ],
226
+ "inputs": {
227
+ "samples": [
228
+ 3,
229
+ 0
230
+ ],
231
+ "vae": [
232
+ 1,
233
+ 2
234
+ ]
235
+ },
236
+ "outputs": {
237
+ "IMAGE": null
238
+ }
239
+ },
240
+ {
241
+ "id": 5,
242
+ "type": "SaveImage",
243
+ "pos": [
244
+ 900,
245
+ 100
246
+ ],
247
+ "inputs": {
248
+ "images": [
249
+ 4,
250
+ 0
251
+ ]
252
+ },
253
+ "outputs": {}
254
+ }
255
+ ],
256
+ "links": [
257
+ [
258
+ 1,
259
+ 0,
260
+ 2,
261
+ 0
262
+ ],
263
+ [
264
+ 1,
265
+ 1,
266
+ 2,
267
+ 1
268
+ ],
269
+ [
270
+ 2,
271
+ 0,
272
+ 3,
273
+ 0
274
+ ],
275
+ [
276
+ 3,
277
+ 0,
278
+ 4,
279
+ 0
280
+ ]
281
+ ],
282
+ "groups": [],
283
+ "config": {},
284
+ "extra": {},
285
+ "version": 0.4
286
+ }</pre>
287
+ </div>
288
+ </div>
289
+
290
+ <script>
291
+ function copyToClipboard() {
292
+ const jsonContent = document.getElementById('json-content').textContent;
293
+ navigator.clipboard.writeText(jsonContent).then(() => {
294
+ const btn = event.target;
295
+ const originalText = btn.textContent;
296
+ btn.textContent = 'Copied!';
297
+ btn.classList.add('success');
298
+ setTimeout(() => {
299
+ btn.textContent = originalText;
300
+ btn.classList.remove('success');
301
+ }, 2000);
302
+ }).catch(err => {
303
+ alert('Failed to copy to clipboard');
304
+ });
305
+ }
306
+
307
+ function downloadJSON() {
308
+ const jsonContent = document.getElementById('json-content').textContent;
309
+ const blob = new Blob([jsonContent], { type: 'application/json' });
310
+ const url = URL.createObjectURL(blob);
311
+ const a = document.createElement('a');
312
+ a.href = url;
313
+ a.download = 'comfyui_workflow.json';
314
+ document.body.appendChild(a);
315
+ a.click();
316
+ document.body.removeChild(a);
317
+ URL.revokeObjectURL(url);
318
+
319
+ const btn = event.target;
320
+ const originalText = btn.textContent;
321
+ btn.textContent = 'Downloaded!';
322
+ btn.classList.add('success');
323
+ setTimeout(() => {
324
+ btn.textContent = originalText;
325
+ btn.classList.remove('success');
326
+ }, 2000);
327
+ }
328
+
329
+ // Add syntax highlighting
330
+ function highlightJSON() {
331
+ const content = document.getElementById('json-content');
332
+ let html = content.innerHTML;
333
+
334
+ // Highlight different JSON elements
335
+ html = html.replace(/"([^"]+)":/g, '<span class="json-key">"$1":</span>');
336
+ html = html.replace(/: "([^"]*)"/g, ': <span class="json-string">"$1"</span>');
337
+ html = html.replace(/: (-?\d+\.?\d*)/g, ': <span class="json-number">$1</span>');
338
+ html = html.replace(/: (true|false)/g, ': <span class="json-boolean">$1</span>');
339
+ html = html.replace(/: null/g, ': <span class="json-null">null</span>');
340
+
341
+ content.innerHTML = html;
342
+ }
343
+
344
+ // Apply syntax highlighting after page load
345
+ window.addEventListener('load', highlightJSON);
346
+ </script>
347
+ </body>
348
+ </html>