-
Notifications
You must be signed in to change notification settings - Fork 829
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
Notebook to run inference for LCM using Optimum Intel with OpenVINO #1696
Conversation
Initial commit for the notebook demonstrating how to use Optimum Intel and LCM
Improve the structure
…ebooks into raymondlo84-patch-1
Raymondlo84 patch 1/resolving conflict
Add some additional descriptions
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Who else shall we add as reviewer? |
@DimaPastushenkov thanks, important general notes:
|
…U isn't available
Reduce the size of the image
@eaidova, I have made all requested changes and set PR to "Ready for review". |
@DimaPastushenkov my suggestion to replace it with (it is the same image, just uploaded on github in different way, for doing that it is required to put image into any comment field on github, it will be automatically uploaded and in preview mode you can see link on you image) |
@eaidova , I have made GPU part optional. Please let me know whether it is better to make device selectable by device selection widget and will rework the notebook accordingly. |
View / edit / reply to this conversation on ReviewNB aleksandr-mokrov commented on 2024-02-22T13:10:38Z Line #1. %pip install -q "optimum-intel[diffusers]@git+https://github.com/huggingface/optimum-intel.git" "ipywidgets" "transformers>=4.33.0" --extra-index-url https://download.pytorch.org/whl/cpu Add openvino |
View / edit / reply to this conversation on ReviewNB aleksandr-mokrov commented on 2024-02-22T13:10:39Z Line #1. from openvino.runtime import Core Use please
import openvino as ov
|
View / edit / reply to this conversation on ReviewNB aleksandr-mokrov commented on 2024-02-22T13:10:40Z Line #1. from optimum.intel import OVLatentConsistencyModelPipeline It causes error: No module named 'onnx' If onnx is installed: KeyError: 'clip-text-model is not supported yet with the onnx backend. Only [] are supported. If you want to support onnx please propose a PR or open up an issue.'
|
@aleksandr-mokrov , I cannot reproduce the issue in Linux and in Windows. Could you please let me know which environment do you use? |
View / edit / reply to this conversation on ReviewNB aleksandr-mokrov commented on 2024-02-28T11:14:33Z Line #1. %pip install -q "openvino>=2023.3.0 Add " to the end |
I created new empty virtual environment, all packages are installed by running this notebook. Ubuntu, python3.10, torch==2.2.1+cpu After installing onnx and restarting the kernel it works. Add onnx for installation |
I have added onnx to the dependencies |
View / edit / reply to this conversation on ReviewNB eaidova commented on 2024-03-04T09:44:26Z something wrong with formatting, text should be places on the next line after back to top |
View / edit / reply to this conversation on ReviewNB eaidova commented on 2024-03-04T09:44:27Z Line #5. pipeline.save_pretrained("./cpu") why saving directory named cpu and why do you need to save pytorch model on disk at all if you always load it using hub (it is extra several GB disk space)? |
View / edit / reply to this conversation on ReviewNB eaidova commented on 2024-03-04T09:44:28Z Line #6. image.save("image_cpu.png") here also naming may mislead users as it is hard to understand it was generated by ov using cpu or pytorch |
View / edit / reply to this conversation on ReviewNB eaidova commented on 2024-03-04T09:44:29Z gc.collect();
for removing prints of free memory, it is recommended to add ; at the end |
View / edit / reply to this conversation on ReviewNB eaidova commented on 2024-03-04T09:44:30Z here also issue with formatting |
Notebook allows to run inference with the standard Diffusers pipeline and the Optimum Intel pipeline on CPU and GPU