diff --git a/LaunchFile/app.py b/LaunchFile/app.py index 71769aae..528ec23b 100644 --- a/LaunchFile/app.py +++ b/LaunchFile/app.py @@ -302,7 +302,8 @@ def print_system_info(): def flush(): gc.collect() - torch.cuda.empty_cache() + if torch.cuda.is_available(): + torch.cuda.empty_cache() def stop_generation():