mirror of
https://github.com/justUmen/Bjornulf_custom_nodes.git
synced 2026-03-25 14:25:44 -03:00
0.77
This commit is contained in:
@@ -56,4 +56,21 @@ class FreeVRAM:
|
||||
response.raise_for_status()
|
||||
print("HTTP request triggered successfully")
|
||||
except requests.exceptions.RequestException as e:
|
||||
print(f"Failed to trigger HTTP request: {e}")
|
||||
print(f"Failed to trigger HTTP request: {e}")
|
||||
|
||||
class PurgeCLIPNode:
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return {"required": {}}
|
||||
|
||||
RETURN_TYPES = ()
|
||||
FUNCTION = "purge_clip"
|
||||
CATEGORY = "utils"
|
||||
|
||||
def purge_clip(self):
|
||||
# Check if the CLIP model is accessible in the global scope
|
||||
global clip_model
|
||||
if 'clip_model' in globals():
|
||||
del clip_model # Delete the CLIP model reference
|
||||
torch.cuda.empty_cache() # Clear VRAM cache
|
||||
return ()
|
||||
Reference in New Issue
Block a user