SlideShare a Scribd company logo
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2025. All rights reserved.
AI Photo Generation with
Python: A Developer’s
Guide
Nithish Raghunandanan
Developer Advocate
PyCon+Web 2025
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2025. All rights reserved. 2
About Me
● Background in Data/ML Engineering
● Developer Advocate @ Couchbase
● Building Integrations with Developer
Ecosystem
● Live in Munich, Germany
● Like to Hack stuff :)
@nithishr
3
4
This was 6 years ago 🤨
5
GAN Style Transfer
https://thisxdoesnotexist.com/
6
Do you remember Prisma?
7
Where are we
now?
8
Lots of Generative AI Models for Image Generation
9
Interesting Applications
10
Interesting Applications
11
Interesting Applications
Alternative: https://interiorai.com/
12
How do Models
Work?
13
Stable Diffusion Models
● Text to Image Generation
● Training
○ Noising: Add random noise to
images
○ Denoising: Learn to remove
noise
○ Guided by Text Embeddings
○ Latent Space Representation
14
Stable Diffusion Models
Inference
● Start with Random Noise
● Iteratively, reduce noise with
guidance from text
embeddings
● Image matches text input over
time
15
Let Us Build
16
Virtual Camera
● Location
● Weather
● Surroundings from
OpenStreetMap
● Inspired by Paragraphica
17
Fine Tuning Image Models
● Generate Personalized Images
● Few Example Images (5-20)
● Low-Rank Adaptation(LoRA)
18
Inpainting
● Replace parts of Image
● https://huggingface.co/spaces/
SkalskiP/FLUX.1-inpaint-dev
19
ControlNet
● Replace parts of Image
● Parts based on existing
content
● https://huggingface.co/spaces/
hysts/ControlNet-v1-1
20
Many More Applications
● Outpainting
● Upscaling
● Restore Old Images
● 3D Characters
● Run Models Locally
○ ComfyUI
○ DiffusionBee
21
Key Takeaways
22
Observations on Generating Realistic Images
● Look at examples of prompts & images from the community
○ https://prompthero.com/
● Good idea to use an LLM to refine the prompts
○ https://ai.gock.net/flux
● More steps leads to better results, especially with Flux.1 models
● Running locally needs a lot of RAM
● Cloud is quite cheap
● With smaller models
○ Text is still problematic
○ Some features like hands
23
Ethics
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2025. All rights reserved. 24
● How can we Identify AI generated content?
● How can we combat Deep Fakes?
● How can the Models get properly Licensed content?
● Reduce Bias in Training data
Challenges
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2025. All rights reserved. 25
AI Generated Videos?
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2025. All rights reserved. 26
AI Generated Games?
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2025. All rights reserved. 27
● Virtual Camera
○ https://github.com/nithishr/image_gen_experiments/tree/m
ain/virtual_camera
● Flux Fine Tuning
○ https://github.com/nithishr/image_gen_experiments/tree/m
ain/flux_fine_tuning
○ https://replicate.com/docs/get-started/fine-tune-with-flux
● Flux Inpainting
○ https://huggingface.co/spaces/SkalskiP/FLUX.1-inpaint-dev
● ControlNet
○ https://huggingface.co/spaces/hysts/ControlNet-v1-1
● QR Code
○ https://antfu.me/posts/ai-qrcode
Resources
28
Thank you!
nithish.raghunandanan@couchbase.com
https://linkedin.com/in/nithishr
@nithishr
29
Q&A

More Related Content

