-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Clean up xcodec addition. #40271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Clean up xcodec addition. #40271
Conversation
@@ -220,7 +220,7 @@ def insert_dates(model_card_list: list[str]): | |||
|
|||
# If the dates info line does not exist, add it | |||
else: | |||
paper_link = get_paper_link(path=file_path) | |||
paper_link = get_paper_link(model_card=model_card, path=file_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixing bad get_paper_link
call
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very very nice to support more models! Kudos!
if arch and arch[0] == "WavLMModel": | ||
self.semantic_model_config = WavLMConfig(**semantic_model_config) | ||
elif arch and arch[0] == "HubertModel": | ||
self.semantic_model_config = HubertConfig(**semantic_model_config) | ||
else: | ||
# print warning that defaulting to HubertConfig | ||
logger.warning( | ||
f"Could not determine semantic model type from config architectures. Got {arch}. Defaulting to HubertConfig." | ||
) | ||
self.semantic_model_config = HubertConfig(**semantic_model_config) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AutoConfig should be used here
if encoder_channels is None: | ||
encoder_channels = self.semantic_model_config.hidden_size | ||
self.encoder_channels = encoder_channels |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- does the main model really need to know these?
- it is not possible for
encoder_channels
to be != self.semantic_model_config.hidden_size no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there's any reason for input_channels
, encoder_channels
, decoder_channels
output_channels
to be different from self.semantic_model_config.hidden_size
, so I'll remove those!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created new property to conveniently use within modeling
@property
def semantic_hidden_size(self) -> int:
return self.semantic_model_config.hidden_size
""" | ||
|
||
# fmt: off | ||
EXPECTED_OUTPUTS = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use fixtures
with a json for this!
[For maintainers] Suggested jobs to run (before merge) run-slow: auto, dac, xcodec |
What does this PR do?
Clean up recent model addition for X-Codec #38248