189 Commits (a5af64d3ceb4c67f4048aa00083b093c96efc527)

Author SHA1 Message Date
comfyanonymous db8b59ecff Lower memory usage for loras in lowvram mode at the cost of perf. 12 months ago
comfyanonymous 0ed72befe1 Change log levels.
Logging level now defaults to info. --verbose sets it to debug.
12 months ago
comfyanonymous 65397ce601 Replace prints with logging and add --verbose argument. 12 months ago
comfyanonymous dce3555339 Add some tesla pascal GPUs to the fp16 working but slower list. 12 months ago
comfyanonymous 88f300401c Enable fp16 by default on mps. 1 year ago
comfyanonymous 929e266f3e Manual cast for bf16 on older GPUs. 1 year ago
comfyanonymous 0b3c50480c Make --force-fp32 disable loading models in bf16. 1 year ago
comfyanonymous f83109f09b Stable Cascade Stage C. 1 year ago
comfyanonymous aeaeca10bd Small refactor of is_device_* functions. 1 year ago
comfyanonymous 66e28ef45c Don't use is_bf16_supported to check for fp16 support. 1 year ago
comfyanonymous 24129d78e6 Speed up SDXL on 16xx series with fp16 weights and manual cast. 1 year ago
comfyanonymous 4b0239066d Always use fp16 for the text encoders. 1 year ago
comfyanonymous f9e55d8463 Only auto enable bf16 VAE on nvidia GPUs that actually support it. 1 year ago
comfyanonymous 1b103e0cb2 Add argument to run the VAE on the CPU. 1 year ago
comfyanonymous e1e322cf69 Load weights that can't be lowvramed to target device. 1 year ago
comfyanonymous a252963f95 --disable-smart-memory now unloads everything like it did originally. 1 year ago
comfyanonymous 36a7953142 Greatly improve lowvram sampling speed by getting rid of accelerate.
Let me know if this breaks anything.
1 year ago
comfyanonymous 2f9d6a97ec Add --deterministic option to make pytorch use deterministic algorithms. 1 year ago
comfyanonymous b0aab1e4ea Add an option --fp16-unet to force using fp16 for the unet. 1 year ago
comfyanonymous ba07cb748e Use faster manual cast for fp8 in unet. 1 year ago
comfyanonymous 57926635e8 Switch text encoder to manual cast.
Use fp16 text encoder weights for CPU inference to lower memory usage.
1 year ago
comfyanonymous 340177e6e8 Disable non blocking on mps. 1 year ago
comfyanonymous 9ac0b487ac Make --gpu-only put intermediate values in GPU memory instead of cpu. 1 year ago
comfyanonymous 2db86b4676 Slightly faster lora applying. 1 year ago
comfyanonymous ca82ade765 Use .itemsize to get dtype size for fp8. 1 year ago
comfyanonymous 31b0f6f3d8 UNET weights can now be stored in fp8.
--fp8_e4m3fn-unet and --fp8_e5m2-unet are the two different formats
supported by pytorch.
1 year ago
comfyanonymous 0cf4e86939 Add some command line arguments to store text encoder weights in fp8.
Pytorch supports two variants of fp8:
--fp8_e4m3fn-text-enc (the one that seems to give better results)
--fp8_e5m2-text-enc
1 year ago
comfyanonymous 7339479b10 Disable xformers when it can't load properly. 1 year ago
comfyanonymous dd4ba68b6e Allow different models to estimate memory usage differently. 1 year ago
comfyanonymous 8594c8be4d Empty the cache when torch cache is more than 25% free mem. 1 year ago
comfyanonymous c8013f73e5 Add some Quadro cards to the list of cards with broken fp16. 1 year ago
comfyanonymous fd4c5f07e7 Add a --bf16-unet to test running the unet in bf16. 1 year ago
comfyanonymous 9a55dadb4c Refactor code so model can be a dtype other than fp32 or fp16. 1 year ago
comfyanonymous 88733c997f pytorch_attention_enabled can now return True when xformers is enabled. 1 year ago
comfyanonymous 20d3852aa1 Pull some small changes from the other repo. 1 year ago
Simon Lui eec449ca8e Allow Intel GPUs to LoRA cast on GPU since it supports BF16 natively. 1 year ago
comfyanonymous 1cdfb3dba4 Only do the cast on the device if the device supports it. 1 year ago
comfyanonymous 321c5fa295 Enable pytorch attention by default on xpu. 1 year ago
comfyanonymous 0966d3ce82 Don't run text encoders on xpu because there are issues. 1 year ago
comfyanonymous 1938f5c5fe Add a force argument to soft_empty_cache to force a cache empty. 1 year ago
Simon Lui 4a0c4ce4ef Some fixes to generalize CUDA specific functionality to Intel or other GPUs. 1 year ago
comfyanonymous b8c7c770d3 Enable bf16-vae by default on ampere and up. 2 years ago
comfyanonymous a57b0c797b Fix lowvram model merging. 2 years ago
comfyanonymous f72780a7e3 The new smart memory management makes this unnecessary. 2 years ago
comfyanonymous 30eb92c3cb Code cleanups. 2 years ago
comfyanonymous 51dde87e97 Try to free enough vram for control lora inference. 2 years ago
comfyanonymous cc44ade79e Always shift text encoder to GPU when the device supports fp16. 2 years ago
comfyanonymous a6ef08a46a Even with forced fp16 the cpu device should never use it. 2 years ago
comfyanonymous f081017c1a Save memory by storing text encoder weights in fp16 in most situations.
Do inference in fp32 to make sure quality stays the exact same.
2 years ago
comfyanonymous 0d7b0a4dc7 Small cleanups. 2 years ago
Simon Lui 9225465975 Further tuning and fix mem_free_total. 2 years ago
Simon Lui 2c096e4260 Add ipex optimize and other enhancements for Intel GPUs based on recent memory changes. 2 years ago
comfyanonymous e9469e732d --disable-smart-memory now disables loading model directly to vram. 2 years ago
comfyanonymous 3aee33b54e Add --disable-smart-memory for those that want the old behaviour. 2 years ago
comfyanonymous 2be2742711 Fix issue with regular torch version. 2 years ago
comfyanonymous 89a0767abf Smarter memory management.
Try to keep models on the vram when possible.

