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
chenpangpang
parler-tts
Commits
6e6b2997
"vscode:/vscode.git/clone" did not exist on "8461b6d190a0ec3472678545b27288070b82890c"
Commit
6e6b2997
authored
Apr 08, 2024
by
Yoach Lacombe
Browse files
add push to hub scripts
parent
7ed694d8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
13 deletions
+16
-13
helpers/push_to_hub_scripts/push_dac_to_hub.py
helpers/push_to_hub_scripts/push_dac_to_hub.py
+5
-13
helpers/push_to_hub_scripts/push_trained_parler_tts_to_hub.py
...ers/push_to_hub_scripts/push_trained_parler_tts_to_hub.py
+11
-0
No files found.
push_dac_to_hub.py
→
helpers/push_to_hub_scripts/
push_dac_to_hub.py
View file @
6e6b2997
import
dac
from
parler_tts
import
DACConfig
,
DACModel
from
transformers
import
AutoConfig
,
AutoModel
from
transformers
import
EncodecFeatureExtractor
AutoConfig
.
register
(
"dac"
,
DACConfig
)
AutoModel
.
register
(
DACConfig
,
DACModel
)
# Download a model
model_path
=
dac
.
utils
.
download
(
model_type
=
"44khz"
)
model
=
dac
.
DAC
.
load
(
model_path
)
from
parler_tts
import
DACConfig
,
DACModel
hf_dac
=
DACModel
(
DACConfig
())
hf_dac
.
model
.
load_state_dict
(
model
.
state_dict
())
from
transformers
import
AutoConfig
,
AutoModel
AutoConfig
.
register
(
"dac"
,
DACConfig
)
AutoModel
.
register
(
DACConfig
,
DACModel
)
hf_dac
.
push_to_hub
(
"ylacombe/dac_44khZ_8kbps"
)
# DACConfig.register_for_auto_class()
# DACModel.register_for_auto_class("AutoModel")
from
transformers
import
EncodecFeatureExtractor
EncodecFeatureExtractor
(
sampling_rate
=
44100
).
push_to_hub
(
"ylacombe/dac_44khZ_8kbps"
)
helpers/push_to_hub_scripts/push_trained_parler_tts_to_hub.py
0 → 100644
View file @
6e6b2997
from
parler_tts
import
ParlerTTSForConditionalGeneration
from
transformers
import
AutoTokenizer
,
AutoFeatureExtractor
path
=
"TODO"
repo_id
=
"parler_tts_300M"
AutoFeatureExtractor
.
from_pretrained
(
"ylacombe/dac_44khZ_8kbps"
).
push_to_hub
(
repo_id
)
AutoTokenizer
.
from_pretrained
(
"google/t5-v1_1-base"
).
push_to_hub
(
repo_id
)
ParlerTTSForConditionalGeneration
.
from_pretrained
(
path
).
push_to_hub
(
repo_id
)
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