anycoder-ea48094f / index.html
Jonwi0706's picture
Upload folder using huggingface_hub
f2f365c verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ComfyUI Workflow</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
background-color: #000000;
color: #f5f5f7;
line-height: 1.6;
padding: 20px;
min-height: 100vh;
}
.container {
max-width: 1200px;
margin: 0 auto;
}
.header {
text-align: center;
margin-bottom: 40px;
padding: 40px 20px;
}
.header h1 {
font-size: 48px;
font-weight: 600;
color: #ffffff;
margin-bottom: 12px;
letter-spacing: -0.02em;
}
.header p {
font-size: 18px;
color: #86868b;
font-weight: 400;
}
.controls {
display: flex;
gap: 12px;
margin-bottom: 24px;
justify-content: center;
}
.btn {
padding: 12px 24px;
border: none;
border-radius: 24px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s;
font-family: inherit;
}
.btn-primary {
background: #ffffff;
color: #000000;
}
.btn-primary:hover {
background: #f5f5f7;
transform: scale(0.98);
}
.btn-secondary {
background: #1d1d1f;
color: #f5f5f7;
border: 1px solid #424245;
}
.btn-secondary:hover {
background: #2d2d2f;
transform: scale(0.98);
}
.json-container {
background-color: #1d1d1f;
border-radius: 16px;
padding: 32px;
overflow-x: auto;
border: 1px solid #424245;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}
pre {
margin: 0;
font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
font-size: 13px;
line-height: 1.6;
white-space: pre-wrap;
word-wrap: break-word;
}
.json-key {
color: #9cdcfe;
}
.json-string {
color: #ce9178;
}
.json-number {
color: #b5cea8;
}
.json-boolean {
color: #569cd6;
}
.json-null {
color: #569cd6;
}
.success {
color: #30d158;
}
@media (max-width: 768px) {
.header h1 {
font-size: 32px;
}
.controls {
flex-direction: column;
}
.json-container {
padding: 20px;
}
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>ComfyUI Workflow</h1>
<p>View and download your workflow JSON</p>
</div>
<div class="controls">
<button class="btn btn-primary" onclick="downloadJSON()">Download JSON</button>
<button class="btn btn-secondary" onclick="copyToClipboard()">Copy to Clipboard</button>
</div>
<div class="json-container">
<pre id="json-content">{
"last_node_id": 10,
"last_link_id": 14,
"nodes": [
{
"id": 1,
"type": "CheckpointLoaderSimple",
"pos": [
100,
100
],
"size": [
315,
100
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "model",
"type": "MODEL",
"links": [
1
],
"slot_index": 0
},
{
"name": "clip",
"type": "CLIP",
"links": [
3
],
"slot_index": 1
},
{
"name": "vae",
"type": "VAE",
"links": [
5
],
"slot_index": 2
}
],
"properties": {
"ckpt_name": "realisticVisionV51_v51VAE.safetensors"
}
},
{
"id": 2,
"type": "CLIPTextEncode",
"pos": [
100,
300
],
"size": [
315,
82
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 3
}
],
"outputs": [
{
"name": "conditioning",
"type": "CONDITIONING",
"links": [
2
],
"slot_index": 0
}
],
"properties": {
"text": "photograph of a {{instrument_name}} musical instrument, detailed view, realistic, studio lighting",
"clip": null
}
},
{
"id": 3,
"type": "KSampler",
"pos": [
520,
200
],
"size": [
402,
209
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 1
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 2
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 4
},
{
"name": "latent_image",
"type": "LATENT",
"link": 6
},
{
"name": "denoise",
"type": "FLOAT",
"link": 7
},
{
"name": "seed",
"type": "INT",
"link": 8
},
{
"name": "steps",
"type": "INT",
"link": 9
},
{
"name": "cfg",
"type": "FLOAT",
"link": 10
},
{
"name": "sampler_name",
"type": "COMBO",
"link": 11
},
{
"name": "scheduler",
"type": "COMBO",
"link": 12
},
{
"name": "sigma_max",
"type": "FLOAT",
"link": 13
},
{
"name": "sigma_min",
"type": "FLOAT",
"link": 14
},
{
"name": "start_at_step",
"type": "INT",
"link": 0
},
{
"name": "end_at_step",
"type": "INT",
"link": 0
}
],
"outputs": [
{
"name": "latent_image",
"type": "LATENT",
"links": [
9
],
"slot_index": 0
}
],
"properties": {
"seed": 123456789,
"scheduler": "euler",
"sample_denoise": 1,
"start_at_step": 0,
"end_at_step": 0,
"return_with_leftover_noise": false
}
},
{
"id": 4,
"type": "CLIPTextEncode",
"pos": [
100,
400
],
"size": [
315,
82
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 3
}
],
"outputs": [
{
"name": "conditioning",
"type": "CONDITIONING",
"links": [
4
],
"slot_index": 0
}
],
"properties": {
"text": "blurry, low quality, cartoon, painting, illustration",
"clip": null
}
},
{
"id": 5,
"type": "VAEDecode",
"pos": [
940,
200
],
"size": [
315,
82
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "vae",
"type": "VAE",
"link": 5
},
{
"name": "latents",
"type": "LATENT",
"link": 9
}
],
"outputs": [
{
"name": "image",
"type": "IMAGE",
"links": [
10
],
"slot_index": 0
}
],
"properties": {}
},
{
"id": 6,
"type": "EmptyLatentImage",
"pos": [
520,
100
],
"size": [
315,
82
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "latent_image",
"type": "LATENT",
"links": [
6
],
"slot_index": 0
}
],
"properties": {
"width": 512,
"height": 512,
"batch_size": 1
}
},
{
"id": 7,
"type": "FloatSlider",
"pos": [
520,
300
],
"size": [
315,
82
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "float",
"type": "FLOAT",
"links": [
7
],
"slot_index": 0
}
],
"properties": {
"value": 1,
"min": 0,
"max": 1,
"step": 0.01
}
},
{
"id": 8,
"type": "IntSlider",
"pos": [
520,
400
],
"size": [
315,
82
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "int",
"type": "INT",
"links": [
8
],
"slot_index": 0
}
],
"properties": {
"value": 123456789,
"min": 0,
"max": 18446744073709551615,
"step": 1
}
},
{
"id": 9,
"type": "IntSlider",
"pos": [
520,
500
],
"size": [
315,
82
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "int",
"type": "INT",
"links": [
9
],
"slot_index": 0
}
],
"properties": {
"value": 20,
"min": 1,
"max": 100,
"step": 1
}
},
{
"id": 10,
"type": "FloatSlider",
"pos": [
520,
600
],
"size": [
315,
82
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "float",
"type": "FLOAT",
"links": [
10
],
"slot_index": 0
}
],
"properties": {
"value": 8,
"min": 1,
"max": 30,
"step": 0.5
}
}
],
"links": [
{
"id": 1,
"origin_id": 1,
"origin_slot": 0,
"target_id": 3,
"target_slot": 0
},
{
"id": 2,
"origin_id": 2,
"origin_slot": 0,
"target_id": 3,
"target_slot": 1
},
{
"id": 3,
"origin_id": 1,
"origin_slot": 1,
"target_id": 2,
"target_slot": 0
},
{
"id": 4,
"origin_id": 1,
"origin_slot": 1,
"target_id": 4,
"target_slot": 0
},
{
"id": 5,
"origin_id": 1,
"origin_slot": 2,
"target_id": 5,
"target_slot": 0
},
{
"id": 6,
"origin_id": 4,
"origin_slot": 0,
"target_id": 3,
"target_slot": 2
},
{
"id": 7,
"origin_id": 6,
"origin_slot": 0,
"target_id": 3,
"target_slot": 3
},
{
"id": 8,
"origin_id": 7,
"origin_slot": 0,
"target_id": 3,
"target_slot": 5
},
{
"id": 9,
"origin_id": 8,
"origin_slot": 0,
"target_id": 3,
"target_slot": 6
},
{
"id": 10,
"origin_id": 9,
"origin_slot": 0,
"target_id": 3,
"target_slot": 7
},
{
"id": 11,
"origin_id": 10,
"origin_slot": 0,
"target_id": 3,
"target_slot": 8
},
{
"id": 12,
"origin_id": 3,
"origin_slot": 0,
"target_id": 5,
"target_slot": 1
},
{
"id": 13,
"origin_id": 3,
"origin_slot": 9,
"target_id": 3,
"target_slot": 9
},
{
"id": 14,
"origin_id": 3,
"origin_slot": 10,
"target_id": 3,
"target_slot": 10
}
],
"groups": [],
"config": {},
"extra": {
"extensions": {}
}
}</pre>
</div>
</div>
<script>
function copyToClipboard() {
const jsonContent = document.getElementById('json-content').textContent;
navigator.clipboard.writeText(jsonContent).then(() => {
const btn = event.target;
const originalText = btn.textContent;
btn.textContent = 'Copied!';
btn.classList.add('success');
setTimeout(() => {
btn.textContent = originalText;
btn.classList.remove('success');
}, 2000);
}).catch(err => {
alert('Failed to copy to clipboard');
});
}
function downloadJSON() {
const jsonContent = document.getElementById('json-content').textContent;
const blob = new Blob([jsonContent], { type: 'application/json' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = 'comfyui_workflow.json';
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
URL.revokeObjectURL(url);
const btn = event.target;
const originalText = btn.textContent;
btn.textContent = 'Downloaded!';
btn.classList.add('success');
setTimeout(() => {
btn.textContent = originalText;
btn.classList.remove('success');
}, 2000);
}
// Add syntax highlighting
function highlightJSON() {
const content = document.getElementById('json-content');
let html = content.innerHTML;
// Highlight different JSON elements
html = html.replace(/"([^"]+)":/g, '<span class="json-key">"$1":</span>');
html = html.replace(/: "([^"]*)"/g, ': <span class="json-string">"$1"</span>');
html = html.replace(/: (-?\d+\.?\d*)/g, ': <span class="json-number">$1</span>');
html = html.replace(/: (true|false)/g, ': <span class="json-boolean">$1</span>');
html = html.replace(/: null/g, ': <span class="json-null">null</span>');
content.innerHTML = html;
}
// Apply syntax highlighting after page load
window.addEventListener('load', highlightJSON);
</script>
</body>
</html>