Files
ComfyUI-SelVA/nodes/utils.py
Ethanfel 83b1da9520 chore: remove all PrismAudio code from main branch
- Delete prismaudio_core/, data_utils/, scripts/, docs/plans/
- Delete PrismAudio nodes (feature_extractor, feature_loader, model_loader, sampler, text_only)
- Delete PrismAudio workflows (video_to_audio, text_to_audio)
- Clean nodes/utils.py: rename PRISMAUDIO_CATEGORY → SELVA_CATEGORY, remove unused helpers
- Strip PrismAudio-only deps from requirements.txt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 17:58:31 +02:00

22 lines
484 B
Python

import torch
import comfy.model_management as mm
SELVA_CATEGORY = "SelVA"
def get_device():
return mm.get_torch_device()
def get_offload_device():
return mm.unet_offload_device()
def soft_empty_cache():
mm.soft_empty_cache()
def determine_offload_strategy(preference):
if preference != "auto":
return preference
free_mem = mm.get_free_memory(get_device())
if free_mem / (1024 ** 3) >= 16:
return "keep_in_vram"
return "offload_to_cpu"