MCPcopy Create free account
hub / github.com/Arm-Examples/ML-examples / export

Function export

kleidiai-examples/audiogen-et/scripts/export_sao.py:126–150  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

124 logging.info("Finished AutoEncoder Model conversion.\n")
125
126def export(args) -> None:
127
128 torch.manual_seed(0)
129 device = torch.device("cpu")
130
131 # Load the model configuration
132 logging.info("Loading the AudioGen Checkpoint...")
133 with open(args.model_config, encoding="utf-8") as f:
134 model_config = json.load(f)
135 model, model_config = load_model(
136 model_config,
137 args.ckpt_path,
138 pretrained_name=None,
139 device=device,
140 )
141 logging.info("Model is loaded...")
142
143 # --------- Conditioners Model ---------
144 export_conditioners(model, args.output_path)
145
146 # --------- Dit Model ----------------
147 export_dit(model, args.output_path)
148
149 # --------- AutoEncoder Model ---------
150 export_autoencoder(model, args.output_path)
151
152def main():
153 parser = argparse.ArgumentParser()

Callers 1

mainFunction · 0.90

Calls 4

load_modelFunction · 0.90
export_conditionersFunction · 0.70
export_ditFunction · 0.70
export_autoencoderFunction · 0.70

Tested by

no test coverage detected