Skip to content
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

[Feature] Add custom models for OpenVINO #61

Closed
Disty0 opened this issue Nov 12, 2023 · 7 comments
Closed

[Feature] Add custom models for OpenVINO #61

Disty0 opened this issue Nov 12, 2023 · 7 comments
Labels
enhancement New feature or request

Comments

@Disty0
Copy link

Disty0 commented Nov 12, 2023

We can bake in the Lora, change the scheduler and convert it to OpenVINO for custom models.
But these models need a few changes in the pipeline:

  • Use OVStableDiffusionPipeline
  • Don't change the scheduler
  • Use batch size -1 for CFG == 1.0
  • We can use batch sizes if we use CFG > 1.0

Example OpenVINO space and custom model:

image

image

@Disty0 Disty0 changed the title Add custom models for OpenVINO [Feature] Add custom models for OpenVINO Nov 12, 2023
@rupeshs rupeshs added the enhancement New feature or request label Nov 12, 2023
@rupeshs
Copy link
Owner

rupeshs commented Nov 12, 2023

@Disty0 Nice, I just added it in the branch https://github.com/rupeshs/fastsdcpu/tree/add-custom-models-support-for-openvino , negative prompt also working.
However, the old model deinferno/LCM_Dreamshaper_v7-openvino is not working. How did you convert SoteMix to openvino?

@Disty0
Copy link
Author

Disty0 commented Nov 12, 2023

Wrote this script for LCM conversion:
https://github.com/vladmandic/automatic/blob/master/cli/lcm-convert.py

python lcm-convert.py --model Disty0/SoteMix --huggingface --name LCM_SoteMix --upload

or

python lcm-convert.py --model sotemix.safetensors --name LCM_SoteMix --upload

Add --no-half for FP32 weights.

Did OpenVINO conversion with optimum-cli:

optimum-cli export openvino --model Disty0/LCM_SoteMix LCM_SoteMix_OpenVINO

Then uploaded openvino files manually.

@rupeshs
Copy link
Owner

rupeshs commented Nov 12, 2023

@Disty0 thanks so it is LCM-LoRA,right? not directly distilled model like SimianLuo/LCM_Dreamshaper_v7

@Disty0
Copy link
Author

Disty0 commented Nov 12, 2023

@Disty0 thanks so it is LCM-LoRA,right? not directly distilled model like SimianLuo/LCM_Dreamshaper_v7

It's LCM LoRa baked in + replaced the scheduler with LCM.

Also my model has both PyTorch and OpenVINO weights in the same repo.

@rupeshs
Copy link
Owner

rupeshs commented Nov 12, 2023

@Disty0 cool so we can use any SD1.5 or sdxl models.

@rupeshs
Copy link
Owner

rupeshs commented Nov 12, 2023

@Disty0 Just created simple tools for the conversion, thanks for your script https://github.com/rupeshs/lcm-openvino-converter

@rupeshs
Copy link
Owner

rupeshs commented Nov 12, 2023

Released https://github.com/rupeshs/fastsdcpu/tree/v1.0.0-beta.13

@rupeshs rupeshs closed this as completed Nov 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants