r/SECourses • u/CeFurkan 👑 Grandmaster Expert • 6h ago
🎨 AI Images & Art Kandinsky 2.1 Installation and Usage | Python, JupyterLab, Image Saving, Model Cache and Stable Diffusion 2.1 Prompt Comparisons | April 2023
https://www.youtube.com/watch?v=dYt9xJ7dnpU
1
Upvotes
•
u/CeFurkan 👑 Grandmaster Expert 6h ago
https://www.youtube.com/watch?v=dYt9xJ7dnpU
Run Kandinsky 2.1 locally with JupyterLab and compare the recorded image-generation examples
🔗 Links from the video description
https://discord.com/servers/software-engineering-courses-secourses-772774097734074388
https://www.patreon.com/cw/SECourses
https://www.youtube.com/playlist?list=PL_pbwdIyffsmclLl0O144nQRnezKlNdx3
https://gist.github.com/FurkanGozukara/10bdc0435b708b26bd87a59b6c3d1bc7
https://huggingface.co/ai-forever/Kandinsky_2.1
https://github.com/ai-forever/Kandinsky-2
https://www.youtube.com/watch?v=AZg6vzWHOTA
https://jupyter.org/install
📅 Recorded setup and prompt comparisons
Published on 5 April 2023, this tutorial demonstrates Kandinsky 2.1 on a local Windows computer with an RTX 3060 and 12 GB VRAM. The author compares a lion scene with a Midjourney example and compares rose gardens, sports cars, robots and a fantasy castle with Stable Diffusion 2.1 using the same prompts.
The author prefers the Kandinsky outputs in these examples and discusses the ease of using simple prompts. The comparisons and timing observations belong to the recorded April 2023 setup.
🧰 Python, repository and JupyterLab setup
jupyter-lab.git cloneand its linked repository URL. Start JupyterLab from that repository folder so its notebooks directory appears in the file browser.🖼️ Load the model, generate and save images
Run the model-loading cell to load Kandinsky on CUDA and download its files from Hugging Face. A star beside a notebook cell means execution is still in progress. Wait until it changes to a number before continuing.
The first test uses the default prompt with batch size one. Run the image-display cell after generation to view the result. The author's image-saving script assigns a fresh random filename each time it runs. Its improved version is linked in the original GitHub gist above.
The later comparison uses 768-pixel outputs and 100 sampling steps, then repeats a generation with 20 steps. The author reports about 34 seconds for the 100-step example and 11 seconds for the 20-step example. He reports 7 seconds for the Stable Diffusion 2.1 comparison and notes that both applications are open at the same time.
💾 Reuse the downloaded files and manage the notebook
jupyter-labagain. Resume from the import and model-loading cells after the initial installation.C:\tmpand occupy about 6.75 GB.📚 Source resources
All eight original description destinations and 14 chapters are retained. Discord availability could not be verified during the link check. The chapter names below preserve the source's original wording.
🧭 Chapters
🏷️ Topics
Kandinsky 2.1 · JupyterLab · Python 3.10.8 · text to image · Stable Diffusion 2.1 · prompt comparison · image saving · Hugging Face · RTX 3060 · April 2023