Commit Graph

221 Commits

Author SHA1 Message Date
comfyanonymous 2d880fec3a Add a node to zero out the cond to advanced/conditioning
The stability streamlit example passes a zero cond as the negative input
so using this for the negative input makes outputs match the streamlit.
2023-06-27 23:30:52 -04:00
comfyanonymous 9b93b920be Add CheckpointSave node to save checkpoints.
The created checkpoints contain workflow metadata that can be loaded by
dragging them on top of the UI or loading them with the "Load" button.

Checkpoints will be saved in fp16 or fp32 depending on the format ComfyUI
is using for inference on your hardware. To force fp32 use: --force-fp32

Anything that patches the model weights like merging or loras will be
saved.

The output directory is currently set to: output/checkpoints but that might
change in the future.
2023-06-26 12:22:27 -04:00
comfyanonymous 4eab00e14b Set the seed in the SDE samplers to make them more reproducible. 2023-06-25 03:04:57 -04:00
comfyanonymous cef6aa62b2 Add support for TAESD decoder for SDXL. 2023-06-25 02:38:14 -04:00
comfyanonymous 20f579d91d Add DualClipLoader to load clip models for SDXL.
Update LoadClip to load clip models for SDXL refiner.
2023-06-25 01:40:38 -04:00
comfyanonymous 05676942b7 Add some more transformer hooks and move tomesd to comfy_extras.
Tomesd now uses q instead of x to decide which tokens to merge because
it seems to give better results.
2023-06-24 03:30:22 -04:00
comfyanonymous 8607c2d42d Move latent scale factor from VAE to model. 2023-06-23 02:33:31 -04:00
comfyanonymous f87ec10a97 Support base SDXL and SDXL refiner models.
Large refactor of the model detection and loading code.
2023-06-22 13:03:50 -04:00
comfyanonymous bf3f271775 Add some nodes for basic model merging. 2023-06-20 19:17:03 -04:00
comfyanonymous 8c9c94b5f3 Add bicubic upscale method. 2023-06-17 01:54:33 -04:00
comfyanonymous 67833c83d8 Add ImageScaleBy node. 2023-06-12 01:14:04 -04:00
comfyanonymous c64ca8c0b2 Refactor unCLIP noise augment out of samplers.py 2023-06-11 04:01:18 -04:00
comfyanonymous a3a713b6c5 Refactor previews into one command line argument.
Clean up a few things.
2023-06-06 02:13:05 -04:00
space-nuko 8b4a6c19c2 Fix 2023-06-05 19:00:51 -05:00
space-nuko 3e17971acb preview method autodetection 2023-06-05 18:59:10 -05:00
space-nuko d5a28fadaa Add latent2rgb preview 2023-06-05 18:39:56 -05:00
space-nuko 70d72c4336 Slightly less vibrant sample 2023-06-05 15:26:56 -05:00
space-nuko 48f7ec750c Make previews into cli option 2023-06-05 13:19:02 -05:00
space-nuko f326a0a468 Make new LATENT_PREVIEWER type for declaring KSampler preview methods 2023-06-05 09:20:20 -05:00
space-nuko b4f434ee66 Preview sampled images with TAESD 2023-06-05 09:20:17 -05:00
comfyanonymous 0fc483dcfd Refactor diffusers model convert code to be able to reuse it. 2023-05-28 01:55:40 -04:00
space-nuko 4d1ed829d9 Don't load some model types if weight is zero 2023-05-26 19:33:30 -05:00
comfyanonymous c00bb1a0b7 Add a latent upscale by node. 2023-05-23 12:53:38 -04:00
comfyanonymous 34887b8885 Add experimental bislerp algorithm for latent upscaling.
It's like bilinear but with slerp.
2023-05-23 03:12:56 -04:00
comfyanonymous 6cc450579b Auto transpose images from exif data. 2023-05-22 00:22:24 -04:00
comfyanonymous 8bbd9815a9 Support loading fp16 latent files. 2023-05-19 02:15:32 -04:00
comfyanonymous 62a371e12b Load workflow from latent file. 2023-05-18 02:41:21 -04:00
comfyanonymous faf899ad5a LoadLatent and SaveLatent should behave like the LoadImage and SaveImage. 2023-05-18 00:09:12 -04:00
comfyanonymous a7375103b9 Some small changes to Load/SaveLatent. 2023-05-17 23:41:57 -04:00
Dr.Lt.Data e7f2816c6f
feat:Latent Save/Load (#662)
* wip

* latent dir

* fix

* fix

* now working

* mark todo

* remove server.py changes to separate PRt

---------

Co-authored-by: Lt.Dr.Data <lt.dr.data@gmail.com>
2023-05-17 23:40:28 -04:00
comfyanonymous 2ec6d1c6e3 Don't import custom nodes when the folder ends with .disabled 2023-05-15 03:31:03 -04:00
comfyanonymous c02a554bcf Make DiffusersLoader work with subfolders. 2023-05-15 03:25:24 -04:00
comfyanonymous acff543d66 Remove useless code. 2023-05-14 12:50:21 -04:00
comfyanonymous b0505eb7ab Return right type when none specified in upload route.
Switch time.time to time.perf_counter for custom node import times.
2023-05-13 15:31:22 -04:00
comfyanonymous db4d3a8494 Print if custom nodes imported successfully or not. 2023-05-13 13:23:42 -04:00
comfyanonymous 2ac744f662 Print all custom node import times. 2023-05-13 13:15:31 -04:00
comfyanonymous 92bf1cb61e Change message. 2023-05-13 13:05:52 -04:00
comfyanonymous cf439709b6 Load nodes in comfy_extras before custom nodes.
Change the slow import message.
2023-05-13 12:50:42 -04:00
comfyanonymous cb4b822398 Print custom nodes that take too much time to import. 2023-05-13 11:54:45 -04:00
BlenderNeko 1201d2eae5
Make nodes map over input lists (#579)
* allow nodes to map over lists

* make work with IS_CHANGED and VALIDATE_INPUTS

* give list outputs distinct socket shape

* add rebatch node

* add batch index logic

* add repeat latent batch

* deal with noise mask edge cases in latentfrombatch
2023-05-13 11:15:45 -04:00
comfyanonymous c5c0ea666f noise_mask in latent should be in a single format. 2023-05-12 20:34:48 -04:00
comfyanonymous d43e45ce62 Remove print. 2023-05-09 10:29:58 -04:00
comfyanonymous 850daf0416 Masked editor changes.
Add a way to upload to subfolders.

Clean up code.

Fix some issues.
2023-05-08 14:37:51 -04:00
Dr.Lt.Data ae08fdb999
Clipspace Menu and MaskEditor application. (#548)
* Add clipspace feature.
* feat: copy content to clipspace
* feat: paste content from clipspace

Extend validation to allow for validating annotated_path in addition to other parameters.

Add support for annotated_filepath in folder_paths function.

Generalize the '/upload/image' API to allow for uploading images to the 'input', 'temp', or 'output' directories.

* rename contentClipboard -> clipspace

* Do deep copy for imgs on copy to clipspace.

* mask painting on clipspace

* add original_imgs into clipspace
* Preserve the original image when 'imgs' are modified

* robust patch & refactoring folder_paths about annotated_filepath

* wip

* Only show the Paste menu if the ComfyApp.clipspace is not empty

* clipspace feature added
maskeditor feature added

* instant refresh on paste

force triggering 'changed' on paste action

* enhance mask painting

smooth drawing
add brush_size +/- button

* robust patch

use mouseup event

* robust patch

again...

* subfolder fix on paste logic

attach subfolder if subfolder isn't empty

* event listener patch

add ], [ key event for brush size
remove listener on close

* Fix button positioning issue related to window height.
Change brush size from button to slider.

* clean commit

* clean code

* various bug fixes

* paste action
- prevent opening upload popup
- ensure rendering after widget_value update

* view api update
- support annotated_filepath

* maskeditor layout
- prevent covering button by hidden div

* remove dbg message

* Add cursor functionality to display brush size

* refactor: Replace brush preview feature with missionfloyd implementation

* missionfloyd implementation
* hiding brush preview off the canvas
* change brush size on wheel event

* keyup -> keydown event

* Update web/extensions/core/maskeditor.js

Co-authored-by: missionfloyd <missionfloyd@users.noreply.github.com>

* Add support for channel-specific image data retrieval in /view API to fix alpha mask loading issue

When loading an image with an alpha mask in JavaScript canvas, there is an issue where the alpha and RGB channels are premultiplied. To avoid reliance on JavaScript canvas, I added support for channel-specific image data retrieval in the "/view" API. This allows us to retrieve data for each channel separately and fix the alpha mask loading issue. The changes have been committed to the repository.

* Enable brush preview for key and slider events

* optimize

* preview fix

* robust patch

* fix copy (clipspace) action
imgs[0] copy -> whole imgs copy

* support batch images on clipspace, maskeditor

* copy/paste bug fixes for batch images
enhance selector preview on clipspace menu
add img_paste_mode option into clipspace menu

* crash fix

* print message if clipspace content cannot editable

* Update web/extensions/core/maskeditor.js

Co-authored-by: missionfloyd <missionfloyd@users.noreply.github.com>

* make default img_paste_mode to 'selected'

refactor space -> tab

* save clipspace files to input/clipspace instead of temp

* show "clipspace/filename.png" instead of 'filename.png [clipspace]' in LoadImage/LoadImageMask

* refresh fix related to FILE_COMBO

* Update web/extensions/core/maskeditor.js

Co-authored-by: missionfloyd <missionfloyd@users.noreply.github.com>

* Update web/extensions/core/maskeditor.js

Co-authored-by: missionfloyd <missionfloyd@users.noreply.github.com>

* adjust margin based on missionfloyd impelements

* mouse event -> pointer event

* pen, touch, mouse drawing patched and tested

* Update web/extensions/core/maskeditor.js

Co-authored-by: missionfloyd <missionfloyd@users.noreply.github.com>

* add comment about touch event.

---------

Co-authored-by: Lt.Dr.Data <lt.dr.data@gmail.com>
Co-authored-by: missionfloyd <missionfloyd@users.noreply.github.com>
2023-05-08 14:37:36 -04:00
comfyanonymous 678f933d38 maximum_batch_area for xformers.
Remove useless code.
2023-05-06 19:28:46 -04:00
comfyanonymous 908dc1d5a8 Add a total_steps value to sampler callback. 2023-05-03 12:58:10 -04:00
comfyanonymous 93c64afaa9 Use sampler callback instead of tqdm hook for progress bar. 2023-05-02 23:00:49 -04:00
comfyanonymous ba8a4c3667 Change latent resolution step to 8. 2023-05-02 14:17:51 -04:00
comfyanonymous 35f636b6c7 Expose grow_mask_by in VAEEncodeForInpaint.
The mask is dilated by grow_mask_by pixels after being applied to the pixel
space image. This helps reduce seams caused by inpainting. Higher value
means less seams.
2023-05-02 00:53:15 -04:00
comfyanonymous 0aa667ed33 Fix ConditioningAverage. 2023-04-30 17:33:43 -04:00