Build This 100% FREE AI Image Generator!| Stable Diffusion

Опубликовано: 13 Июль 2026
на канале: gayan warakawa
65
4

AI-generated art with this step-by-step guide! Whether you're a beginner or a pro,
learn how to create stunning digital masterpieces using AI art generators like Stable Diffusion.

🚀 What You'll Learn:

How to use AI art generators on Kaggle
A breakdown of the code and what it does
Tips for customizing and enhancing your art

We'll walk you through the process of setting up on Kaggle, understanding the code, and producing amazing visuals with just a few clicks.
Perfect for artists, tech enthusiasts, and anyone curious about the future of creativity!

https://www.kaggle.com/

Don't forget to like, subscribe, and hit the bell icon for more exciting content!

#AIArt #StableDiffusion #DigitalArt #ArtGenerator #Kaggle #TechTutorial #CreativeTech #AIArtTutorial #MachineLearning #NeuralNetworks #AIForCreativity"

1st CODE HERE
....................................................................................................
!pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
!pip install diffusers transformers accelerate scipy safetensors
....................................................................................................


2nd CODE HERE
....................................................................................................
from diffusers import StableDiffusionXLPipeline
import torch

Load the correct pipeline for text-to-image generation
model_name = "stabilityai/stable-diffusion-xl-base-1.0"
pipe = StableDiffusionXLPipeline.from_pretrained(model_name, torch_dtype=torch.float16)
pipe.to("cuda") # Ensure it uses GPU
....................................................................................................

3rd CODE HERE
....................................................................................................
prompt = "An anime-inspired artwork showcasing a cosmic dreamscape backdrop, glowing with UV painting and bioluminescent light, composed in a manga style by Alphonse Mucha."
image = pipe(prompt).images[0]

Display the generated image
import matplotlib.pyplot as plt
plt.imshow(image)
plt.axis('off')
plt.show()
....................................................................................................

4th CODE HERE
....................................................................................................
Save the image to a file
image_path = "/kaggle/working/sdxl_generated_image.png"
image.save(image_path)

Provide a link to download the image
import IPython.display as display
display.display(display.FileLink(image_path))
....................................................................................................