Skip to content

Commit 196b7a5

Browse files
committed
test ci
1 parent 5da7901 commit 196b7a5

File tree

2 files changed

+1085
-11
lines changed

2 files changed

+1085
-11
lines changed

notebooks/ace-step-music-generation/ace-step-music-generation.ipynb

Lines changed: 68 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@
8080
"import platform\n",
8181
"from pathlib import Path\n",
8282
"\n",
83-
"if not Path(\"ov_ace_helper.py\").exists():\n",
84-
" r = requests.get(url=\"https://raw.githubusercontent.com/openvinotoolkit/openvino_notebooks/latest/notebooks/ace-step-music-generation/ov_ace_helper.py\")\n",
85-
" open(\"ov_ace_helper.py\", \"w\").write(r.text)\n",
83+
"if not Path(\"ov_ace_helper_test.py\").exists():\n",
84+
" r = requests.get(url=\"https://raw.githubusercontent.com/openvinotoolkit/openvino_notebooks/latest/notebooks/ace-step-music-generation/ov_ace_helper_test.py\")\n",
85+
" open(\"ov_ace_helper_test.py\", \"w\").write(r.text)\n",
8686
"\n",
8787
"if not Path(\"gradio_helper.py\").exists():\n",
8888
" r = requests.get(url=\"https://raw.githubusercontent.com/openvinotoolkit/openvino_notebooks/latest/notebooks/ace-step-music-generation/gradio_helper.py\")\n",
@@ -390,7 +390,7 @@
390390
},
391391
{
392392
"cell_type": "code",
393-
"execution_count": 9,
393+
"execution_count": null,
394394
"id": "f9db0d8a",
395395
"metadata": {},
396396
"outputs": [
@@ -420,17 +420,74 @@
420420
],
421421
"source": [
422422
"import nncf\n",
423-
"from ov_ace_helper import convert_models\n",
424423
"\n",
425424
"if model_format.value == \"INT4\":\n",
426425
" weights_compression_config = {\"mode\": nncf.CompressWeightsMode.INT4_ASYM, \"group_size\": 128, \"ratio\": 0.8}\n",
427426
"elif model_format.value == \"INT8\":\n",
428427
" weights_compression_config = {\"mode\": nncf.CompressWeightsMode.INT8_ASYM}\n",
429428
"else:\n",
430-
" weights_compression_config = None\n",
429+
" weights_compression_config = None"
430+
]
431+
},
432+
{
433+
"cell_type": "code",
434+
"execution_count": null,
435+
"id": "c004eb47",
436+
"metadata": {},
437+
"outputs": [],
438+
"source": [
439+
"from ov_ace_helper_test import convert_text_encoder\n",
431440
"\n",
432441
"ov_converted_model_dir = \"ov_models\"\n",
433-
"convert_models(pipeline, model_dir=ov_converted_model_dir, orig_checkpoint_path=checkpoint_dir, quantization_config=weights_compression_config)"
442+
"convert_text_encoder(pipeline, model_dir=ov_converted_model_dir, orig_checkpoint_path=checkpoint_dir, quantization_config=weights_compression_config)"
443+
]
444+
},
445+
{
446+
"cell_type": "code",
447+
"execution_count": null,
448+
"id": "0b44aa58",
449+
"metadata": {},
450+
"outputs": [],
451+
"source": [
452+
"from ov_ace_helper_test import convert_tokenizer_ov\n",
453+
"\n",
454+
"convert_tokenizer_ov(pipeline, model_dir=ov_converted_model_dir, orig_checkpoint_path=checkpoint_dir, quantization_config=weights_compression_config)"
455+
]
456+
},
457+
{
458+
"cell_type": "code",
459+
"execution_count": null,
460+
"id": "d1f41973",
461+
"metadata": {},
462+
"outputs": [],
463+
"source": [
464+
"from ov_ace_helper_test import convert_vocoder\n",
465+
"\n",
466+
"convert_vocoder(pipeline, model_dir=ov_converted_model_dir, orig_checkpoint_path=checkpoint_dir, quantization_config=weights_compression_config)"
467+
]
468+
},
469+
{
470+
"cell_type": "code",
471+
"execution_count": null,
472+
"id": "d23e1ba9",
473+
"metadata": {},
474+
"outputs": [],
475+
"source": [
476+
"from ov_ace_helper_test import convert_transformer_models\n",
477+
"\n",
478+
"convert_transformer_models(pipeline, model_dir=ov_converted_model_dir, orig_checkpoint_path=checkpoint_dir, quantization_config=weights_compression_config)"
479+
]
480+
},
481+
{
482+
"cell_type": "code",
483+
"execution_count": null,
484+
"id": "ce5ed806",
485+
"metadata": {},
486+
"outputs": [],
487+
"source": [
488+
"from ov_ace_helper_test import convert_dcae\n",
489+
"\n",
490+
"convert_dcae(pipeline, model_dir=ov_converted_model_dir, orig_checkpoint_path=checkpoint_dir, quantization_config=weights_compression_config)"
434491
]
435492
},
436493
{
@@ -469,12 +526,12 @@
469526
},
470527
{
471528
"cell_type": "code",
472-
"execution_count": 11,
529+
"execution_count": null,
473530
"id": "a3d15fff",
474531
"metadata": {},
475532
"outputs": [],
476533
"source": [
477-
"from ov_ace_helper import OVACEStepPipeline\n",
534+
"from ov_ace_helper_test import OVACEStepPipeline\n",
478535
"\n",
479536
"ov_pipeline = OVACEStepPipeline()\n",
480537
"ov_pipeline.load_models(ov_models_path=ov_converted_model_dir, device=device.value)"
@@ -705,7 +762,7 @@
705762
},
706763
{
707764
"cell_type": "code",
708-
"execution_count": 18,
765+
"execution_count": null,
709766
"id": "2f456bc4",
710767
"metadata": {},
711768
"outputs": [
@@ -721,7 +778,7 @@
721778
}
722779
],
723780
"source": [
724-
"from ov_ace_helper import convert_transformer_models\n",
781+
"from ov_ace_helper_test import convert_transformer_models\n",
725782
"\n",
726783
"ov_models_lora = \"ov_models_lora\"\n",
727784
"\n",

0 commit comments

Comments
 (0)