mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Remove legacy no accelerate fallback code
Was causing issues with disk cache the old code had a `and not utils.HAS_ACCELERATE` preceding it (a variable which no longer exists), and since disk cache is accelerate only, there was no disk handling code in here. Anyway its bad so blast it
This commit is contained in:
@@ -302,13 +302,6 @@ class HFTorchInferenceModel(HFInferenceModel):
|
||||
return True
|
||||
|
||||
def _move_to_devices(self) -> None:
|
||||
if not utils.koboldai_vars.breakmodel:
|
||||
if utils.koboldai_vars.usegpu:
|
||||
self.model = self.model.half().to(utils.koboldai_vars.gpu_device)
|
||||
else:
|
||||
self.model = self.model.to("cpu").float()
|
||||
return
|
||||
|
||||
for key, value in self.model.state_dict().items():
|
||||
target_dtype = (
|
||||
torch.float32 if breakmodel.primary_device == "cpu" else torch.float16
|
||||
|
Reference in New Issue
Block a user