Have you ever wondered what Lightning McQueen would look like as a human?
Me neither! — But here it is…
Not a member yet? Read for free here!
Have you ever wondered what Lightning McQueen would look like as a human?
If so, that’s pretty strange — but hey, I came up with the idea, so don’t worry!
But I can’t give you the answer straight away!
Then what’s the incentive for you to read the story?
Let’s begin by generating the other cast members:
- Sally Carrera
- And, of course, Mater


What we all have been waiting for…
🥁 Drumroll…
Lightning McQueen

How did we draw the cast as humans?
Simple answer: Generative AI
Here’s the Code
First, begin with the imports:
from diffusers import DiffusionPipeline
import torchContinue by downloading and initializing the model:
For Apple Silicon:
pipe = DiffusionPipeline.from_pretrained(
"stabilityai/stable-diffusion-xl-base-1.0",
torch_dtype=torch.float16,
use_safetensors=True,
variant="fp16"
).to("mps")For CUDA (Nvidia):
pipe = DiffusionPipeline.from_pretrained(
"stabilityai/stable-diffusion-xl-base-1.0",
torch_dtype=torch.float16,
use_safetensors=True,
variant="fp16"
).to("cuda")If you want to run it on the CPU instead, remove .to("...") at the end there!
Finally, let’s generate the image and display it:
prompt = "Mater from the movie Cars in human form"
images = pipe(prompt=prompt).images[0]
display(images)Note: The images used in this story are by the Pixlr AI image generator. The results from the stable diffusion model were too similar to the actual movie! 😅
Thank You
That’s all for today!
Please do let me know if there is any Python, AI, or machine learning content you would like to see more of!
Until next time!
Day 27 out of 30: Here’s yesterday’s story:
My Machine Learning PC:
Check out the model here: Stable Diffusion
The obligatory extra thank you for reaching the end! 🙏






