Spaces:
Running
Running
update loss
Browse files- __pycache__/inference.cpython-311.pyc +0 -0
- app.py +1 -1
- inference.py +2 -2
- modules/__pycache__/loss.cpython-311.pyc +0 -0
__pycache__/inference.cpython-311.pyc
CHANGED
Binary files a/__pycache__/inference.cpython-311.pyc and b/__pycache__/inference.cpython-311.pyc differ
|
|
app.py
CHANGED
@@ -236,7 +236,7 @@ with gr.Blocks() as demo:
|
|
236 |
with gr.Column(visible=False) as clap_options:
|
237 |
clap_target_type = gr.Radio(["Audio", "Text"], label="CLAP Target Type", value="Audio")
|
238 |
clap_text_prompt = gr.Textbox(label="CLAP Text Prompt", visible=False)
|
239 |
-
clap_distance_fn = gr.Dropdown([
|
240 |
|
241 |
def update_clap_options(loss_function):
|
242 |
if loss_function == "CLAPFeatureLoss":
|
|
|
236 |
with gr.Column(visible=False) as clap_options:
|
237 |
clap_target_type = gr.Radio(["Audio", "Text"], label="CLAP Target Type", value="Audio")
|
238 |
clap_text_prompt = gr.Textbox(label="CLAP Text Prompt", visible=False)
|
239 |
+
clap_distance_fn = gr.Dropdown(["cosine", "mse", "l1"], label="CLAP Distance Function", value="cosine")
|
240 |
|
241 |
def update_clap_options(loss_function):
|
242 |
if loss_function == "CLAPFeatureLoss":
|
inference.py
CHANGED
@@ -97,8 +97,8 @@ class MasteringStyleTransfer:
|
|
97 |
target = reference_tensor
|
98 |
else:
|
99 |
target = ito_config['clap_text_prompt']
|
100 |
-
|
101 |
-
total_loss =
|
102 |
|
103 |
if total_loss < min_loss:
|
104 |
min_loss = total_loss.item()
|
|
|
97 |
target = reference_tensor
|
98 |
else:
|
99 |
target = ito_config['clap_text_prompt']
|
100 |
+
print(f'ito_config clap_distance_fn: {ito_config["clap_distance_fn"]}')
|
101 |
+
total_loss = self.clap_loss(output_audio, target, self.args.sample_rate, distance_fn=ito_config['clap_distance_fn'])
|
102 |
|
103 |
if total_loss < min_loss:
|
104 |
min_loss = total_loss.item()
|
modules/__pycache__/loss.cpython-311.pyc
CHANGED
Binary files a/modules/__pycache__/loss.cpython-311.pyc and b/modules/__pycache__/loss.cpython-311.pyc differ
|
|