Update app.py
Browse files
    	
        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", " | 
| 136 | 
             
                    "--output_dir", f"{output_dir}",
         | 
| 137 | 
             
                    "--cuda_idx", "0",
         | 
| 138 | 
             
                    "--max_new_tokens", "3000",
         | 
| @@ -147,9 +147,7 @@ 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 | 
            -
                    " | 
| 151 | 
            -
                    "TORCH_DISTRIBUTED_DEBUG": "DETAIL",  # Added for better debugging
         | 
| 152 | 
            -
                    "CUDA_LAUNCH_BLOCKING": "0"  # Ensure asynchronous CUDA operations
         | 
| 153 | 
             
                })
         | 
| 154 |  | 
| 155 | 
             
                # 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", "6",  # 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 | 
            +
                    "TORCH_DISTRIBUTED_DEBUG": "DETAIL"  # Added for better debugging
         | 
|  | |
|  | |
| 151 | 
             
                })
         | 
| 152 |  | 
| 153 | 
             
                # Execute the command
         | 
 
			

