Skip to content

Commit

Permalink
Merge pull request #165 from tosaddler/patch-1
Browse files Browse the repository at this point in the history
Fix error with total_processes being cast to float
  • Loading branch information
VikParuchuri authored Jun 3, 2024
2 parents aa04cb4 + 3433a2b commit 2601864
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ def main():
# Dynamically set GPU allocation per task based on GPU ram
if settings.CUDA:
tasks_per_gpu = settings.INFERENCE_RAM // settings.VRAM_PER_TASK if settings.CUDA else 0
total_processes = min(tasks_per_gpu, total_processes)
total_processes = int(min(tasks_per_gpu, total_processes))
else:
total_processes = int(total_processes)

mp.set_start_method('spawn') # Required for CUDA, forkserver doesn't work
model_lst = load_all_models()
Expand Down

0 comments on commit 2601864

Please sign in to comment.