Update modules/whisper/whisper_base.py
Browse files
    	
        modules/whisper/whisper_base.py
    CHANGED
    
    | 
         @@ -568,14 +568,14 @@ class WhisperBase(ABC): 
     | 
|
| 568 | 
         
             
                    write_file(content, output_path)
         
     | 
| 569 | 
         
             
                    return content, output_path
         
     | 
| 570 | 
         | 
| 571 | 
         
            -
                def offload(self):
         
     | 
| 572 | 
         
            -
                    """Offload the model and free up the memory"""
         
     | 
| 573 | 
         
            -
                    if self.model is not None:
         
     | 
| 574 | 
         
            -
                        del self.model
         
     | 
| 575 | 
         
            -
                        self.model = None
         
     | 
| 576 | 
         
            -
                    if self.device == "cuda":
         
     | 
| 577 | 
         
            -
                        self.release_cuda_memory()
         
     | 
| 578 | 
         
            -
                    gc.collect()
         
     | 
| 579 | 
         | 
| 580 | 
         
             
                @staticmethod
         
     | 
| 581 | 
         
             
                def format_time(elapsed_time: float) -> str:
         
     | 
| 
         | 
|
| 568 | 
         
             
                    write_file(content, output_path)
         
     | 
| 569 | 
         
             
                    return content, output_path
         
     | 
| 570 | 
         | 
| 571 | 
         
            +
            #    def offload(self):
         
     | 
| 572 | 
         
            +
            #        """Offload the model and free up the memory"""
         
     | 
| 573 | 
         
            +
            #        if self.model is not None:
         
     | 
| 574 | 
         
            +
            #            del self.model
         
     | 
| 575 | 
         
            +
            #            self.model = None
         
     | 
| 576 | 
         
            +
            #        if self.device == "cuda":
         
     | 
| 577 | 
         
            +
            #            self.release_cuda_memory()
         
     | 
| 578 | 
         
            +
            #        gc.collect()
         
     | 
| 579 | 
         | 
| 580 | 
         
             
                @staticmethod
         
     | 
| 581 | 
         
             
                def format_time(elapsed_time: float) -> str:
         
     |