mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-10 21:42:37 +08:00
Merge remote-tracking branch 'origin/master' into group-nodes
This commit is contained in:
commit
a92409c0ec
@ -339,7 +339,11 @@ def free_memory(memory_required, device, keep_loaded=[]):
|
||||
|
||||
if unloaded_model:
|
||||
soft_empty_cache()
|
||||
|
||||
else:
|
||||
if vram_state != VRAMState.HIGH_VRAM:
|
||||
mem_free_total, mem_free_torch = get_free_memory(device, torch_free_too=True)
|
||||
if mem_free_torch > mem_free_total * 0.25:
|
||||
soft_empty_cache()
|
||||
|
||||
def load_models_gpu(models, memory_required=0):
|
||||
global vram_state
|
||||
|
||||
@ -95,7 +95,9 @@ export function addValueControlWidget(node, targetWidget, defaultValue = "random
|
||||
* ranges and set them to min or max.*/
|
||||
if (targetWidget.value < min) targetWidget.value = min;
|
||||
|
||||
if (targetWidget.value > max) targetWidget.value = max;
|
||||
if (targetWidget.value > max)
|
||||
targetWidget.value = max;
|
||||
targetWidget.callback(targetWidget.value);
|
||||
}
|
||||
};
|
||||
return valueControl;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user