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 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 |
+
"3": {
|
| 137 |
+
"inputs": {
|
| 138 |
+
"seed": 0,
|
| 139 |
+
"steps": 20,
|
| 140 |
+
"cfg": 7,
|
| 141 |
+
"sampler_name": "euler",
|
| 142 |
+
"scheduler": "normal",
|
| 143 |
+
"denoise": 1,
|
| 144 |
+
"model": [
|
| 145 |
+
"4",
|
| 146 |
+
0
|
| 147 |
+
],
|
| 148 |
+
"positive": [
|
| 149 |
+
"6",
|
| 150 |
+
0
|
| 151 |
+
],
|
| 152 |
+
"negative": [
|
| 153 |
+
"7",
|
| 154 |
+
0
|
| 155 |
+
],
|
| 156 |
+
"latent_image": [
|
| 157 |
+
"5",
|
| 158 |
+
0
|
| 159 |
+
]
|
| 160 |
+
},
|
| 161 |
+
"class_type": "KSampler"
|
| 162 |
+
},
|
| 163 |
+
"4": {
|
| 164 |
+
"inputs": {
|
| 165 |
+
"ckpt_name": "v1-5-pruned-emaonly.safetensors"
|
| 166 |
+
},
|
| 167 |
+
"class_type": "CheckpointLoaderSimple"
|
| 168 |
+
},
|
| 169 |
+
"5": {
|
| 170 |
+
"inputs": {
|
| 171 |
+
"width": 512,
|
| 172 |
+
"height": 512,
|
| 173 |
+
"batch_size": 1
|
| 174 |
+
},
|
| 175 |
+
"class_type": "EmptyLatentImage"
|
| 176 |
+
},
|
| 177 |
+
"6": {
|
| 178 |
+
"inputs": {
|
| 179 |
+
"text": "beautiful artwork, masterpiece, best quality, high detail",
|
| 180 |
+
"clip": [
|
| 181 |
+
"4",
|
| 182 |
+
1
|
| 183 |
+
]
|
| 184 |
+
},
|
| 185 |
+
"class_type": "CLIPTextEncode"
|
| 186 |
+
},
|
| 187 |
+
"7": {
|
| 188 |
+
"inputs": {
|
| 189 |
+
"text": "low quality, blurry, distorted, bad anatomy",
|
| 190 |
+
"clip": [
|
| 191 |
+
"4",
|
| 192 |
+
1
|
| 193 |
+
]
|
| 194 |
+
},
|
| 195 |
+
"class_type": "CLIPTextEncode"
|
| 196 |
+
},
|
| 197 |
+
"8": {
|
| 198 |
+
"inputs": {
|
| 199 |
+
"samples": [
|
| 200 |
+
"3",
|
| 201 |
+
0
|
| 202 |
+
],
|
| 203 |
+
"vae": [
|
| 204 |
+
"4",
|
| 205 |
+
2
|
| 206 |
+
]
|
| 207 |
+
},
|
| 208 |
+
"class_type": "VAEDecode"
|
| 209 |
+
},
|
| 210 |
+
"9": {
|
| 211 |
+
"inputs": {
|
| 212 |
+
"filename_prefix": "output",
|
| 213 |
+
"images": [
|
| 214 |
+
"8",
|
| 215 |
+
0
|
| 216 |
+
]
|
| 217 |
+
},
|
| 218 |
+
"class_type": "SaveImage"
|
| 219 |
+
}
|
| 220 |
+
}</pre>
|
| 221 |
+
</div>
|
| 222 |
+
</div>
|
| 223 |
+
|
| 224 |
+
<script>
|
| 225 |
+
function copyToClipboard() {
|
| 226 |
+
const jsonContent = document.getElementById('json-content').textContent;
|
| 227 |
+
navigator.clipboard.writeText(jsonContent).then(() => {
|
| 228 |
+
const btn = event.target;
|
| 229 |
+
const originalText = btn.textContent;
|
| 230 |
+
btn.textContent = 'Copied!';
|
| 231 |
+
btn.classList.add('success');
|
| 232 |
+
setTimeout(() => {
|
| 233 |
+
btn.textContent = originalText;
|
| 234 |
+
btn.classList.remove('success');
|
| 235 |
+
}, 2000);
|
| 236 |
+
}).catch(err => {
|
| 237 |
+
alert('Failed to copy to clipboard');
|
| 238 |
+
});
|
| 239 |
+
}
|
| 240 |
+
|
| 241 |
+
function downloadJSON() {
|
| 242 |
+
const jsonContent = document.getElementById('json-content').textContent;
|
| 243 |
+
const blob = new Blob([jsonContent], { type: 'application/json' });
|
| 244 |
+
const url = URL.createObjectURL(blob);
|
| 245 |
+
const a = document.createElement('a');
|
| 246 |
+
a.href = url;
|
| 247 |
+
a.download = 'comfyui_workflow.json';
|
| 248 |
+
document.body.appendChild(a);
|
| 249 |
+
a.click();
|
| 250 |
+
document.body.removeChild(a);
|
| 251 |
+
URL.revokeObjectURL(url);
|
| 252 |
+
|
| 253 |
+
const btn = event.target;
|
| 254 |
+
const originalText = btn.textContent;
|
| 255 |
+
btn.textContent = 'Downloaded!';
|
| 256 |
+
btn.classList.add('success');
|
| 257 |
+
setTimeout(() => {
|
| 258 |
+
btn.textContent = originalText;
|
| 259 |
+
btn.classList.remove('success');
|
| 260 |
+
}, 2000);
|
| 261 |
+
}
|
| 262 |
+
|
| 263 |
+
// Add syntax highlighting
|
| 264 |
+
function highlightJSON() {
|
| 265 |
+
const content = document.getElementById('json-content');
|
| 266 |
+
let html = content.innerHTML;
|
| 267 |
+
|
| 268 |
+
// Highlight different JSON elements
|
| 269 |
+
html = html.replace(/"([^"]+)":/g, '<span class="json-key">"$1":</span>');
|
| 270 |
+
html = html.replace(/: "([^"]*)"/g, ': <span class="json-string">"$1"</span>');
|
| 271 |
+
html = html.replace(/: (-?\d+\.?\d*)/g, ': <span class="json-number">$1</span>');
|
| 272 |
+
html = html.replace(/: (true|false)/g, ': <span class="json-boolean">$1</span>');
|
| 273 |
+
html = html.replace(/: null/g, ': <span class="json-null">null</span>');
|
| 274 |
+
|
| 275 |
+
content.innerHTML = html;
|
| 276 |
+
}
|
| 277 |
+
|
| 278 |
+
// Apply syntax highlighting after page load
|
| 279 |
+
window.addEventListener('load', highlightJSON);
|
| 280 |
+
</script>
|
| 281 |
+
</body>
|
| 282 |
+
</html>
|