Open shailesh837 opened 6 months ago
Hi @shailesh837, we are working on reproducing your issue.
For your first question, please set environment variables for optimal performance as below (before running your program):
export USE_XETLA=OFF
export SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=1
export SYCL_CACHE_PERSISTENT=1
For your second issue, please modify your code to save/load optimized model as below:
# Save the model
# Load and optimize the model, then save it
model= SpeechT5ForTextToSpeech.from_pretrained("microsoft/speecht5_tts")
from ipex_llm import optimize_model
model= optimize_model(model, modules_to_not_convert=["speech_decoder_postnet.feat_out",
"speech_decoder_postnet.prob_out"])
# Save the optimized model to disk
optimized_model_path= "speecht5_tts_optimized"
model.save_low_bit(optimized_model_path)
Then load the optimized model as below:
from ipex_llm.optimize import load_low_bit
model = SpeechT5ForTextToSpeech.from_pretrained("microsoft/speecht5_tts")
model= load_low_bit(model, optimized_model_path)
Note: We have already migrated bigdl-llm
into ipex-llm
, so please use ipex-llm
instead, you may see ipex-llm installation guide for more details.
I am using from older post from : issues of ipex-llm for TTS [text to speech] I have 2 issues: a) it takes 8 seconds for TTS on XPU than on CPU [3 sec] why ? b) When i run the code below , every time , it converts to int4, why can't it does once and save it local, i tried as well, it fails : 2024-05-06 23:56:05,898 - INFO - intel_extension_for_pytorch auto imported 2024-05-06 23:56:05,898 - INFO - Converting the current model to sym_int4 format.....
conda create -n speecht5-test python=3.9 conda activate speecht5-test
pip install --pre --upgrade bigdl-llm[xpu] -f https://developer.intel.com/ipex-whl-stable-xpu pip install datasets soundfile Runtime Configuration: following here
Code:
Saving Local folder, But it didn't worked ., got error:
Error while using saving code: