mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Actually get correct primary device
This commit is contained in:
@@ -57,6 +57,10 @@ class BreakmodelConfig:
|
||||
return "cpu"
|
||||
elif torch.cuda.device_count() <= 0:
|
||||
return "cpu"
|
||||
|
||||
for device_index, blocks in enumerate(self.gpu_blocks):
|
||||
if blocks:
|
||||
return device_index
|
||||
return 0
|
||||
|
||||
def get_device_map(self, model: nn.Module) -> dict:
|
||||
|
Reference in New Issue
Block a user