mirror of
				https://github.com/KoboldAI/KoboldAI-Client.git
				synced 2025-06-05 21:59:24 +02:00 
			
		
		
		
	Remove duplicate torch_load definition
				
					
				
			This commit is contained in:
		| @@ -216,14 +216,6 @@ def use_lazy_torch_load(enable=True, callback: Optional[Callable] = None, demate | |||||||
|  |  | ||||||
|         torch.load = torch_load |         torch.load = torch_load | ||||||
|  |  | ||||||
|         def torch_load(f, map_location=None, pickle_module=pickle, **pickle_load_args): |  | ||||||
|             retval = old_torch_load(f=f, map_location=map_location, pickle_module=pickle_module, **pickle_load_args) |  | ||||||
|             if callback is not None: |  | ||||||
|                 callback(retval, f=f, map_location=map_location, pickle_module=pickle_module, **pickle_load_args) |  | ||||||
|             return retval |  | ||||||
|  |  | ||||||
|         torch.load = torch_load |  | ||||||
|  |  | ||||||
|         if dematerialized_modules: |         if dematerialized_modules: | ||||||
|             old_linear_init = torch.nn.Linear.__init__ |             old_linear_init = torch.nn.Linear.__init__ | ||||||
|             old_embedding_init = torch.nn.Embedding.__init__ |             old_embedding_init = torch.nn.Embedding.__init__ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Gnome Ann
					Gnome Ann