Spaces:
Runtime error
Runtime error
Fabrice-TIERCELIN
commited on
Commit
β’
70a8aa2
1
Parent(s):
336a1d0
From prod
Browse files
app.py
CHANGED
@@ -58,9 +58,6 @@ class Tango:
|
|
58 |
def generate(self, prompt, steps = 100, guidance = 3, samples = 1, disable_progress = True):
|
59 |
# Generate audio for a single prompt string
|
60 |
with torch.no_grad():
|
61 |
-
print(self.model.inference.__code__.co_varnames)
|
62 |
-
print(self.vae.decode_first_stage.__code__.co_varnames)
|
63 |
-
print(self.vae.decode_to_waveform.__code__.co_varnames)
|
64 |
latents = self.model.inference([prompt], self.scheduler, steps, guidance, samples, disable_progress = disable_progress)
|
65 |
mel = self.vae.decode_first_stage(latents)
|
66 |
wave = self.vae.decode_to_waveform(mel)
|
@@ -163,7 +160,7 @@ with gr.Blocks() as interface:
|
|
163 |
<li>If you need to generate <b>music</b>, I recommend to use <i>MusicGen</i>,</li>
|
164 |
</ul>
|
165 |
<br/>
|
166 |
-
π Slow process... ~
|
167 |
<a href='https://huggingface.co/spaces/Fabrice-TIERCELIN/Text-to-Audio?duplicate=true&hidden=public&hidden=public'><img src='https://img.shields.io/badge/-Duplicate%20Space-blue?labelColor=white&style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAP5JREFUOE+lk7FqAkEURY+ltunEgFXS2sZGIbXfEPdLlnxJyDdYB62sbbUKpLbVNhyYFzbrrA74YJlh9r079973psed0cvUD4A+4HoCjsA85X0Dfn/RBLBgBDxnQPfAEJgBY+A9gALA4tcbamSzS4xq4FOQAJgCDwV2CPKV8tZAJcAjMMkUe1vX+U+SMhfAJEHasQIWmXNN3abzDwHUrgcRGmYcgKe0bxrblHEB4E/pndMazNpSZGcsZdBlYJcEL9Afo75molJyM2FxmPgmgPqlWNLGfwZGG6UiyEvLzHYDmoPkDDiNm9JR9uboiONcBXrpY1qmgs21x1QwyZcpvxt9NS09PlsPAAAAAElFTkSuQmCC&logoWidth=14'></a>
|
168 |
<br/>
|
169 |
βοΈ You can use, modify and share the generated sounds but not for commercial uses.
|
@@ -172,7 +169,7 @@ with gr.Blocks() as interface:
|
|
172 |
input_text = gr.Textbox(label = "Prompt", value = "Snort of a horse", lines = 2, autofocus = True)
|
173 |
with gr.Accordion("Advanced options", open = False):
|
174 |
output_format = gr.Radio(label = "Output format", info = "The file you can dowload", choices = ["mp3", "wav"], value = "wav")
|
175 |
-
output_number = gr.Slider(label = "Number of generations", info = "1, 2 or 3 output files", minimum = 1, maximum = 3, value =
|
176 |
denoising_steps = gr.Slider(label = "Steps", info = "lower=faster & variant, higher=audio quality & similar", minimum = 10, maximum = 200, value = 10, step = 1, interactive = True)
|
177 |
guidance_scale = gr.Slider(label = "Guidance Scale", info = "lower=audio quality, higher=follow the prompt", minimum = 1, maximum = 10, value = 3, step = 0.1, interactive = True)
|
178 |
randomize_seed = gr.Checkbox(label = "\U0001F3B2 Randomize seed", value = True, info = "If checked, result is always different")
|
|
|
58 |
def generate(self, prompt, steps = 100, guidance = 3, samples = 1, disable_progress = True):
|
59 |
# Generate audio for a single prompt string
|
60 |
with torch.no_grad():
|
|
|
|
|
|
|
61 |
latents = self.model.inference([prompt], self.scheduler, steps, guidance, samples, disable_progress = disable_progress)
|
62 |
mel = self.vae.decode_first_stage(latents)
|
63 |
wave = self.vae.decode_to_waveform(mel)
|
|
|
160 |
<li>If you need to generate <b>music</b>, I recommend to use <i>MusicGen</i>,</li>
|
161 |
</ul>
|
162 |
<br/>
|
163 |
+
π Slow process... ~5 min. Your computer must <b><u>not</u></b> enter into standby mode.<br/>You can duplicate this space on a free account, it works on CPU.<br/>
|
164 |
<a href='https://huggingface.co/spaces/Fabrice-TIERCELIN/Text-to-Audio?duplicate=true&hidden=public&hidden=public'><img src='https://img.shields.io/badge/-Duplicate%20Space-blue?labelColor=white&style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAP5JREFUOE+lk7FqAkEURY+ltunEgFXS2sZGIbXfEPdLlnxJyDdYB62sbbUKpLbVNhyYFzbrrA74YJlh9r079973psed0cvUD4A+4HoCjsA85X0Dfn/RBLBgBDxnQPfAEJgBY+A9gALA4tcbamSzS4xq4FOQAJgCDwV2CPKV8tZAJcAjMMkUe1vX+U+SMhfAJEHasQIWmXNN3abzDwHUrgcRGmYcgKe0bxrblHEB4E/pndMazNpSZGcsZdBlYJcEL9Afo75molJyM2FxmPgmgPqlWNLGfwZGG6UiyEvLzHYDmoPkDDiNm9JR9uboiONcBXrpY1qmgs21x1QwyZcpvxt9NS09PlsPAAAAAElFTkSuQmCC&logoWidth=14'></a>
|
165 |
<br/>
|
166 |
βοΈ You can use, modify and share the generated sounds but not for commercial uses.
|
|
|
169 |
input_text = gr.Textbox(label = "Prompt", value = "Snort of a horse", lines = 2, autofocus = True)
|
170 |
with gr.Accordion("Advanced options", open = False):
|
171 |
output_format = gr.Radio(label = "Output format", info = "The file you can dowload", choices = ["mp3", "wav"], value = "wav")
|
172 |
+
output_number = gr.Slider(label = "Number of generations", info = "1, 2 or 3 output files", minimum = 1, maximum = 3, value = 1, step = 1, interactive = True)
|
173 |
denoising_steps = gr.Slider(label = "Steps", info = "lower=faster & variant, higher=audio quality & similar", minimum = 10, maximum = 200, value = 10, step = 1, interactive = True)
|
174 |
guidance_scale = gr.Slider(label = "Guidance Scale", info = "lower=audio quality, higher=follow the prompt", minimum = 1, maximum = 10, value = 3, step = 0.1, interactive = True)
|
175 |
randomize_seed = gr.Checkbox(label = "\U0001F3B2 Randomize seed", value = True, info = "If checked, result is always different")
|