1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-02 23:14:49 +08:00

Lowvram mode for gligen and fix some lowvram issues.

This commit is contained in:
comfyanonymous
2023-05-05 18:01:21 -04:00
parent 9bd33b6bd4
commit cb1551b819
4 changed files with 41 additions and 11 deletions

View File

@@ -201,6 +201,9 @@ def load_controlnet_gpu(control_models):
return
if vram_state == VRAMState.LOW_VRAM or vram_state == VRAMState.NO_VRAM:
for m in control_models:
if hasattr(m, 'set_lowvram'):
m.set_lowvram(True)
#don't load controlnets like this if low vram because they will be loaded right before running and unloaded right after
return