Skip to content

Commit 55b057b

Browse files
committed
removing things we wont use
1 parent 731397c commit 55b057b

File tree

5 files changed

+2640
-111
lines changed

5 files changed

+2640
-111
lines changed

README.md

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,8 @@
11
<div align="center">
22

3-
# ComfyUI
4-
**The most powerful and modular diffusion model GUI and backend.**
5-
6-
7-
[![Website][website-shield]][website-url]
8-
[![Dynamic JSON Badge][discord-shield]][discord-url]
9-
[![Matrix][matrix-shield]][matrix-url]
10-
<br>
11-
[![][github-release-shield]][github-release-link]
12-
[![][github-release-date-shield]][github-release-link]
13-
[![][github-downloads-shield]][github-downloads-link]
14-
[![][github-downloads-latest-shield]][github-downloads-link]
15-
16-
[matrix-shield]: https://img.shields.io/badge/Matrix-000000?style=flat&logo=matrix&logoColor=white
17-
[matrix-url]: https://app.element.io/#/room/%23comfyui_space%3Amatrix.org
18-
[website-shield]: https://img.shields.io/badge/ComfyOrg-4285F4?style=flat
19-
[website-url]: https://www.comfy.org/
20-
<!-- Workaround to display total user from https://github.com/badges/shields/issues/4500#issuecomment-2060079995 -->
21-
[discord-shield]: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fdiscord.com%2Fapi%2Finvites%2Fcomfyorg%3Fwith_counts%3Dtrue&query=%24.approximate_member_count&logo=discord&logoColor=white&label=Discord&color=green&suffix=%20total
22-
[discord-url]: https://www.comfy.org/discord
23-
24-
[github-release-shield]: https://img.shields.io/github/v/release/comfyanonymous/ComfyUI?style=flat&sort=semver
25-
[github-release-link]: https://github.com/comfyanonymous/ComfyUI/releases
26-
[github-release-date-shield]: https://img.shields.io/github/release-date/comfyanonymous/ComfyUI?style=flat
27-
[github-downloads-shield]: https://img.shields.io/github/downloads/comfyanonymous/ComfyUI/total?style=flat
28-
[github-downloads-latest-shield]: https://img.shields.io/github/downloads/comfyanonymous/ComfyUI/latest/total?style=flat&label=downloads%40latest
29-
[github-downloads-link]: https://github.com/comfyanonymous/ComfyUI/releases
3+
# ComfyUI-Python
4+
**Node Based Python Development Environment Based on ComfyUI**
5+
306

317
![ComfyUI Screenshot](https://github.com/user-attachments/assets/7ccaf2c1-9b72-41ae-9a89-5688c94b7abe)
328
</div>

execution.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -992,3 +992,4 @@ def get_flags(self, reset=True):
992992
return ret
993993
else:
994994
return self.flags.copy()
995+

nodes.py

Lines changed: 67 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), "comfy"))
2121

2222
import comfy.diffusers_load
23-
import comfy.samplers
23+
import comfy.samplersa
2424
import comfy.sample
2525
import comfy.sd
2626
import comfy.utils
@@ -204,7 +204,6 @@ def append(self, conditioning, strength):
204204
c = node_helpers.conditioning_set_values(conditioning, {"strength": strength})
205205
return (c, )
206206

207-
208207
class ConditioningSetMask:
209208
@classmethod
210209
def INPUT_TYPES(s):
@@ -392,7 +391,6 @@ def encode(self, vae, pixels, mask, grow_mask_by=6):
392391

393392
return ({"samples":t, "noise_mask": (mask_erosion[:,:,:x,:y].round())}, )
394393

395-
396394
class InpaintModelConditioning:
397395
@classmethod
398396
def INPUT_TYPES(s):
@@ -444,7 +442,6 @@ def encode(self, positive, negative, pixels, vae, mask, noise_mask=True):
444442
out.append(c)
445443
return (out[0], out[1], out_latent)
446444