PDF
GENERATION OF HTML CODE AUTOMATICALLY USING MOCK-UP IMAGES WITH MACHINE LEARN...
PDF
GTC 2019 Keynote in Silicon Valley
PDF
Software Frameworks for Deep Learning (D1L7 2017 UPC Deep Learning for Comput...
PDF
Mastering Image Generation with Stable Diffusion
PDF
Machine learning from software developers point of view
PPTX
Deep learning with keras
PDF
Exploring AI Agents in Process Industries
PPTX
Demystifying-AI-Frameworks-TensorFlow-PyTorch-JAX-and-More (1).pptx
GENERATION OF HTML CODE AUTOMATICALLY USING MOCK-UP IMAGES WITH MACHINE LEARN...
GTC 2019 Keynote in Silicon Valley
Software Frameworks for Deep Learning (D1L7 2017 UPC Deep Learning for Comput...
Mastering Image Generation with Stable Diffusion
Machine learning from software developers point of view
Deep learning with keras
Exploring AI Agents in Process Industries
Demystifying-AI-Frameworks-TensorFlow-PyTorch-JAX-and-More (1).pptx

Similar to AI_Photo_Generation_with_Python_A_Developer's_Guide.pdf (20)

PDF
PPTX
Transfer Learning and Fine Tuning for Cross Domain Image Classification with ...
PDF
Cyanapse talk photorealisticf_ilters_migaragemeetup_7nov2018
PDF
The Yoga of Image Generation with Stable Diffusion & ComfyUI
PPTX
The art of AI Art
PDF
Deep Learning for Computer Vision - Image Classification, Object Detection an...
PDF
Deep Learning for Computer Vision: Software Frameworks (UPC 2016)
PDF
Top 7 Generative AI Models Shaping the Future of Technology
PDF
Neural Networks from Scratch - TensorFlow 101
PDF
Image Generation with ComfyUI and Stable Diffusion
PDF
SFScon19 - Davide Boschetto - Constraints of model deployment and production ...
PDF
Khan farhan cv
PDF
Serving Deep Learning Models At Scale With RedisAI: Luca Antiga
PDF
Machine Learning for Images
PDF
How to build a generative AI solution A step-by-step guide.pdf
PDF
Modelling Framework of a Neural Object Recognition
PPTX
Ai powered images-gdgtirana
PDF
How to build a generative AI solution A step-by-step guide (2).pdf
PDF
Fueling the AI Revolution with Gaming
PDF
Alison B Lowndes - Fueling the Artificial Intelligence Revolution with Gaming...
Transfer Learning and Fine Tuning for Cross Domain Image Classification with ...
Cyanapse talk photorealisticf_ilters_migaragemeetup_7nov2018
The Yoga of Image Generation with Stable Diffusion & ComfyUI
The art of AI Art
Deep Learning for Computer Vision - Image Classification, Object Detection an...
Deep Learning for Computer Vision: Software Frameworks (UPC 2016)
Top 7 Generative AI Models Shaping the Future of Technology
Neural Networks from Scratch - TensorFlow 101
Image Generation with ComfyUI and Stable Diffusion
SFScon19 - Davide Boschetto - Constraints of model deployment and production ...
Khan farhan cv
Serving Deep Learning Models At Scale With RedisAI: Luca Antiga
Machine Learning for Images
How to build a generative AI solution A step-by-step guide.pdf
Modelling Framework of a Neural Object Recognition
Ai powered images-gdgtirana
How to build a generative AI solution A step-by-step guide (2).pdf
Fueling the AI Revolution with Gaming
Alison B Lowndes - Fueling the Artificial Intelligence Revolution with Gaming...
Ad

More from Nithish Raghunandanan (12)

PDF
Evaluating the Effectiveness of RAG in Real World Applications
PDF
Next Generation Apps: Enhancing User Experience with LLMs.pdf
PDF
Select ML from Databases.pdf
PDF
Select ML from Databases
PDF
Virtual tourism in covid times
PDF
Life of a data engineer
PDF
Creating data apps using Streamlit in Python
PDF
Learnings from Organizing Internal Hackathons
PDF
Learnings from Organizing an Internal Hackathon
PDF
Pecha kucha Talk on web scraping
PDF
Hodor: Solving Everyday Problems with Tech
PDF
Tutorial on Web Scraping in Python
Evaluating the Effectiveness of RAG in Real World Applications
Next Generation Apps: Enhancing User Experience with LLMs.pdf
Select ML from Databases.pdf
Select ML from Databases
Virtual tourism in covid times
Life of a data engineer
Creating data apps using Streamlit in Python
Learnings from Organizing Internal Hackathons
Learnings from Organizing an Internal Hackathon
Pecha kucha Talk on web scraping
Hodor: Solving Everyday Problems with Tech
Tutorial on Web Scraping in Python
Ad

Recently uploaded (20)

PDF
Machine learning based COVID-19 study performance prediction
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
MYSQL Presentation for SQL database connectivity
PPT
Teaching material agriculture food technology
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Approach and Philosophy of On baking technology
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
cuic standard and advanced reporting.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Machine Learning_overview_presentation.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Unlocking AI with Model Context Protocol (MCP)
Machine learning based COVID-19 study performance prediction
20250228 LYD VKU AI Blended-Learning.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
The Rise and Fall of 3GPP – Time for a Sabbatical?
MYSQL Presentation for SQL database connectivity
Teaching material agriculture food technology
Encapsulation_ Review paper, used for researhc scholars
Mobile App Security Testing_ A Comprehensive Guide.pdf
Review of recent advances in non-invasive hemoglobin estimation
Building Integrated photovoltaic BIPV_UPV.pdf
Approach and Philosophy of On baking technology
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
NewMind AI Weekly Chronicles - August'25-Week II
Per capita expenditure prediction using model stacking based on satellite ima...
cuic standard and advanced reporting.pdf
Programs and apps: productivity, graphics, security and other tools
Machine Learning_overview_presentation.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Unlocking AI with Model Context Protocol (MCP)

AI_Photo_Generation_with_Python_A_Developer's_Guide.pdf