Comments (5)
It would be good to have the next improvements:
1)virtualenv
2)negative prompt
3)possibility to run in Intel GPU (iGPU)
Let me know if you want to make any tests or get some donations. I'm very interested in making this project working.
from sd_pytorch2onnx.
@homevk15
Let's remove TensorFlow dependencies since the model was successfully converted to ONNX format. We can disregard the warnings for now. The issue seems to be with converting the ONNX model to OpenVINO format. As a workaround, you can comment out the conversion line in the code and instead use the Model Optimizer tool to do the conversion:
mo --input_model unet/unet.onnx --compress_to_fp16
About the negative prompt, it can be easily added. Something like that:
bs_embed, seq_len, _ = uncond_embeddings.shape
uncond_embeddings = uncond_embeddings.view(bs_embed, seq_len, -1)
text_embeddings = torch.cat([uncond_embeddings, text_embeddings])
I don't have iGPU, so can't test the code on it.
from sd_pytorch2onnx.
After updating tensorflow-intel to tensorflow-intel-2.14.1 and installing openvino-dev[tensorflow2] I got success.
I got unet, text_encoder, vae_decoder, vae_encoder (.xml and .bin files).
The program didn't generate an image
I see only
Loading pipeline components...: 100%
without errors.
Do you know what to change to get an image in an output?
Also, please, update Convert_Civitai_OpenVINO with the code of negative prompt you posted. I'm new to this stuff. Thank you.
from sd_pytorch2onnx.
Yes, this code is intended only to convert a model. It doesn't generate images. For that you should use https://github.com/bes-dev/stable_diffusion.openvino
from sd_pytorch2onnx.
how opset calculated?
Is it opset = 16 for 512x512 images all the time?
After running demo.py (from https://github.com/bes-dev/stable_diffusion.openvino) with converted to OpenVINO model I got errors
Traceback (most recent call last):
File "D:\astable-diffusion\openvino_notebooks\notebooks\225-stable-diffusion-text-to-image\t6\demo.py", line 83, in
main(args)
File "D:\astable-diffusion\openvino_notebooks\notebooks\225-stable-diffusion-text-to-image\t6\demo.py", line 21, in main
scheduler = LMSDiscreteScheduler(
File "D:\Program Files\Python310\lib\site-packages\diffusers\configuration_utils.py", line 649, in inner_init
init(self, *args, **init_kwargs)
TypeError: LMSDiscreteScheduler.init() got an unexpected keyword argument 'tensor_format'
I don't know how to fix it.
from sd_pytorch2onnx.
Related Issues (2)
- Conversion failed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sd_pytorch2onnx.