ghostai1 commited on
Commit
bbc42b6
·
verified ·
1 Parent(s): 1b95dbd

Update barks.py

Browse files
Files changed (1) hide show
  1. barks.py +2 -3
barks.py CHANGED
@@ -90,7 +90,7 @@ except Exception as e:
90
  def print_resource_usage(stage: str):
91
  print(f"--- {stage} ---")
92
  print(f"GPU Memory Allocated: {torch.cuda.memory_allocated() / (1024**3):.2f} GB")
93
- print(f"GPU Memory Reserved: {torch.cuda.memory_reserved() / (1024**3):.2f} GB")
94
  print(f"CPU Memory Used: {psutil.virtual_memory().percent}%")
95
  print(f"System RAM Available: {psutil.virtual_memory().available / (1024**3):.2f} GB")
96
  print("---------------")
@@ -283,11 +283,10 @@ def generate_vocals(vocal_prompt: str, total_duration: int):
283
 
284
  try:
285
  print("Generating vocals with Bark...")
286
- # Process vocal prompt with explicit padding and attention mask
287
  inputs = bark_processor(
288
  vocal_prompt,
289
  return_tensors="pt",
290
- padding=True,
291
  return_attention_mask=True
292
  ).to("cuda")
293
 
 
90
  def print_resource_usage(stage: str):
91
  print(f"--- {stage} ---")
92
  print(f"GPU Memory Allocated: {torch.cuda.memory_allocated() / (1024**3):.2f} GB")
93
+ print(f"GPU Memory Reserved: {torch.cuda.memory_reserved() / (1024**3):.2f) GB")
94
  print(f"CPU Memory Used: {psutil.virtual_memory().percent}%")
95
  print(f"System RAM Available: {psutil.virtual_memory().available / (1024**3):.2f} GB")
96
  print("---------------")
 
283
 
284
  try:
285
  print("Generating vocals with Bark...")
286
+ # Process vocal prompt with attention mask, relying on default padding
287
  inputs = bark_processor(
288
  vocal_prompt,
289
  return_tensors="pt",
 
290
  return_attention_mask=True
291
  ).to("cuda")
292