Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -113,9 +113,9 @@ def generate_speech(text: str, speaker_name: str, cfg_scale: float = 1.5, progre
113
  inputs = PROCESSOR.process_input_with_cached_prompt(
114
  text=text.strip(), cached_prompt=all_prefilled_outputs, padding=True, return_tensors="pt", return_attention_mask=True
115
  )
116
- MODEL.to("cuda")
117
  for k, v in inputs.items():
118
- if torch.is_tensor(v): inputs[k] = v.to("cuda")
119
 
120
  progress(0.4, desc="Generating speech...")
121
  start_time = time.time()
 
113
  inputs = PROCESSOR.process_input_with_cached_prompt(
114
  text=text.strip(), cached_prompt=all_prefilled_outputs, padding=True, return_tensors="pt", return_attention_mask=True
115
  )
116
+ MODEL.to("cpu")
117
  for k, v in inputs.items():
118
+ if torch.is_tensor(v): inputs[k] = v.to("cpu")
119
 
120
  progress(0.4, desc="Generating speech...")
121
  start_time = time.time()