447-
448445
class SaveLatent:
449446
def __init__(self):
450447
self.output_dir = folder_paths.get_output_directory()
@@ -495,7 +492,6 @@ def save(self, samples, filename_prefix="ComfyUI", prompt=None, extra_pnginfo=No
495492
comfy.utils.save_torch_file(output, file, metadata=metadata)
496493
return { "ui": { "latents": results } }
497494

498-
499495
class LoadLatent:
500496
@classmethod
501497
def INPUT_TYPES(s):
@@ -531,7 +527,6 @@ def VALIDATE_INPUTS(s, latent):
531527
return "Invalid latent file: {}".format(latent)
532528
return True
533529

534-
535530
class CheckpointLoader:
536531
@classmethod
537532
def INPUT_TYPES(s):
@@ -596,7 +591,6 @@ def load_checkpoint(self, model_path, output_vae=True, output_clip=True):
596591

597592
return comfy.diffusers_load.load_diffusers(model_path, output_vae=output_vae, output_clip=output_clip, embedding_directory=folder_paths.get_folder_paths("embeddings"))
598593

599-
600594
class unCLIPCheckpointLoader:
601595
@classmethod
602596
def INPUT_TYPES(s):
@@ -803,7 +797,6 @@ def load_controlnet(self, model, control_net_name):
803797
controlnet = comfy.controlnet.load_controlnet(controlnet_path, model)
804798
return (controlnet,)
805799

806-
807800
class ControlNetApply:
808801
@classmethod
809802
def INPUT_TYPES(s):
@@ -834,7 +827,6 @@ def apply_controlnet(self, conditioning, control_net, image, strength):
834827
c.append(n)
835828
return (c, )
836829

837-
838830
class ControlNetApplyAdvanced:
839831
@classmethod
840832
def INPUT_TYPES(s):
@@ -884,7 +876,6 @@ def apply_controlnet(self, positive, negative, control_net, image, strength, sta
884876
out.append(c)
885877
return (out[0], out[1])
886878

887-
888879
class UNETLoader:
889880
@classmethod
890881
def INPUT_TYPES(s):
@@ -1039,7 +1030,6 @@ def load_style_model(self, style_model_name):
10391030
style_model = comfy.sd.load_style_model(style_model_path)
10401031
return (style_model,)
10411032

1042-
10431033
class StyleModelApply:
10441034
@classmethod
10451035
def INPUT_TYPES(s):
@@ -1200,7 +1190,6 @@ def generate(self, width, height, batch_size=1):
12001190
latent = torch.zeros([batch_size, 4, height // 8, width // 8], device=self.device)
12011191
return ({"samples":latent}, )
12021192

1203-
12041193
class LatentFromBatch:
12051194
@classmethod
12061195
def INPUT_TYPES(s):
@@ -1763,7 +1752,6 @@ def VALIDATE_INPUTS(s, image):
17631752

17641753
return True
17651754

1766-
17671755
class LoadImageOutput(LoadImage):
17681756
@classmethod
17691757
def INPUT_TYPES(s):
@@ -1792,7 +1780,6 @@ def load_image_output(self, image):
17921780
def VALIDATE_INPUTS(s, image):
17931781
return True
17941782

1795-
17961783
class ImageScale:
17971784
upscale_methods = ["nearest-exact", "bilinear", "area", "bicubic", "lanczos"]
17981785
crop_methods = ["disabled", "center"]
@@ -1960,74 +1947,73 @@ def expand_image(self, image, left, top, right, bottom, feathering):
19601947

19611948
return (new_image, mask)
19621949

1963-
19641950
NODE_CLASS_MAPPINGS = {
1965-
"KSampler": KSampler,
1966-
"CheckpointLoaderSimple": CheckpointLoaderSimple,
1967-
"CLIPTextEncode": CLIPTextEncode,
1968-
"CLIPSetLastLayer": CLIPSetLastLayer,
1969-
"VAEDecode": VAEDecode,
1970-
"VAEEncode": VAEEncode,
1971-
"VAEEncodeForInpaint": VAEEncodeForInpaint,
1972-
"VAELoader": VAELoader,
1973-
"EmptyLatentImage": EmptyLatentImage,
1974-
"LatentUpscale": LatentUpscale,
1975-
"LatentUpscaleBy": LatentUpscaleBy,
1976-
"LatentFromBatch": LatentFromBatch,
1977-
"RepeatLatentBatch": RepeatLatentBatch,
1978-
"SaveImage": SaveImage,
1979-
"PreviewImage": PreviewImage,
1980-
"LoadImage": LoadImage,
1981-
"LoadImageMask": LoadImageMask,
1982-
"LoadImageOutput": LoadImageOutput,
1983-
"ImageScale": ImageScale,
1984-
"ImageScaleBy": ImageScaleBy,
1985-
"ImageInvert": ImageInvert,
1986-
"ImageBatch": ImageBatch,
1987-
"ImagePadForOutpaint": ImagePadForOutpaint,
1988-
"EmptyImage": EmptyImage,
1989-
"ConditioningAverage": ConditioningAverage ,
1990-
"ConditioningCombine": ConditioningCombine,
1991-
"ConditioningConcat": ConditioningConcat,
1992-
"ConditioningSetArea": ConditioningSetArea,
1993-
"ConditioningSetAreaPercentage": ConditioningSetAreaPercentage,
1994-
"ConditioningSetAreaStrength": ConditioningSetAreaStrength,
1995-
"ConditioningSetMask": ConditioningSetMask,
1996-
"KSamplerAdvanced": KSamplerAdvanced,
1997-
"SetLatentNoiseMask": SetLatentNoiseMask,
1998-
"LatentComposite": LatentComposite,
1999-
"LatentBlend": LatentBlend,
2000-
"LatentRotate": LatentRotate,
2001-
"LatentFlip": LatentFlip,
2002-
"LatentCrop": LatentCrop,
2003-
"LoraLoader": LoraLoader,
2004-
"CLIPLoader": CLIPLoader,
2005-
"UNETLoader": UNETLoader,
2006-
"DualCLIPLoader": DualCLIPLoader,
2007-
"CLIPVisionEncode": CLIPVisionEncode,
2008-
"StyleModelApply": StyleModelApply,
2009-
"unCLIPConditioning": unCLIPConditioning,
2010-
"ControlNetApply": ControlNetApply,
2011-
"ControlNetApplyAdvanced": ControlNetApplyAdvanced,
2012-
"ControlNetLoader": ControlNetLoader,
2013-
"DiffControlNetLoader": DiffControlNetLoader,
2014-
"StyleModelLoader": StyleModelLoader,
2015-
"CLIPVisionLoader": CLIPVisionLoader,
2016-
"VAEDecodeTiled": VAEDecodeTiled,
2017-
"VAEEncodeTiled": VAEEncodeTiled,
2018-
"unCLIPCheckpointLoader": unCLIPCheckpointLoader,
2019-
"GLIGENLoader": GLIGENLoader,
2020-
"GLIGENTextBoxApply": GLIGENTextBoxApply,
2021-
"InpaintModelConditioning": InpaintModelConditioning,
2022-
2023-
"CheckpointLoader": CheckpointLoader,
2024-
"DiffusersLoader": DiffusersLoader,
2025-
2026-
"LoadLatent": LoadLatent,
2027-
"SaveLatent": SaveLatent,
2028-
2029-
"ConditioningZeroOut": ConditioningZeroOut,
2030-
"ConditioningSetTimestepRange": ConditioningSetTimestepRange,
1951+
# "KSampler": KSampler,
1952+
# "CheckpointLoaderSimple": CheckpointLoaderSimple,
1953+
# "CLIPTextEncode": CLIPTextEncode,
1954+
# "CLIPSetLastLayer": CLIPSetLastLayer,
1955+
# "VAEDecode": VAEDecode,
1956+
# "VAEEncode": VAEEncode,
1957+
# "VAEEncodeForInpaint": VAEEncodeForInpaint,
1958+
# "VAELoader": VAELoader,
1959+
# "EmptyLatentImage": EmptyLatentImage,
1960+
# "LatentUpscale": LatentUpscale,
1961+
# "LatentUpscaleBy": LatentUpscaleBy,
1962+
# "LatentFromBatch": LatentFromBatch,
1963+
# "RepeatLatentBatch": RepeatLatentBatch,
1964+
# "SaveImage": SaveImage,
1965+
# "PreviewImage": PreviewImage,
1966+
# "LoadImage": LoadImage,
1967+
# "LoadImageMask": LoadImageMask,
1968+
# "LoadImageOutput": LoadImageOutput,
1969+
# "ImageScale": ImageScale,
1970+
# "ImageScaleBy": ImageScaleBy,
1971+
# "ImageInvert": ImageInvert,
1972+
# "ImageBatch": ImageBatch,
1973+
# "ImagePadForOutpaint": ImagePadForOutpaint,
1974+
# "EmptyImage": EmptyImage,
1975+
# "ConditioningAverage": ConditioningAverage ,
1976+
# "ConditioningCombine": ConditioningCombine,
1977+
# "ConditioningConcat": ConditioningConcat,
1978+
# "ConditioningSetArea": ConditioningSetArea,
1979+
# "ConditioningSetAreaPercentage": ConditioningSetAreaPercentage,
1980+
# "ConditioningSetAreaStrength": ConditioningSetAreaStrength,
1981+
# "ConditioningSetMask": ConditioningSetMask,
1982+
# "KSamplerAdvanced": KSamplerAdvanced,
1983+
# "SetLatentNoiseMask": SetLatentNoiseMask,
1984+
# "LatentComposite": LatentComposite,
1985+
# "LatentBlend": LatentBlend,
1986+
# "LatentRotate": LatentRotate,
1987+
# "LatentFlip": LatentFlip,
1988+
# "LatentCrop": LatentCrop,
1989+
# "LoraLoader": LoraLoader,
1990+
# "CLIPLoader": CLIPLoader,
1991+
# "UNETLoader": UNETLoader,
1992+
# "DualCLIPLoader": DualCLIPLoader,
1993+
# "CLIPVisionEncode": CLIPVisionEncode,
1994+
# "StyleModelApply": StyleModelApply,
1995+
# "unCLIPConditioning": unCLIPConditioning,
1996+
# "ControlNetApply": ControlNetApply,
1997+
# "ControlNetApplyAdvanced": ControlNetApplyAdvanced,
1998+
# "ControlNetLoader": ControlNetLoader,
1999+
# "DiffControlNetLoader": DiffControlNetLoader,
2000+
# "StyleModelLoader": StyleModelLoader,
2001+
# "CLIPVisionLoader": CLIPVisionLoader,
2002+
# "VAEDecodeTiled": VAEDecodeTiled,
2003+
# "VAEEncodeTiled": VAEEncodeTiled,
2004+
# "unCLIPCheckpointLoader": unCLIPCheckpointLoader,
2005+
# "GLIGENLoader": GLIGENLoader,
2006+
# "GLIGENTextBoxApply": GLIGENTextBoxApply,
2007+
# "InpaintModelConditioning": InpaintModelConditioning,
2008+
#
2009+
# "CheckpointLoader": CheckpointLoader,
2010+
# "DiffusersLoader": DiffusersLoader,
2011+
#
2012+
# "LoadLatent": LoadLatent,
2013+
# "SaveLatent": SaveLatent,
2014+
#
2015+
# "ConditioningZeroOut": ConditioningZeroOut,
2016+
# "ConditioningSetTimestepRange": ConditioningSetTimestepRange,
20312017
"LoraLoaderModelOnly": LoraLoaderModelOnly,
20322018
}
20332019

@@ -2103,7 +2089,6 @@ def expand_image(self, image, left, top, right, bottom, feathering):
21032089
# Dictionary of successfully loaded module names and associated directories.
21042090
LOADED_MODULE_DIRS = {}
21052091

2106-
21072092
def get_module_name(module_path: str) -> str:
21082093
"""
21092094
Returns the module name based on the given module path.
@@ -2125,7 +2110,6 @@ def get_module_name(module_path: str) -> str:
21252110
base_path = os.path.splitext(base_path)[0]
21262111
return base_path
21272112

2128-
21292113
def load_custom_node(module_path: str, ignore=set(), module_parent="custom_nodes") -> bool:
21302114
module_name = os.path.basename(module_path)
21312115
if os.path.isfile(module_path):
@@ -2276,7 +2260,6 @@ def init_builtin_extra_nodes():
22762260

22772261
return import_failed
22782262

2279-
22802263
def init_extra_nodes(init_custom_nodes=True):
22812264
import_failed = init_builtin_extra_nodes()
22822265

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ license = { file = "LICENSE" }
66
requires-python = ">=3.9"
77
dependencies = [
88
"aider-chat>=0.80.3",
9+
"einops>=0.8.1",
910
]
1011

1112
[project.urls]

0 commit comments

Comments
 (0)