⚠️ Important Notice: User trained models are only available in the Legacy Mode of the Image Generation tool. Please note that certain features may be unavailable in Legacy Mode such as Presets or Edit with AI.
Training your own image generation model with Leonardo.Ai opens up a world of creative possibilities. Fine-tuning allows for precise customization to your specific style or subject matter, especially useful in fields like game development and concept art. Here’s a guide to help you harness Leonardo.Ai’s model training effectively for the best results:
Key Considerations
Start with a well-curated image dataset that mirrors the diversity of your chosen theme, sticking to a consistent size ratio (e.g., 768 x 768px), to ensure your model can generalise effectively to new scenarios.
To avoid overfitting – which hampers the model's performance on unseen data –incorporate a varied dataset with up to 40 high-quality, watermark-free images to teach the model a wide array of scenarios. (Overfitting causes the trained model to recall / recreate its trained data instead of being flexible enough to adhere to the given prompt).
Consistency in style, format, and aspect ratio are paramount for model recognition efficiency, while introducing variation within these constraints encourages the model to creatively reapply learned elements in novel contexts. (Striking the right balance between variation and consistency may require trial and error).
Consistency - character position, style and image composition.
Variation - characters themselves and their clothes.
Bad Dataset ❌
Good Dataset ✅
By focusing on these considerations, you’re set to optimise your model training journey with Leonardo.Ai, creating customised and consistent outputs for your projects. Now let’s get started!
Step-by-Step Training Guide:
Step 1: Create a Dataset
From the home page, navigate to Training & Datasets:
Click on ‘Create New Dataset’ or 'New Dataset' to create your dataset.
Name Your Dataset.
Add Images to Your Dataset: (Remember the considerations)
Images can either be uploaded or selected from previously generated images on the platform.
Double check the images align with your theme or subject of interest.
Step 2: Train Your Model
Fill in metadata for your model to help with categorization and retrieval. These include elements such as model name, category and prompt instance. (For clarification, prompt instance is a simple way to direct the model to properly utilise its training data framework. For example for a sketch-style model it would be something like 'A sketch of…”)
When you are ready click on the 'Start Training' button.
You will be notified via email once the training process is complete. (It is typically 30 minutes to 2 hours depending on complexity). When done the model will be available under Finetuned Models > Your Models.
Step 3: Generate Images With Your Model
From the Homepage, navigate to Image Generation > Click on Legacy Mode in the top right > Click on the Model button > Click Select Other Model > Click on Your Models.
Once you are in the Your Models category, hover over the model you want and click the View button, then click the Generate with this Model button.
Alternatively, you may do so by going to the Finetuned Models page then click on Your Models , then hover over the model you want and click the view button, then click the Generate with this Model button.
This automatically opens the Image Generation tool in Legacy Mode with the model already selected for use.
Note: In order to use the new features of the Image Generation tool such as Presets and Quality mode, you will have to disable the Legacy Mode toggle in the top right. Do note that Image Generation V2 however does not support user trained models.
2. Click on your newly trained model. Then click Generate with this model. Note: The image preview for the newly trained model only shows once you have done your first generation with it.
3. Type your desired prompt and generate images.
4. Observe how the generated images capture the essence of the trained images, aligning with the style and preferences of your dataset. If the results are not satisfactory, you can retrain a new model by going to Training & Datasets, choosing your dataset and selecting Edit Dataset. You will be able to delete and replace images and then train another model with the updated dataset.
ℹ️ Note: It is not possible to update an existing model that has already been trained due to technical limitations. This essentially means that every time a dataset has been modified, a new model will have to be trained to reflect the changes made.
5. Note that you can delete any models you have created by first going to Finetuned Models > Your Models. Then simply hover the cursor over the model you would like to delete and choose Settings > Delete this Model.
Final Considerations:
It is important to note that enabling Alchemy can drastically increase the quality of the generation output, depending on the model. In addition, since the training models are based on older versions of Stable Diffusion, typically detailed prompts with more quality and style modifiers will help produce better outcomes. Finally, it is important to note that you can use Elements and Image Guidance with the created fine-tuned model, just like the regular platform models.
And that does it for our in-depth Fine-tuned Model Training guide - we hope you found it useful! Remember, we're always adding new features and enhancing old ones, so be sure to check back in here from time to time to see updates or new ways of training models.
Happy Prompting! 🎨
If you have any questions or need further assistance, please reach out to Support via chat or email support@leonardo.ai
If you have large datasets and are interested in partnering on a custom model strategy for your company, please reach out to bizdev@leonardo.ai.
Frequently Asked Questions:
How to make my custom model private?
Custom models are always private, regardless of whether you are a Free user or a Paid subscriber.