Open baselqt opened 1 year ago
@baselqt Convert it to OpenVINO IR format following the tutorial here: https://docs.openvino.ai/2023.1/notebooks/225-stable-diffusion-text-to-image-with-output.html And modify with the following code:
pipe1 = StableDiffusionPipeline.from_single_file('path/model.safetensors')
pipe = StableDiffusionPipeline.from_pretrained("prompthero/openjourney", unet=pipe1.unet).to("cpu")
@RedAndr Could you post a whole code how to convert a downloaded civitai model (based on Stable Diffusion 1-5) to OpenVINO? It would help people a lot.
@RedAndr i don't remember where anymore but you have to use stable diffusion notebook or tinysd notebook from openvino notebooks
you can go to huggingface website and search for your model, it has to have the diffusers tag with it, then copy the parts in the link before and after the last / for example https://huggingface.co/Yntec/epiCPhotoGasm will be Yntec/epiCPhotoGasm
and then place this in a part of the code in the jupiter notebook where it has a similar syntax, i dont really remeber it exactly but it should have the name /stablediffusion or something, its in the downloading models part
and run the cells one by one from the beggining hope this helps
@homevk15 Sure, here's my code: https://github.com/RedAndr/SD_PyTorch2ONNX/blob/main/Convert_Civitai_OpenVINO.py Let me know if it doesn't work for you.
i want to use a model from civitai.com which is in .safetensors format. how can i use it with the openvino toolkit ?