Skip to content

Commit

Permalink
chore: compability fix
Browse files Browse the repository at this point in the history
  • Loading branch information
GaiZhenbiao committed Feb 27, 2024
1 parent 5565f93 commit fb7f9bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/models/base_model.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import annotations

import asyncio
import gc
import json
import logging
import os
Expand All @@ -19,7 +18,6 @@
import colorama
import commentjson as cjson
import requests
import torch
import urllib3
from duckduckgo_search import DDGS
from huggingface_hub import hf_hub_download
Expand Down Expand Up @@ -1088,6 +1086,8 @@ def deinitialize(self):
pass

def clear_cuda_cache(self):
import gc
import torch
gc.collect()
torch.cuda.empty_cache()

Expand Down

0 comments on commit fb7f9bd

Please sign in to comment.