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

improvements #1

Open
wants to merge 98 commits into
base: master
Choose a base branch
from
Open

improvements #1

wants to merge 98 commits into from

Conversation

rdancer
Copy link

@rdancer rdancer commented Jul 7, 2024

comfyanonymous and others added 30 commits June 6, 2024 14:49
You can use the CLIPLoader to use the t5xxl only or the DualCLIPLoader to
use CLIP-L and CLIP-G only for sd3.
comfyanonymous and others added 30 commits June 27, 2024 02:54
…omfyanonymous#3895)

* Add linux integration test.

* Fix directory path.

* Add paths ignore.

* Fix conda env directory path.
Still missing the node to properly use it.
* Fix auto queue

* Detect added nodes via search

* Fix loading workflows

* Add button click style
The old _pp ones will be updated automatically to the regular ones with 2x
the cfg.

My fault for not checking what the "_pp" samplers actually did.
* Create CONTRIBUTING.md

* Add feature-request channel link.

* Remove discord links for channels.
* Bumping GitHub Actions versions

* Using LZMA2 for 7zip compression in Windows packaging
This change includes corrections for several spelling errors in the
documentation of example_node.py.example file.

These were previously raised by comfyanonymous#3157, but they missed a few.
* Add --no-custom-node cmd flag

* nit
…overwrite not specified (comfyanonymous#3472)

* Fix to comfyanonymous#3465. Prevent the, resaving of duplicate images if overwrite not specified

This is a fix to comfyanonymous#3465 

Adds function compare_image_hash to do a sha256 hash comparison between an uploaded image and existing images with matching file names. 

This changes the behavior so that only images having the same filename that are actually different are saved to input, existing images are instead now opened instead of resaved with increment. 

Currently, exact duplicates with the same filename are resave saved with an incremented filename in the format:

<filename> (n).ext 

with the code: 

```
while os.path.exists(filepath): 
                        filename = f"{split[0]} ({i}){split[1]}"
                        filepath = os.path.join(full_output_folder, filename)
                        i += 1
```

This commit changes this to: 

```
while os.path.exists(filepath): 
                        if compare_image_hash(filepath, image):
                            image_is_duplicate = True
                            break
                        filename = f"{split[0]} ({i}){split[1]}"
                        filepath = os.path.join(full_output_folder, filename)
                        i += 1
```

a check for if image_is_duplicate = False is done before saving the file. 

Currently, if you load the same image of a cat named cat.jpg into the LoadImage node 3 times, you will get 3 new files in your input folder with incremented file names.

With this change, you will now only have the single copy of cat.jpg, that will be re-opened instead of re-saved. 

However if you load 3 different images of cats named cat.jpg, you will get the expected behavior of having:
cat.jpg
cat (1).jpg
cat (2).jpg

This saves space and clutter. After checking my own input folder, I have 800+ images that are duplicates that were resaved with incremented file names amounting to more than 5GB of duplicated data.

* fixed typo in expression
This allows profiling.

TODO:

Hide this behind a config option, the log can get quite busy.
... where image1 and image2 both are batches of unequal size:

broadcast the smaller one to match the length of the bigger one
Note: if DEBUG_WAIT_FOR_DEBUGGER is set in the environment, ComfyUI will NOT WORK UNLESS DEBUGGER IS ATTACHED.

This happens at the very startup. It will print "Waiting for debugger attach..." to the log and wait!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.