futurespyhi commited on
Commit
921388c
·
1 Parent(s): be99110

increase quality

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -285,7 +285,7 @@ def validate_file_structure():
285
  print("✅ All required files found")
286
  return True
287
 
288
- @spaces.GPU(duration=300) # Increase GPU timeout to 15 minutes
289
  def generate_music_spaces(lyrics: str, genre: str, mood: str, progress=gr.Progress()) -> str:
290
  """
291
  Generate music using YuE model with high-performance Spaces configuration
@@ -359,14 +359,14 @@ def generate_music_spaces(lyrics: str, genre: str, mood: str, progress=gr.Progre
359
  "--stage2_model", "m-a-p/YuE-s2-1B-general",
360
  "--genre_txt", genre_file_path,
361
  "--lyrics_txt", lyrics_file_path,
362
- "--run_n_segments", "1", # Full segments for better quality
363
- "--stage2_batch_size", "2", # Higher batch size for speed
364
  "--output_dir", output_dir,
365
- "--max_new_tokens", "2000", # Full token count
366
- "--profile", "3", # Highest performance profile
367
  "--verbose", "3",
368
  "--prompt_start_time", "0",
369
- "--prompt_end_time", "20", # Full 30-second clips
370
  ]
371
 
372
  # Use flash attention if available, otherwise fallback
 
285
  print("✅ All required files found")
286
  return True
287
 
288
+ @spaces.GPU(duration=900) # Increase GPU timeout to 15 minutes
289
  def generate_music_spaces(lyrics: str, genre: str, mood: str, progress=gr.Progress()) -> str:
290
  """
291
  Generate music using YuE model with high-performance Spaces configuration
 
359
  "--stage2_model", "m-a-p/YuE-s2-1B-general",
360
  "--genre_txt", genre_file_path,
361
  "--lyrics_txt", lyrics_file_path,
362
+ "--run_n_segments", "2", # Full segments for better quality
363
+ "--stage2_batch_size", "4", # Higher batch size for speed
364
  "--output_dir", output_dir,
365
+ "--max_new_tokens", "3000", # Full token count
366
+ "--profile", "1", # Highest performance profile
367
  "--verbose", "3",
368
  "--prompt_start_time", "0",
369
+ "--prompt_end_time", "30", # Full 30-second clips
370
  ]
371
 
372
  # Use flash attention if available, otherwise fallback