-
Notifications
You must be signed in to change notification settings - Fork 461
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
about LCM onnx model #1497
Comments
Hi @Amin456789, To export latent consistency models you can either use the CLI : optimum-cli export onnx --model SimianLuo/LCM_Dreamshaper_v7 lcm_onnx/ or directly load the model with from optimum.onnxruntime import ORTLatentConsistencyModelPipeline
pipe = ORTLatentConsistencyModelPipeline.from_pretrained("SimianLuo/LCM_Dreamshaper_v7", export=True)
prompt = "sailing ship in storm by Leonardo da Vinci"
images = pipe(prompt=prompt, num_inference_steps=4, guidance_scale=8.0).images Also LCMs support was enabled in #1469 so you'll need to install |
thank u so much! |
@echarlaix another question, does this version of LCM run on CPU too? can this onnx model be fp16 or quantized to int8? |
Thanks for working on the support for latent consistency models! : ). When I run the above code I get the following error:
It looks like it can't find the scheduler. I've installed everything from source and when I load in the model using vanilla transformers I see that it has an associated scheulder:
I get:
Any thoughts on why the ORTLatentConsistencyModelPipeline can't find the scheduler in this case? |
I've converted it to fp16 with no issues and run ok (also on CPU) will upload to civitai if allowed by the owner of the model. |
@nbertagnolli, do you still have this issue with Great news, thanks for sharing @NeusZimmer ! |
Hi!
can someone please tell how we can use the LCM model in onnx? i see u guys made an script to run it in onnx, but what about the model? can we simply use the normal stable diffusion script onnx conversation for lcm model too? or we have to wait someone make an conversation script?
or could someone upload onnx converted of LCM model on huggingface and share it with us please?
kind regards
Who can help?
@echarlaix
The text was updated successfully, but these errors were encountered: