Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nuomanzz
TangoFlux
Commits
8d1cdcee
Commit
8d1cdcee
authored
Dec 31, 2024
by
hungchiayu1
Browse files
updates
parent
3da106a6
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
89 deletions
+32
-89
.gitignore
.gitignore
+1
-1
Inference.ipynb
Inference.ipynb
+20
-87
README.md
README.md
+10
-0
tangoflux.py
tangoflux.py
+1
-1
No files found.
.gitignore
View file @
8d1cdcee
__pycache__/
~
__pycache__/
*.py[cod]
*.py[cod]
*$py.class
*$py.class
...
...
Inference.ipynb
View file @
8d1cdcee
This diff is collapsed.
Click to expand it.
README.md
View file @
8d1cdcee
...
@@ -29,6 +29,16 @@ TangoFlux consists of FluxTransformer blocks which are Diffusion Transformer (Di
...
@@ -29,6 +29,16 @@ TangoFlux consists of FluxTransformer blocks which are Diffusion Transformer (Di
## Training TangoFlux
## Training TangoFlux
## Inference with TangoFlux
## Inference with TangoFlux
Download the TangoFlux model and generate audio from a text prompt:
```
import torchaudio
from tangoflux import TangoFluxInference
from IPython.display import Audio
model = TangoFluxInference(name='declare-lab/TangoFlux')
audio = model.generate('Hammer slowly hitting the wooden table', steps=50, duration=10)
Audio(data=audio, rate=44100)
```
## Evaluation Scripts
## Evaluation Scripts
...
...
tangoflux.py
View file @
8d1cdcee
...
@@ -9,7 +9,7 @@ from diffusers.training_utils import compute_density_for_timestep_sampling
...
@@ -9,7 +9,7 @@ from diffusers.training_utils import compute_density_for_timestep_sampling
import
copy
import
copy
import
torch.nn.functional
as
F
import
torch.nn.functional
as
F
import
numpy
as
np
import
numpy
as
np
from
model
import
TangoFlux
from
src.
model
import
TangoFlux
from
huggingface_hub
import
snapshot_download
from
huggingface_hub
import
snapshot_download
from
tqdm
import
tqdm
from
tqdm
import
tqdm
from
typing
import
Optional
,
Union
,
List
from
typing
import
Optional
,
Union
,
List
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment