File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,20 @@ def run_llama_quantize():
123123 output_dir = os .path .dirname (output_file )
124124 temp_gguf_file = os .path .join (output_dir , "temporary_file_during_quantization" )
125125
126+ # Add cleanup of existing temp file
127+ if os .path .exists (temp_gguf_file ):
128+ try :
129+ os .remove (temp_gguf_file )
130+ process_text .insert (tk .END , "Cleaned up existing temporary file.\n " )
131+ process_text .see (tk .END )
132+ root .update ()
133+ except Exception as e :
134+ process_text .insert (tk .END , f"Error cleaning up temporary file: { e } \n " )
135+ process_text .see (tk .END )
136+ root .update ()
137+ enable_ui ()
138+ return
139+
126140 try :
127141 startupinfo = subprocess .STARTUPINFO ()
128142 startupinfo .dwFlags |= subprocess .STARTF_USESHOWWINDOW
You can’t perform that action at this time.
0 commit comments