Spaces:
Starting
on
A10G
Starting
on
A10G
haoheliu
commited on
Commit
•
380571b
1
Parent(s):
bdab1da
bug on device
Browse files- .gitignore +2 -0
- audioldm/pipeline.py +1 -3
.gitignore
CHANGED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
*.pyc
|
2 |
+
__pycache__
|
audioldm/pipeline.py
CHANGED
@@ -40,8 +40,6 @@ def text_to_audio(text, batchsize=2, guidance_scale=2.5, n_gen=1, config=None):
|
|
40 |
config = yaml.load(open(config, "r"), Loader=yaml.FullLoader)
|
41 |
else:
|
42 |
config = default_audioldm_config()
|
43 |
-
|
44 |
-
# config["id"]["version"] = "%s_%s" % (config["id"]["name"], config["id"]["version"])
|
45 |
|
46 |
# Use text as condition instead of using waveform during training
|
47 |
config["model"]["params"]["device"] = device
|
@@ -56,7 +54,7 @@ def text_to_audio(text, batchsize=2, guidance_scale=2.5, n_gen=1, config=None):
|
|
56 |
latent_diffusion.load_state_dict(checkpoint["state_dict"])
|
57 |
|
58 |
latent_diffusion.eval()
|
59 |
-
latent_diffusion = latent_diffusion.
|
60 |
|
61 |
latent_diffusion.cond_stage_model.embed_mode = "text"
|
62 |
|
|
|
40 |
config = yaml.load(open(config, "r"), Loader=yaml.FullLoader)
|
41 |
else:
|
42 |
config = default_audioldm_config()
|
|
|
|
|
43 |
|
44 |
# Use text as condition instead of using waveform during training
|
45 |
config["model"]["params"]["device"] = device
|
|
|
54 |
latent_diffusion.load_state_dict(checkpoint["state_dict"])
|
55 |
|
56 |
latent_diffusion.eval()
|
57 |
+
latent_diffusion = latent_diffusion.to(device)
|
58 |
|
59 |
latent_diffusion.cond_stage_model.embed_mode = "text"
|
60 |
|