divamgupta / stable-diffusion-tensorflow

Stable Diffusion in TensorFlow / Keras
Other
1.57k stars 227 forks source link

Refactor text2image as class #2

Closed fchollet closed 1 year ago

fchollet commented 1 year ago

...and make it faster via graph functions (i.e. calling models via .predict_on_batch() rather than __call__()), and add jit_compile option (XLA compilation).

On my system this is 1.3-1.4x faster. I expect it may be up to 2x faster on GPU.

fchollet commented 1 year ago

I've made more extensive modifications on my fork, that are becoming too heavy for a single PR. Closing this. Happy to reopen a PR for a more focused modification of your choice (e.g. switch to predict_on_batch()).