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
Анна Кузнецова обучила генеративную нейросеть стилю фотографа Альфреда Штиглица, создавая изображения, напоминающие его работы по настроению и композиции. Проект включает в себя обучение модели на 200 фотографиях Штиглица и генерацию изображений, соответствующих эстетике пикториализма.
Дарья Плетнева обучила генеративную нейросеть в стиле художника Robotpencil, чтобы создавать изображения в его художественном направлении. Проект включает сравнение сгенерированных изображений с оригинальными работами художника и анализ стилистических особенностей.
Анна Ковальская создала серию изображений в стиле мультфильма «Варежка» с использованием нейросети Stable Diffusion. Проект включает генерацию сказочных персонажей и сцен с передачей зимней атмосферы и вязаных текстур, характерных для анимации.
Татьяна Федорова обучила генеративную модель Stable Diffusion рисовать в стиле аниме Хаяо Миядзаки. Проект включает обучение на 38 отформатированных стоп-кадрах с персонажами, природой и вымышленными существами.
start.hsedesign
The HSE Art and Design School spans 4 campuses, offering 9 bachelor's programs and approximately 40 specialized tracks. To apply, you must not only submit your documents on time but also upload your creative project—if required by your chosen program.
applicants’ projects
faculty of pre-university training
lyceum
online school
children's school
We use cookies to improve the operation of the HSE website and to enhance its usability. More detailed information on the use of cookies can be fou...
Show more