Longread translated automatically
Original size 1140x1600

Training a generative neural network in the style of Gothic stained glass

PROTECT STATUS: not protected

Project Idea

The project focuses on training the Stable Diffusion neural network model in the style of medieval Gothic stained glass windows, characteristic of 12th–13th century French cathedrals. The most prominent examples of this art are preserved in Notre-Dame Cathedral. The distinctive features of this style include minimalism, a limited color palette dominated by cobalt blue, and clear, high-contrast graphic quality.

Original size 1024x680

Fragment 121, Rose, Notre Dame Cathedral

Original size 3195x678

Notre Dame de Paris

Stained glass windows are composed of numerous individual glass fragments assembled into a unified biblical narrative or parable. To train the model, a database was prepared consisting not of complete stained glass panels, but of small, circular fragments from them, which will allow for more detailed and accurate image generation.

Original size 2111x1024

Fragments of stained glass

Original size 2111x1024

Fragments of stained glass panels

Model training process

Approximately 150 stained glass fragments were selected to train the generative neural network, and then cropped to a 1:1 ratio.

Original size 2089x1028
Original size 2436x361

Google Colab Code Snippet

Original size 2438x400

Google Colab code snippet

Original size 2435x625

Google Colab Code Snippet

The first stage included: checking the GPU, installing dependencies, creating a local directory, and uploading images to Google Colab.

Original size 2435x678

Google Colab Code Snippet

Original size 2436x916

Google Colab Code Snippet

Then, the BLIP model generated image descriptions, to which a prefix was added to stylize them like a medieval stained-glass window. This combined textual data served as the foundation for training the subsequent model.

Original size 2434x622

Google Colab Code Snippet

Original size 2432x618

Google Colab Code Snippet

Following this, the model training process was initiated using the LoRA method, which took approximately two hours with the specified settings.

Original size 2423x247

Google Colab Code Snippet

Original size 2437x847

Google Colab code snippet

Original size 2433x560

Google Colab Code Snippet

Upon completion of the training, the model is saved, uploaded to the Hugging Face Hub platform, and becomes available for use. From there, you can begin creating images.

Image Series

Based on the initial generation tests, I have noticed that the neural network effectively captures the form and overall style, but the image quality deteriorates significantly due to the excessive mosaic fragments and chips rendered by the generation.

Original size 3195x1024

In the next generation, the checkpoint strength was decreased to -250, which helped produce cleaner images.

Original size 2111x1024
Original size 2111x1024
Training a generative neural network in the style of Gothic stained glass
Мария Карманова обучила генеративную нейросеть стилю готических витражей XII–XIII веков, используя фрагменты изображений средневековых французских соборов. Проект включал подготовку базы данных из 150 кадрированных фрагментов и применение метода LoRA для дообучения модели Stable Diffusion.
Project description created with AI
Project created at 10.04.2025
More projects in artificial intelligence
Иван Демидов создал серию изображений, сгенерированных на основе стиля современной абстрактной художницы Иды Экблад с использованием нейросети Stable Diffusion. Проект включает обучение модели на собственном датасете картин и генерацию изображений по промтам, включая Нью-Йорк, Париж и сюрреалистичные сцены.
Эмма Вардапетян обучила генеративную нейросеть генерировать изображения в стиле рисунков своей подруги. Нейросеть уловила ключевые особенности стиля, такие как мазки и покрас, и создала изображения, близкие к оригиналу.
Аня Кулинченко обучила нейросеть для генерации изображений в стиле Frutiger Aqua, вдохновлённом графикой 2000-х годов. Проект включает до-обучение модели Stable Diffusion на датасете из 27 изображений, предварительно подготовленных для генерации оммажей на картины.
Полина Рубей создала проект, в котором обучила нейросеть генерировать изображения в стиле ранних работ Винсента ван Гога. Проект демонстрирует, как современные модели способны передавать не только внешние признаки стиля, но и эмоциональный строй художника.
brnd
For us, a startup is a creative and innovative project with great potential for growth. We are dedicated to finding the best projects and helping them refine their concept, develop branding, and create effective promotion strategies. We also invest in production and replication to ensure their success. Are you ready to take your business to the next level? Join our startup incubator program and let us help you grow.
Brand accelerator
Startup ideas
Marketplace shops
We use cookies to improve the operation of the website and to enhance its usability. More detailed information on the use of cookies can be fo...
Show more