jhj0517 commited on
Commit
b724669
·
1 Parent(s): 29cce95

Add `uvr_enable_offload` to the dataclass

Browse files
configs/default_parameters.yaml CHANGED
@@ -48,6 +48,7 @@ bgm_separation:
48
  model_size: "UVR-MDX-NET-Inst_HQ_4"
49
  segment_size: 256
50
  save_file: false
 
51
 
52
  translation:
53
  deepl:
 
48
  model_size: "UVR-MDX-NET-Inst_HQ_4"
49
  segment_size: 256
50
  save_file: false
51
+ enable_offload: true
52
 
53
  translation:
54
  deepl:
modules/whisper/whisper_parameter.py CHANGED
@@ -51,6 +51,7 @@ class WhisperParameters:
51
  uvr_device: gr.Dropdown
52
  uvr_segment_size: gr.Number
53
  uvr_save_file: gr.Checkbox
 
54
  """
55
  A data class for Gradio components of the Whisper Parameters. Use "before" Gradio pre-processing.
56
  This data class is used to mitigate the key-value problem between Gradio components and function parameters.
@@ -218,6 +219,10 @@ class WhisperParameters:
218
 
219
  uvr_save_file: gr.Checkbox
220
  This parameter is related to UVR. Boolean value that determines whether to save the file or not.
 
 
 
 
221
  """
222
 
223
  def as_list(self) -> list:
@@ -292,6 +297,7 @@ class WhisperValues:
292
  uvr_device: str = "cuda"
293
  uvr_segment_size: int = 256
294
  uvr_save_file: bool = False
 
295
  """
296
  A data class to use Whisper parameters.
297
  """
@@ -347,6 +353,7 @@ class WhisperValues:
347
  "model_size": self.uvr_model_size,
348
  "segment_size": self.uvr_segment_size,
349
  "save_file": self.uvr_save_file,
 
350
  },
351
  }
352
  return data
 
51
  uvr_device: gr.Dropdown
52
  uvr_segment_size: gr.Number
53
  uvr_save_file: gr.Checkbox
54
+ uvr_enable_offload: gr.Checkbox
55
  """
56
  A data class for Gradio components of the Whisper Parameters. Use "before" Gradio pre-processing.
57
  This data class is used to mitigate the key-value problem between Gradio components and function parameters.
 
219
 
220
  uvr_save_file: gr.Checkbox
221
  This parameter is related to UVR. Boolean value that determines whether to save the file or not.
222
+
223
+ uvr_enable_offload: gr.Checkbox
224
+ This parameter is related to UVR. Boolean value that determines whether to offload the UVR model or not
225
+ after each transcription.
226
  """
227
 
228
  def as_list(self) -> list:
 
297
  uvr_device: str = "cuda"
298
  uvr_segment_size: int = 256
299
  uvr_save_file: bool = False
300
+ uvr_enable_offload: bool = True
301
  """
302
  A data class to use Whisper parameters.
303
  """
 
353
  "model_size": self.uvr_model_size,
354
  "segment_size": self.uvr_segment_size,
355
  "save_file": self.uvr_save_file,
356
+ "enable_offload": self.uvr_enable_offload
357
  },
358
  }
359
  return data