Project Concept
What happens if I show a neural network my St. Petersburg and ask it to invent its own?
The project is based on 40 photographs from my trips to the Northern Capital. I compiled them into a dataset and trained the Stable Diffusion model to recognize the characteristic visual features of the city: its architecture, streets, water, lighting, details, and the atmosphere of my shots.
After training, the neural network should generate new images of St. Petersburg—views that have never existed. I am not asking the neural network to simply create realistic photographs of the city—I am interested in seeing more original, futuristic imagery.
This is how «pIiter» should be born—a fantastical version of St. Petersburg, assembled from my memories and reinterpreted by artificial intelligence.
Dataset


My photographs of St. Petersburg from the dataset


My photographs of St. Petersburg from the dataset


My photos of Saint Petersburg from the dataset
Resulting Image Series


Resulting Image Series


Resulting Image Series


Resulting Image Series
Learning Process Description
1. Dataset Preparation
For instructional material, I utilized 40 original photographs taken during a trip to St. Petersburg. I selected images with diverse subjects and perspectives, yet sharing common visual characteristics: the city’s architecture, streets, water, bridges, and distinctive lighting. All images were adjusted to an appropriate format for educational use.

Image Import
Import Check
A Blip model was used to automatically generate image captions. The caption text is «photo of Saint Petersburg in PIITER style.»
Import Blip model
Adding the caption «photo of Saint Petersburg in PIITER style» to the images
2. Model Training
On the prepared dataset, I trained LoRA for Stable Diffusion XL. During the training process, the model analyzed images and their text descriptions, gradually identifying recurring visual patterns within the source material.
LoRA Training
After completing the course, I uploaded the resulting LoRA model to Hugging Face to use it for further image generation.
Saving the model on Hugging Face
3. Prompt Generation and Selection
Initially, I used a short prompt describing St. Petersburg, but the resulting image lacked the necessary expressiveness—it was just an average-quality street scene. This did not align with the concept of creating a fantastical city.
First generation with a short prompt
Prompt: «photo of Saint Petersburg in PIITER style, a quiet street near the Neva river»
The first, less successful generation
Following this, two directions were tested: the first prompt focused predominantly on a photorealistic image, while the second incorporated more fantastic and futuristic elements. Both versions yielded successful results—interesting visual solutions, effective light and shadow, diverse angles, and excellent detail in the sky and water. For the final series, I chose the second prompt because the combination of recognizable St. Petersburg with fantastic elements unfolded more effectively in it.
