Building a foundation for collaboration with generative AI training
Following an introduction from its cloud provider, Amazon Web Services (AWS), ApparelMagic and DoiT began working together to develop the image-generation tool. ApparelMagic explained its needs during an initial discovery call, including its preference to build the tool as a decoupled microservice to allow it to get it up and running as quickly as possible. DoiT’s expert cloud architects then ran a series of generative AI workshops and training sessions with the ApparelMagic team to give them a clear understanding of the technology that would be used to build the tool.
“The image-generation tests gave us a feel for how the image models would work, including the pros and cons of each,” Harding explains. “DoiT’s expertise helped us to understand which AWS modules to choose and how they would work together effectively, which saved us a significant amount of development effort.”
Architecting a reliable image-generation tool with DoiT cloud engineers
After drawing up an architectural plan, DoiT’s cloud engineers set about building the image-generation tool. They chose to use AWS Lambda’s serverless architecture to ensure it would automatically scale its resource usage to handle any spikes in activity while helping ApparelMagic manage costs.
Anticipating the security challenge of having an open-input text box for customers to enter their clothing-design descriptions, DoiT also recommended pre-processing all user prompts to automatically disqualify any unsafe or inappropriate requests. Not only did this help to secure the tool, it meant ApparelMagic could ensure it was only being used as intended, and the company wasn’t using resources to generate images unrelated to clothing design.
To ensure the tool’s reliability, DoiT chose to divide the workflow into three separate queues, one for each image style (product sketch, product image, product image on a model), with each queue linked to a dedicated AWS Lambda function. This means that as usage scales up, requests won’t be competing for resources in a single queue, reducing the risk of delays and bottlenecks. It also makes the product easier to maintain.
“DoiT’s suggestion to separate the queues makes a lot of sense. It keeps the flow simple for each image type, making it easy for developers to maintain each one in the future, without having to navigate a complex system. Maintainability, scalability, and developer experience were all key benefits.”
Giving developers a clear view under the hood with comprehensive observability
DoiT further enhanced the maintainability of the tool with robust monitoring capabilities throughout the pipeline to make it easy to identify and resolve any performance issues. Using separate queues for each image type helped to simplify monitoring within the AWS console, giving ApparelMagic clear visibility of incoming, successful, and failed requests. DoiT cloud engineers also configured alarms to trigger in the event of queue failures.
For observability, DoiT integrated AWS CloudWatch. Should there be a failure, such as those detected by queue alarms, CloudWatch enables the ApparelMagic team to quickly diagnose and fix any errors. DoiT also used dead-letter queues to capture any problematic requests, allowing for detailed error monitoring and facilitating the reprocessing of failed tasks, ensuring no requests were lost.
A smooth handover and a faster path to clothing design
With the image-generation tool built, DoiT delivered the infrastructure as code for ApparelMagic to deploy in its platform. DoiT’s cloud engineers worked closely with the ApparelMagic team to ensure a smooth handover, walking them through the full architecture and working together to test the tool and resolve any bugs.
“The DoiT engineers were very responsive during the handover,” recalls Harding. “They gave us good documentation explaining everything we needed to consider going forward, as well as handling all our requests and making the refinements we needed. We really appreciated how thorough they were.”
With the handover complete, ApparelMagic then worked on the front end and billing system in preparation for release. The image-generation tool is now being rolled out to ApparelMagic’s customers, allowing them to use natural language prompts to instantly create three distinct images of their clothing designs: a sketch for designers, a photograph for manufacturers, and a photograph of the clothes on a model for display purposes. This will save clothing companies weeks of work ideating and designing products.
The images will also be stored in ApparelMagic’s platform, allowing customers’ teams to collaborate on them easily in one place, instead of having to send designs back and forth via email.