Comfy-Org/ComfyUI
The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Python★ 138,836+154 that day#8 on trending
E19.1/100
Duplication54
7.6% in python, bash, perlDead code3
37.3%Complexity41
65.3% The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
8.46%duplicated code · 24,145 of 285,511 lines
1,772clones in code
715code files of 1,169 scanned
14.86%duplicated over all files · 4,104 clones
Most complex files
- comfy/model_base.py737 cx
- comfy/model_management.py735 cx
- comfy/model_patcher.py682 cx
- comfy/sd.py584 cx
- comfy/ops.py567 cx
- comfy_api/latest/_input_impl/video_types.py513 cx
- comfy_extras/nodes_mesh_postprocess.py474 cx
- comfy_api/latest/_io.py453 cx
- comfy/k_diffusion/sampling.py425 cx
- comfy/ldm/seedvr/vae.py408 cx
Dead code 37.29% unused · 378 findings
- comfy_api_nodes/nodes_bytedance.pyunused-file
- comfy_extras/nodes_mesh_postprocess.pyunused-file
- comfy_api_nodes/nodes_wan.pyunused-file
- comfy_api_nodes/nodes_kling.pyunused-file
- comfy_api_nodes/nodes_tripo.pyunused-file
- comfy_api_nodes/nodes_gemini.pyunused-file
- comfy_extras/nodes_dataset.pyunused-file
- comfy_extras/nodes_images.pyunused-file
- comfy_api_nodes/nodes_vidu.pyunused-file
- comfy_api_nodes/nodes_bria.pyunused-file
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code, and 1 generated file: comfyui_version.py.
Largest clones in the code
- 22 lines in 20 placespython85 tokenscomfy_api_nodes/apis/__init__.py:3163–3184comfy_api_nodes/apis/__init__.py:3184–3205comfy_api_nodes/apis/__init__.py:3205–3226comfy_api_nodes/apis/__init__.py:3226–3247comfy_api_nodes/apis/__init__.py:3247–3268and 15 more
3163class StabilityImageGenrationSD3Response400(BaseModel): 3164 errors: List[str] = Field( 3165 ..., 3166 description='One or more error messages indicating what went wrong.', 3167 examples=[['some-field: is required']], 3168 min_length=1, 3169 ) 3170 id: str = Field( 3171 ..., 3172 description='A unique identifier associated with this error. Please include this in any [support tickets](https://kb.stability.ai/knowledge-base/kb-tic…First 10 of 22 lines.
- 13 lines in 19 placespython60 tokenscomfy_api_nodes/nodes_grok.py:672–684comfy_api_nodes/nodes_grok.py:939–952comfy_api_nodes/nodes_grok.py:1065–1077comfy_api_nodes/nodes_hitpaw.py:207–219comfy_api_nodes/nodes_kling.py:660–672and 14 more
672 ), 673], 674outputs=[ 675 IO.Video.Output(), 676], 677hidden=[ 678 IO.Hidden.auth_token_comfy_org, 679 IO.Hidden.api_key_comfy_org, 680 IO.Hidden.unique_id, 681],First 10 of 13 lines.
- 10 lines in 13 placespython61 tokenscomfy_extras/nodes_model_merging_model_specific.py:3–12comfy_extras/nodes_model_merging_model_specific.py:55–65comfy_extras/nodes_model_merging_model_specific.py:79–89comfy_extras/nodes_model_merging_model_specific.py:106–116comfy_extras/nodes_model_merging_model_specific.py:132–142and 8 more
3class ModelMergeSD1(comfy_extras.nodes_model_merging.ModelMergeBlocks): 4 CATEGORY = "model/merging/model specific" 5 @classmethod 6 def INPUT_TYPES(s): 7 arg_dict = { "model1": ("MODEL",), 8 "model2": ("MODEL",)} 9 10 argument = ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.01}) 11 12 arg_dict["time_embed."] = argument55class ModelMergeSD3_2B(comfy_extras.nodes_model_merging.ModelMergeBlocks): 56 CATEGORY = "model/merging/model specific" 57 58 @classmethod 59 def INPUT_TYPES(s): 60 arg_dict = { "model1": ("MODEL",), 61 "model2": ("MODEL",)} 62 63 argument = ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.01}) 64
7 more
- 19 lines in 6 placespython146 tokens
- 13 lines in 15 placespython51 tokens
- 92 lines in 2 placespython620 tokens
- 9 lines in 10 placespython68 tokens
- 11 lines in 13 placespython50 tokens
- 17 lines in 5 placespython144 tokens
- 11 lines in 10 placespython58 tokens
Largest clones over all files, tests and data included
- 27 lines in 41 placesjsondata files78 tokensblueprints/Audio Generation (Stable Audio 3 Medium Base).json:625–651blueprints/Audio Generation (Stable Audio 3 Medium Base).json:1623–1649blueprints/Canny to Image (Z-Image-Turbo).json:325–351blueprints/Character Replacement (SCAIL-2 Base).json:1026–1052blueprints/Control to Image (Anima LLLite).json:462–488and 36 more
625}, 626{ 627 "localized_name": "type", 628 "name": "type", 629 "type": "COMBO", 630 "widget": { 631 "name": "type" 632 }, 633 "link": null 634},First 10 of 27 lines.
- 989 lines in 2 placesjsondata files2,668 tokensblueprints/Audio Generation (Stable Audio 3 Medium Base).json:595–1583blueprints/Audio Generation (Stable Audio 3 Medium).json:595–1583
595 7, 596 "lcm", 597 "simple", 598 1 599 ] 600}, 601{ 602 "id": 29, 603 "type": "CLIPLoader", 604 "pos": [First 10 of 989 lines.
- 638 lines in 2 placesjsondata files2,012 tokensblueprints/First-Last-Frame to Video (LTX-2.3).json:2716–3353blueprints/First-Last-Frame to Video.json:2716–3353
2716 "ver": "0.18.1", 2717 "Node name for S&R": "ComfyMathExpression" 2718 }, 2719 "widgets_values": [ 2720 "a * b + 1" 2721 ] 2722 } 2723], 2724"groups": [ 2725 {First 10 of 638 lines.
- 601 lines in 2 placesjsondata files1,713 tokens
- 22 lines in 20 placespython85 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| python | 704 | 284,546 | 1,772 | 24,145 | 8.49% |
| bash | 10 | 797 | 0 | 0 | 0% |
| perl | 1 | 168 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| json | 154 | 233,919 | 2,155 | 74,343 | 31.78% |
| python | 949 | 336,092 | 1,912 | 25,667 | 7.64% |
| yaml | 36 | 8,188 | 37 | 564 | 6.89% |
| txt | 5 | 96,009 | 0 | 0 | 0% |
| markdown | 10 | 1,542 | 0 | 0 | 0% |
| bash | 10 | 797 | 0 | 0 | 0% |
| perl | 1 | 168 | 0 | 0 | 0% |
| ini | 1 | 84 | 0 | 0 | 0% |
| toml | 1 | 75 | 0 | 0 | 0% |
| text | 1 | 62 | 0 | 0 | 0% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Oct 19, 2026 | #8 | 138,836 (+154) | 1,169 | 676,951 | 4,104 | 14.86% | 8.46% | E 19.1 | 8f04fd6 |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.