Stable Diffusion is now available as a Keras implementation, thanks to @divamgupta!


Original repo:…

This port has several advantages: (thread) Image
1. It's extremely readable. Go check out the code yourself! It's only about 500 LoC. I recommend this fork I started which makes the code more idiomatic & adds performance improvements (though the code quality of the original was excellent to start with):…
2. It's fast. How much faster? It depends on your hardware (try switching on `jit_compile` to see if you can get a greater speedup that way). Benchmark it on your system and let me know!
3. It works out of the box on M1 MacBooPros GPUs. Just install the proper requirements `requirements_m1.txt` and get going.

(This required no extra work on the repo.)
4. It can do TPU inference out of the box: just get a TPU VM and add a TPU strategy scope to the code. This can yield a dramatic speedup (and cost reduction) when doing large-batch inference.
5. It can also do multi-GPU inference out of the box (same, with a MirroredStrategy scope). It just... works.
6. You can export the underlying 3 Keras models to TFLite and TF.js.

This means that you can create AI art apps that run on the device (in the browser, with local GPU acceleration, or on an Android / iOS device, also with local hardware acceleration). No server costs!
Sounds exciting? Go try it, fork it, hack it. And if you want to learn more about what it looks like to work with Keras and TensorFlow, go read the code:…
Huge thanks to @divamgupta for creating this port! This is top-quality work that will benefit everyone doing creative AI.

I'm always amazed by the velocity of the open-source community 👍

• • •

Missing some Tweet in this thread? You can try to force a refresh

Keep Current with François Chollet

François Chollet Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!


Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @fchollet

Dec 3
I remember NeurIPS 2016 (it was called NIPS back then). Deep RL was the big thing. Deep RL everywhere.

Every conversation I had there was about how Deep RL trained in environments like OpenAI Universe (remember that) was going to lead to AGI within 5 to 10 years.
Self-driving was an easy side-problem that was about to see large-scale commerical deployment by 2018 -- if you were a teen you didn't need to ever even get your license.

Big tech companies like Google would not be hiring any engineers by 2025 because AI would do all the coding.
And of course radiologists would be out of a job by 2020. We needed to stop training new ones immediately.

The thing to understand about AI is that people have been saying this stuff for a long time. Not even 2016. Try the 1970s.
Read 14 tweets
Dec 1
I know it's hard to grok... but don't judge the performance of an AI system based on *specific* examples. *100%* of the value of an AI system comes from its ability to generalize broadly, which you *cannot see* through a few specific examples.
This is the real "AI effect": the tendency that people have to get overexcited as they watch a cool AI demo and assume it will generalize broadly beyond what they just saw.
The ultimate judge here, as always, is economic value created. If your AI is actually impressive, then you will be able to solve problems in the real world and you will be printing money in short order.
Read 4 tweets
Nov 29
What's the difference between skillfulness and general intelligence? Let's look at a simple example.

This AI can perform actions in Minecraft based on text commands, like "build a nether portal". This is really impressive! But is it generally intelligent?…
Here's the catch: it had to be trained on 300k hours of human gameplay with transcripts, the full Minecraft wiki, and millions of Reddit comments.

We've become really good at getting computers to do things as we provide them with a very extensive specification of how to do it.
This means that if a new game comes along, you won't be able to reuse this system. In fact, you won't be able to *retrain* this system, because the same amount of human-generated data won't be available for a brand new game.
Read 14 tweets
Nov 27
Someone should make a thread about the history of the narrative "recent social progress is causing societal decline/collapse" decade by decade, going back to the 5th century BC. Same old, same old.
100 years ago, giving women the right to vote was going to cause societal collapse. Fellas, the woke mind virus is giving your wives crazy ideas...
The replies here reminded me: lots of people still think women shouldn't be allowed to vote.
Read 5 tweets
Nov 27
The median age of the tech products I use is 10 years:

GSearch 1998
Gmail 2004
YT 2005
Spotify 2006
Twitter 2007
Chrome 2008
Android 2008
GitHub 2008
LINE 2011
Zoom 2012
Slack 2013
Telegram 2013
Lyft 2013
Signal 2014
GPhotos 2015
VSCode 2015
Discord 2015
Mastodon 2016
Meet 2017
If you asked a teenager, I bet it would be closer to 5 years. You'd find:

Instagram 2010
Snapchat 2011
TikTok 2016
BeReal 2020
What does this tell us?

1. Consumer tech moves fast. Very few products stay popular for 20+ years. There are no long-term moats.

2. Different decades see the rise of different product categories.

3. It takes 5+ years for a product to get really big.
Read 7 tweets
Nov 22
With AI systems, it's a bad idea to use a product demo (= absolute best case scenario) to extrapolate about the median case. The value of AI lies in its ability to generalize, which is entirely impossible to evaluate from a cherrypicked sample.
Product gets hyped based on demos. Gets released. Turns out to have weak generalization power beyond the demos and to fail to live up to expectations. Hype dies down. Rinse and repeat.
The only reliable way to evaluate the importance of an AI product / advance is to wait 1-2 years after public release and look at its economic impact. Game-changers have immediate, large impact, and drive entire new genres of *profitable* startups. Economic output can't be gamed.
Read 4 tweets

Did Thread Reader help you today?

Support us! We are indie developers!

This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!


0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy


3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!