ComfyUI/comfy
Thomas Ward c5a48b15bd
Make default hash lib configurable without code changes via CLI argument (#3947)
* cli_args: Add --duplicate-check-hash-function.

* server.py: compare_image_hash configurable hash function

Uses an argument added in cli_args to specify the type of hashing to default to for duplicate hash checking.  Uses an `eval()` to identify the specific hashlib class to utilize, but ultimately safely operates because we have specific options and only those options/choices in the arg parser.  So we don't have any unsafe input there.

* Add hasher() to node_helpers

* hashlib selection moved to node_helpers

* default-hashing-function instead of dupe checking hasher

This makes a default-hashing-function option instead of previous selected option.

* Use args.default_hashing_function

* Use safer handling for node_helpers.hasher()

Uses a safer handling method than `eval` to evaluate default hashing function.

* Stray parentheses are evil.

* Indentation fix.

Somehow when I hit save I didn't notice I missed a space to make indentation work proper.  Oops!
2024-07-16 18:27:09 -04:00
..
cldm Quick fix for the promax controlnet. 2024-07-14 10:07:36 -04:00
extra_samplers
k_diffusion
ldm
sd1_tokenizer
t2i_adapter
taesd
text_encoders Refactor: Move some code to the comfy/text_encoders folder. 2024-07-15 17:36:24 -04:00
checkpoint_pickle.py
cli_args.py Make default hash lib configurable without code changes via CLI argument (#3947) 2024-07-16 18:27:09 -04:00
clip_config_bigg.json
clip_model.py
clip_vision.py
clip_vision_config_g.json
clip_vision_config_h.json
clip_vision_config_vitl.json
conds.py
controlnet.py Add SetUnionControlNetType to set the type of the union controlnet model. 2024-07-16 17:04:53 -04:00
diffusers_convert.py
diffusers_load.py
gligen.py
latent_formats.py
lora.py Support AuraFlow Lora and loading model weights in diffusers format. 2024-07-13 13:51:40 -04:00
model_base.py
model_detection.py Support AuraFlow Lora and loading model weights in diffusers format. 2024-07-13 13:51:40 -04:00
model_management.py
model_patcher.py
model_sampling.py Allow model sampling to set number of timesteps. 2024-07-16 15:18:40 -04:00
ops.py
options.py
sample.py
sampler_helpers.py
samplers.py
sd.py Refactor: Move some code to the comfy/text_encoders folder. 2024-07-15 17:36:24 -04:00
sd1_clip.py
sd1_clip_config.json
sd2_clip.py
sd2_clip_config.json
sdxl_clip.py
supported_models.py Refactor: Move some code to the comfy/text_encoders folder. 2024-07-15 17:36:24 -04:00
supported_models_base.py
types.py
utils.py Support AuraFlow Lora and loading model weights in diffusers format. 2024-07-13 13:51:40 -04:00