Longread translated automatically
Original size 1599x2000

Training a Generative Neural Network. Portraits in the Style of Kuzma Petrov-Vodkin

PROTECT STATUS: not protected

The goal of the project is to explore the capabilities of generative neural networks to create a series of images in the style of Petrov-Vodkin’s paintings and to apply this style to create portraits of various ages.

Paintings by Petrov-Vodkin

Kuzma Petrov-Vodkin’s style in his portraits features a vibrant color palette, yet the models are depicted with accentuated psychological depth, their gaze directed toward the artist himself. His manner of painting blends elements of realism and symbolism, creating a feeling of a nature that is simultaneously real and slightly unreal.

Petrov-Vodkin’s paintings

The project creates a version of Stable Diffusion trained on paintings by Petrov-Vodkin, capable of generating images in his style using a limited set of source images (dataset: 52 paintings) and efficient adaptation methods (LoRA).

Neural Network Training

0
1/2

First, I checked GPU availability using nvidia-smi, and then I installed the necessary libraries: bitsandbytes (for model quantization), transformers (for text and image processing), diffusers (for working with diffusion models), peft (for parameter-efficient fine-tuning, including LoRA), and a script for training Dreambooth-LoRA from the Hugging Face repository.

Original size 2436x522

I compiled a dataset of Petrov-Vodkin paintings: 52 objects, uploaded them to Google Colab in a separate directory, applying the resize method to format the images to 1:1, and reviewed the first 5 images.

Original size 2497x805

Generated image captions using the BLIP model: each caption in the image titles is prefixed with «portrait in the style of Petrov-Vodkin.» I saved the metadata (file paths and captions) in metadata.jsonl (verifying the code execution).

Advanced Training

Original size 1557x856

I utilized the Dreambooth-LoRA technique to fine-tune Stable Diffusion. I am using the following base models:

Also: stabilityai/stable-diffusion-xl-base-1.0 VAE madebyollin/sdxl-vae-fp16-fix

Key training parameters: Resolution: 512×512 Batch size: 2 Learning rate: 1e-4 Number of steps: 500 8-bit Adam (memory optimization) FP16

I launched the training using accelerate.

Saving the resulting model and its publication

Original size 2161x877

Saved the model on Hugging Face using upload_folder. A model card with metadata was created using save_model_card.

Image Generation

After training, saving, and publishing—I uploaded the trained LoRA model.

I used the DiffusionPipeline to generate images based on the prompt: «portrait in the style of Petrov-Vodkin.» Generation settings: 25 steps, FP16.

Original size 1178x191

generation result

1/3

Image generation result using the trained model

In my project, I set a goal to create portraits of different age groups, so I used various prompts for this purpose.

Original size 2238x157
Original size 1024x1024

Generation result

Generation result

Original size 2433x166
Original size 1024x1024

Generation result

generation result

Training a Generative Neural Network. Portraits in the Style of Kuzma Petrov-Vodkin
Ангелина Кобзева обучила генеративную нейросеть для создания портретов в стиле Кузьмы Петрова-Водкина. Проект использует метод LoRA и датасет из 52 картин художника для генерации изображений с яркой цветовой палитрой и психологической глубиной.
Project description created with AI
Project created at 10.04.2025
More projects in artificial intelligence
Софья Новикова обучила Stable Diffusion XL генерации персонажей в стиле Spider-Verse. Проект включает сбор и использование датасета из 18 разнообразных изображений для дообучения модели.
Елизавета Давыдович обучила генеративную нейросеть стилю художника Хироо Исоно, чтобы она создавала изображения с его характерной атмосферой спокойствия и гармонии. Модель успешно воспроизвела ключевые элементы стиля Исоно, включая цвета, образы и текстуры, даже при использовании относительно небольшого датасета из 35 работ.
Ольга Ганган обучила генеративную нейросеть стилю живописи Ван Гога, чтобы создать изображения в его манере. Проект использует модель Stable Diffusion XL с дообучением на 21 фотографии для генерации визуального ряда в стиле постимпрессионизма.
Ксения Пичугина описала процесс обучения генеративной нейросети на примере стиля Пабло Пикассо. Проект включает визуальные примеры изображений, сгенерированных нейросетью после обучения на картинах известного художника.
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