Better lowvram mode for controlnets.
2 years ago
comfyanonymous 1ce0d8ad68 Add CMP 30HX card to the nvidia_16_series list. 2 years ago
comfyanonymous 4a77fcd6ab Only shift text encoder to vram when CPU cores are under 8. 2 years ago
comfyanonymous 3cd31d0e24 Lower CPU thread check for running the text encoder on the CPU vs GPU. 2 years ago
comfyanonymous 22f29d66ca Try to fix memory issue with lora. 2 years ago
comfyanonymous 4760c29380 Merge branch 'fix-AttributeError-module-'torch'-has-no-attribute-'mps'' of https://github.com/KarryCharon/ComfyUI 2 years ago
comfyanonymous 18885f803a Add MX450 and MX550 to list of cards with broken fp16. 2 years ago
comfyanonymous ff6b047a74 Fix device print on old torch version. 2 years ago
comfyanonymous 1679abd86d Add a command line argument to enable backend:cudaMallocAsync 2 years ago
comfyanonymous 5f57362613 Lower lora ram usage when in normal vram mode. 2 years ago
comfyanonymous 490771b7f4 Speed up lora loading a bit. 2 years ago
KarryCharon 3e2309f149 fix mps miss import 2 years ago
comfyanonymous 0ae81c03bb Empty cache after model unloading for normal vram and lower. 2 years ago
comfyanonymous e7bee85df8 Add arguments to run the VAE in fp16 or bf16 for testing. 2 years ago
comfyanonymous ddc6f12ad5 Disable autocast in unet for increased speed. 2 years ago
comfyanonymous 8d694cc450 Fix issue with OSX. 2 years ago
comfyanonymous dc9d1f31c8 Improvements for OSX. 2 years ago
comfyanonymous 2c4e0b49b7 Switch to fp16 on some cards when the model is too big. 2 years ago
comfyanonymous 6f3d9f52db Add a --force-fp16 argument to force fp16 for testing. 2 years ago
comfyanonymous 1c1b0e7299 --gpu-only now keeps the VAE on the device. 2 years ago
comfyanonymous 3b6fe51c1d Leave text_encoder on the CPU when it can handle it. 2 years ago
comfyanonymous b6a60fa696 Try to keep text encoders loaded and patched to increase speed.
load_model_gpu() is now used with the text encoder models instead of just
the unet.
2 years ago
comfyanonymous 97ee230682 Make highvram and normalvram shift the text encoders to vram and back.
This is faster on big text encoder models than running it on the CPU.
2 years ago
comfyanonymous 62db11683b Move unet to device right after loading on highvram mode. 2 years ago
comfyanonymous 8248babd44 Use pytorch attention by default on nvidia when xformers isn't present.
Add a new argument --use-quad-cross-attention
2 years ago
comfyanonymous f7edcfd927 Add a --gpu-only argument to keep and run everything on the GPU.
Make the CLIP model work on the GPU.
2 years ago
comfyanonymous fed0a4dd29 Some comments to say what the vram state options mean. 2 years ago
comfyanonymous 0a5fefd621 Cleanups and fixes for model_management.py
Hopefully fix regression on MPS and CPU.
2 years ago
comfyanonymous 67892b5ac5 Refactor and improve model_management code related to free memory. 2 years ago
space-nuko 499641ebf1 More accurate total 2 years ago
space-nuko b5dd15c67a System stats endpoint 2 years ago
comfyanonymous 5c38958e49 Tweak lowvram model memory so it's closer to what it was before. 2 years ago
comfyanonymous 94680732d3 Empty cache on mps. 2 years ago
comfyanonymous eb448dd8e1 Auto load model in lowvram if not enough memory. 2 years ago
comfyanonymous 3a1f47764d Print the torch device that is used on startup. 2 years ago
comfyanonymous 6fc4917634 Make maximum_batch_area take into account python2.0 attention function.
More conservative xformers maximum_batch_area.
2 years ago
comfyanonymous 678f933d38 maximum_batch_area for xformers.
Remove useless code.
2 years ago
comfyanonymous cb1551b819 Lowvram mode for gligen and fix some lowvram issues. 2 years ago
comfyanonymous 6ee11d7bc0 Fix import. 2 years ago
comfyanonymous bae4fb4a9d Fix imports. 2 years ago
comfyanonymous 056e5545ff Don't try to get vram from xpu or cuda when directml is enabled. 2 years ago
comfyanonymous 2ca934f7d4 You can now select the device index with: --directml id
Like this for example: --directml 1
2 years ago
comfyanonymous 3baded9892 Basic torch_directml support. Use --directml to use it. 2 years ago
comfyanonymous 5282f56434 Implement Linear hypernetworks.
Add a HypernetworkLoader node to use hypernetworks.
2 years ago
comfyanonymous 3696d1699a Add support for GLIGEN textbox model. 2 years ago