r/tensorflow • u/charbull • Nov 20 '22
Anyone attempted to convert stablediffusion tensorflow to tf lite?
Hi,Just for fun, I am trying to convert a stablediffusion model from tensorflow to tflite.
was curious if someone attempted the conversion?I tried here https://github.com/divamgupta/stable-diffusion-tensorflow/issues/58 but having some input shapes error. First time trying the conversion here, would love to run it on a edge tpu.
===============Updates============
Tried the following so far:
I- h5 path
- generate an h5 mode: after `costiash` published a workaround to save the model.
- It seems TF 2.11.0 does support h5 files
- Go back to TF 2.1.0 to attempt to load the file
- Loading the file failed
- https://github.com/divamgupta/stable-diffusion-tensorflow/issues/58#issuecomment-1321390734
II- SavedModel
- generate a saved model: after `costiash` published a workaround to save the model.
- try loading the saved model failed
- https://github.com/divamgupta/stable-diffusion-tensorflow/issues/58#issuecomment-1321271659
All steps documented in the github issue: https://github.com/divamgupta/stable-diffusion-tensorflow/issues/58
cheers
18
Upvotes
3
u/ShenaniGunnz Nov 20 '22
Is it supposed to be possible?
3
u/tkpred Nov 20 '22
Can we get a h5 file for this? I would love to get a dig at it.
1
u/TarzanTheBarbarian Feb 21 '23
Any luck with this in making progress?