Link to Github Repo: https://github.com/yammmyu/bloomcraft.git
This project combines AI-driven design with custom model training to generate personalized floral arrangements. The core website was built using Lovable for rapid development, with Supabase managing the database. I focused on the backend API, which first uses the DeepSeek o1 model API to create user-specific prompts that account for cultural nuances and seasonal flower availability. These prompts are then processed by a Stable Diffusion model I trained on a curated bouquet dataset, producing realistic and context-aware images of floral arrangements.
A crucial part of this website was the prompt creation process. I needed it to do three things:
Intake information and create a design according to the provided details and any constraints.
Output the design using the specified format.
Construct a formatted prompt for the generative AI.
Below, you can see the specific prompt that would be given to the DeepSeek API.
Note, however, that this version does not include step 3 yet. The reason is that I need to test the image generation AI first to determine what prompt format will work best.
In this part, I used the fast-dreambooth training enviroment opensources by TheLastBen, which is based on the stable diffusion model. Below you can find the iteration of images generated and the image sets used:
This is the base model, hense why it has the most pictures, they are a range of 35 images that I have carefully selected. That has a similar framing of the bouquet in the frame, it is done so to avoid distraction for the diffusion model, and to let it learn parts that I want it to learn. These images cover a wide range of different colors. At the stage of this model I acutall wasn't paying too much attention to the variaty of the flowers and what flowers were appearing.
In this version of the model, I put a specific emphasis on red bouquets, sunflower-based yellow bouquets, as well as several rare color bouquets such as blue and purple. This is because I noticed that the model is particularly good at pink and white bouquets, but significantly weaker when it comes to other colors and flowers that are not commonly seen in those shades. I did this with the aim of increasing the variety of flowers and avoiding problems in the future. Additionally, I also focused on lighting and how I want the flowers to look aesthetically.
At this stage of the model, I would say I am pretty satisfied with the results. The model are consistently generating bouquets at a good quality. This means that there are significantly less distorted images and flower that were simply to aesthetically pleasing.
For the V3 and V3.5 models, these two versions were specifically targeted toward weakness of the model. Therefore my training strategie became choosing very characteristical images (eg. Red flower bouque) and increase the amount of cycles the image will run through the training. This actually enables the model to become significantly better at targeted areas.
Captions serves its literal purpose in data training, the model reads your captions with the image and learnes how the image is described. This enables the model to not only start to understand information in the image, eg what type of flower should look like what, but also enable your model to better understand the prompt that you are giving it. One of the strategies I used to train my model was to use the prompts I would use to generate that image as the caption, following the exact same format. This essentially means, if I were to type in that prompt to the maschine again, it has seen it before and can correlate it to an image it has been trained on, allowing it to better mimic that image, ultimately making the image more realistic.
This is image ghconfnu(7) and later ghconfnu_v2(10) and ghconfnu_v3(1), an image I really liked, and used for all three versions of the model. below however you can see how the captions for this image envolved over time.
you can see that, I reaized I could just use the prompt format as the caption of the image in ghconfnu_v2, while in ghconfnu_v3, I added more details to the description which enabled me to tweak the image details to my preferences.