Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add workflow png and json #1127

Merged
merged 4 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions onediff_comfy_nodes/docs/ComfyUI_Online_Quantization.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ Note that you can download all images in this page and then drag or load them on

#### Examples

| Baseline (non-optimized) | OneDiff(optimized) | OneDiff Quant(optimized) |
| [Baseline (non-optimized)](../workflows/sdxl-baseline.json) | [OneDiff(optimized)](../workflows/sdxl-onediff.json) | [OneDiff Quant(optimized)](../workflows/sdxl-quant.json) |
| ------------------------ | ------------------ | ------------------------ |
|![image](https://github.com/fmk345/pythonProject/assets/74238139/d5499822-e0b0-4186-831c-18f4c8921ec4)|![image](https://github.com/fmk345/pythonProject/assets/74238139/14feaaf4-6672-430c-85ff-d8c7d8b4d5a2)|![image](https://github.com/fmk345/pythonProject/assets/74238139/cb99f5d7-fb4f-421c-9783-a3adc4375759)|
|![image](../comfyui_workflow_images/sdxl-baseline.png)|![image](../comfyui_workflow_images/sdxl-onediff.png)|![image](../comfyui_workflow_images/sdxl-quant.png)|
XuZhang99 marked this conversation as resolved.
Show resolved Hide resolved

Model parameters can be referred to [Parameter Description](#parameter-description).

Expand All @@ -74,7 +74,7 @@ python main.py --gpu-only



### SD1.5
### [SD1.5](https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5)

We compared the performance of the stable-diffusion-v1-5 model in the three conditions and listed them in the subscript.

Expand All @@ -88,9 +88,9 @@ Note that you can download all images in this page and then drag or load them on

#### Examples

| Baseline (non-optimized) | OneDiff(optimized) | OneDiff Quant(optimized) |
| [Baseline (non-optimized)](../workflows/sd15-baseline.json) | [OneDiff(optimized)](../workflows/sd15-onediff.json) | [OneDiff Quant(optimized)](../workflows/sd15-quant.json) |
| ------------------------ | ------------------ | ------------------------ |
|![image](https://github.com/fmk345/pythonProject/assets/74238139/948271d2-24db-483f-9f33-81a64ae44c9e)|![image](https://github.com/fmk345/pythonProject/assets/74238139/08495a75-03f5-4e7d-93a2-b206ea755901)|![image](https://github.com/fmk345/pythonProject/assets/74238139/10c00186-fe72-4cca-92d2-2a672b8ffac5)|
|![image](../comfyui_workflow_images/sd15-baseline.png)|![image](../comfyui_workflow_images/sd15-onediff.png)|![image](../comfyui_workflow_images/sd15-quant.png)|

Model parameters can be referred to [Parameter Description](#parameter-description).

Expand All @@ -100,7 +100,7 @@ Model parameters can be referred to [Parameter Description](#parameter-descripti

```
cd ComfyUI
wget -O models/v1-5-pruned-emaonly.ckpt https://huggingface.co/runwayml/stable-diffusion-v1-5/blob/main/v1-5-pruned-emaonly.ckpt
wget -O models/checkpoints/v1-5-pruned-emaonly.safetensors https://huggingface.co/sd-legacy/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors
XuZhang99 marked this conversation as resolved.
Show resolved Hide resolved
```


Expand Down
107 changes: 107 additions & 0 deletions onediff_comfy_nodes/workflows/sd15-baseline.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
{
"3": {
"inputs": {
"seed": 1004586347945964,
"steps": 20,
"cfg": 8,
"sampler_name": "euler",
"scheduler": "normal",
"denoise": 1,
"model": [
"4",
0
],
"positive": [
"6",
0
],
"negative": [
"7",
0
],
"latent_image": [
"5",
0
]
},
"class_type": "KSampler",
"_meta": {
"title": "KSampler"
}
},
"4": {
"inputs": {
"ckpt_name": "v1-5-pruned-emaonly.safetensors"
},
"class_type": "CheckpointLoaderSimple",
"_meta": {
"title": "Load Checkpoint"
}
},
"5": {
"inputs": {
"width": 512,
"height": 512,
"batch_size": 4
},
"class_type": "EmptyLatentImage",
"_meta": {
"title": "Empty Latent Image"
}
},
XuZhang99 marked this conversation as resolved.
Show resolved Hide resolved
"6": {
"inputs": {
"text": "beautiful scenery nature glass bottle landscape, , purple galaxy bottle,",
"clip": [
"4",
1
]
},
"class_type": "CLIPTextEncode",
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"7": {
"inputs": {
"text": "text, watermark",
"clip": [
"4",
1
]
},
"class_type": "CLIPTextEncode",
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"8": {
"inputs": {
"samples": [
"3",
0
],
"vae": [
"4",
2
]
},
"class_type": "VAEDecode",
"_meta": {
"title": "VAE Decode"
}
},
"9": {
"inputs": {
"filename_prefix": "ComfyUI",
"images": [
"8",
0
]
},
"class_type": "SaveImage",
"_meta": {
"title": "Save Image"
}
}
XuZhang99 marked this conversation as resolved.
Show resolved Hide resolved
}
108 changes: 108 additions & 0 deletions onediff_comfy_nodes/workflows/sd15-onediff.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"3": {
"inputs": {
"seed": 879355500122229,
"steps": 20,
XuZhang99 marked this conversation as resolved.
Show resolved Hide resolved
"cfg": 8,
"sampler_name": "euler",
"scheduler": "normal",
"denoise": 1,
"model": [
"10",
0
],
"positive": [
"6",
0
],
"negative": [
"7",
0
],
"latent_image": [
"5",
0
]
},
"class_type": "KSampler",
"_meta": {
"title": "KSampler"
}
},
XuZhang99 marked this conversation as resolved.
Show resolved Hide resolved
"5": {
"inputs": {
"width": 512,
"height": 512,
"batch_size": 4
XuZhang99 marked this conversation as resolved.
Show resolved Hide resolved
},
"class_type": "EmptyLatentImage",
"_meta": {
"title": "Empty Latent Image"
}
},
"6": {
"inputs": {
"text": "beautiful scenery nature glass bottle landscape, , purple galaxy bottle,",
XuZhang99 marked this conversation as resolved.
Show resolved Hide resolved
"clip": [
"10",
1
]
},
"class_type": "CLIPTextEncode",
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"7": {
"inputs": {
"text": "text, watermark",
"clip": [
"10",
1
]
},
"class_type": "CLIPTextEncode",
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"8": {
"inputs": {
"samples": [
"3",
0
],
"vae": [
"10",
2
]
},
"class_type": "VAEDecode",
"_meta": {
"title": "VAE Decode"
}
},
"9": {
"inputs": {
"filename_prefix": "ComfyUI",
XuZhang99 marked this conversation as resolved.
Show resolved Hide resolved
"images": [
"8",
0
]
},
"class_type": "SaveImage",
"_meta": {
"title": "Save Image"
}
},
"10": {
"inputs": {
"ckpt_name": "v1-5-pruned-emaonly.safetensors",
"vae_speedup": "disable"
XuZhang99 marked this conversation as resolved.
Show resolved Hide resolved
},
"class_type": "OneDiffCheckpointLoaderSimple",
"_meta": {
"title": "Load Checkpoint - OneDiff"
}
}
}
136 changes: 136 additions & 0 deletions onediff_comfy_nodes/workflows/sd15-quant.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
{
"3": {
"inputs": {
"seed": 439837692531257,
"steps": 20,
"cfg": 8,
"sampler_name": "euler",
"scheduler": "normal",
"denoise": 1,
"model": [
"10",
0
],
"positive": [
"6",
0
],
"negative": [
"7",
0
],
"latent_image": [
"5",
0
]
},
"class_type": "KSampler",
"_meta": {
"title": "KSampler"
}
},
XuZhang99 marked this conversation as resolved.
Show resolved Hide resolved
"5": {
"inputs": {
"width": 512,
"height": 512,
"batch_size": 4
},
"class_type": "EmptyLatentImage",
"_meta": {
"title": "Empty Latent Image"
}
},
XuZhang99 marked this conversation as resolved.
Show resolved Hide resolved
"6": {
"inputs": {
"text": "beautiful scenery nature glass bottle landscape, , purple galaxy bottle,",
"clip": [
"10",
1
]
},
"class_type": "CLIPTextEncode",
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"7": {
"inputs": {
"text": "text, watermark",
"clip": [
"10",
1
]
},
"class_type": "CLIPTextEncode",
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
XuZhang99 marked this conversation as resolved.
Show resolved Hide resolved
"8": {
"inputs": {
"samples": [
"3",
0
],
"vae": [
"10",
2
]
},
"class_type": "VAEDecode",
"_meta": {
"title": "VAE Decode"
}
},
"9": {
"inputs": {
"filename_prefix": "ComfyUI",
"images": [
"8",
0
]
},
"class_type": "SaveImage",
"_meta": {
"title": "Save Image"
}
},
XuZhang99 marked this conversation as resolved.
Show resolved Hide resolved
"10": {
"inputs": {
"ckpt_name": "v1-5-pruned-emaonly.safetensors",
"vae_speedup": "disable",
"custom_booster": [
"12",
0
]
},
"class_type": "OneDiffCheckpointLoaderSimple",
"_meta": {
"title": "Load Checkpoint - OneDiff"
}
},
XuZhang99 marked this conversation as resolved.
Show resolved Hide resolved
"12": {
"inputs": {
"quantization_booster": [
"13",
0
]
},
"class_type": "OneDiffModelBooster",
"_meta": {
"title": "Apply Model Booster - OneDiff"
}
},
"13": {
"inputs": {
"quantized_conv_percentage": 100,
"quantized_linear_percentage": 100,
"conv_compute_density_threshold": 100,
"linear_compute_density_threshold": 300
},
"class_type": "OneDiffOnlineQuantizationBooster",
"_meta": {
"title": "Online OneFlow Quantizer - OneDiff"
}
}
}
Loading
Loading