Spaces:
Dejansimic
/
Runtime error

fffiloni commited on
Commit
14cf1ab
·
verified ·
1 Parent(s): 5932899

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -132,7 +132,7 @@ def infer(genre_txt_content, lyrics_txt_content):
132
  "--genre_txt", f"{genre_txt_path}",
133
  "--lyrics_txt", f"{lyrics_txt_path}",
134
  "--run_n_segments", "2",
135
- "--stage2_batch_size", "6", # Increased from 4 to 8
136
  "--output_dir", f"{output_dir}",
137
  "--cuda_idx", "0",
138
  "--max_new_tokens", "3000",
@@ -147,7 +147,9 @@ def infer(genre_txt_content, lyrics_txt_content):
147
  "CUDA_HOME": "/usr/local/cuda",
148
  "PATH": f"/usr/local/cuda/bin:{env.get('PATH', '')}",
149
  "LD_LIBRARY_PATH": f"/usr/local/cuda/lib64:{env.get('LD_LIBRARY_PATH', '')}",
150
- "TORCH_DISTRIBUTED_DEBUG": "DETAIL" # Added for better debugging
 
 
151
  })
152
 
153
  # Execute the command
 
132
  "--genre_txt", f"{genre_txt_path}",
133
  "--lyrics_txt", f"{lyrics_txt_path}",
134
  "--run_n_segments", "2",
135
+ "--stage2_batch_size", "8", # Increased from 4 to 8
136
  "--output_dir", f"{output_dir}",
137
  "--cuda_idx", "0",
138
  "--max_new_tokens", "3000",
 
147
  "CUDA_HOME": "/usr/local/cuda",
148
  "PATH": f"/usr/local/cuda/bin:{env.get('PATH', '')}",
149
  "LD_LIBRARY_PATH": f"/usr/local/cuda/lib64:{env.get('LD_LIBRARY_PATH', '')}",
150
+ "PYTORCH_CUDA_ALLOC_CONF": "max_split_size_mb:512,garbage_collection_threshold:0.8", # Added garbage collection threshold
151
+ "TORCH_DISTRIBUTED_DEBUG": "DETAIL", # Added for better debugging
152
+ "CUDA_LAUNCH_BLOCKING": "0" # Ensure asynchronous CUDA operations
153
  })
154
 
155
  # Execute the command