Skip to main content
All CollectionsMagai Video Walkthroughs
Creating Custom Image Models (LoRA) in Magai
Creating Custom Image Models (LoRA) in Magai

A video walkthrough of how to create and use custom image models (LoRAs) in Magai.

Dustin W. Stout avatar
Written by Dustin W. Stout
Updated today

## Introduction

Welcome to part two of our Magai Image Editor series, where we'll explore how to create and use LoRAs. A LoRA (Low-Rank Adaptation) is essentially a custom-trained image model that can produce any subject of your choice in different scenarios. One of the most popular use cases is creating digital photoshoots of yourself or your team—without ever stepping into a studio.

This guide will walk you through the complete process of preparing your images, creating a LoRA, and using it effectively within Magai.

## Preparation: Getting Your Images Ready

### Step 1: Collect Your Images

Start by gathering at least 10 good photos of your subject. For the best results:

- Include as much variety as possible

- Use different backgrounds

- Include multiple poses and expressions

- Capture different angles

- Include shots from various distances

The more variety you provide, the more versatile your LoRA will be. While 10 images is the minimum, more images will generally yield better results.

### Step 2: Convert Image Formats

Ensure all your photos are in JPEG or PNG format. iPhones often save images in HEIC format, which isn't compatible with the LoRA training process.

**For Mac users:**

1. Right-click or Command-click on the image

2. Select "Quick Actions"

3. Click "Convert Image"

4. Select JPEG format

5. Click "Convert"

**For PC users:**

Similar conversion tools are available through the File Explorer or third-party applications.

### Step 3: Create a Zip File

Compress all your properly formatted images into a single zip file:

**For Mac users:**

1. Select all the images

2. Right-click and select "Compress"

**For PC users:**

1. Select all the images

2. Right-click and select "Send to" > "Compressed (zipped) folder"

## Creating Your LoRA in Magai

### Step 1: Access the Image Editor

1. Go to the Magai dashboard

2. Click on "Quick Actions"

3. Select "Create a new image"

4. In the image editor, select "Flux LoRA" from the model list

### Step 2: Configure Your LoRA

The first time you create a LoRA, you'll see a blue button explaining the process:

- Initial LoRA setup consumes 11,000 words

- You'll need a prepared zip file with your images

- Once trained, generating images with your LoRA costs the same as any other image

Click "Setup Model" and configure the following:

#### 1. Name Your LoRA

Choose a name that helps you remember what the model is trained on. Consider including settings information in the name, for example:

- "Dustin_P_M_4K" (where P = portrait mode, M = mask, 4K = 4000 steps)

#### 2. Set a Trigger Word

The trigger word is what you'll type in your prompts to activate your LoRA:

- For a person, use their name (e.g., "dustin")

- For common names, add specificity (e.g., "dustin001") to avoid confusion with existing entities in the AI's training

- For non-human subjects like products, consider using a unique identifier

#### 3. Select Training Options

**Portrait Model:**

- Enable this if you're creating photorealistic portraits of people

- Optimizes for realistic portrait generation with bright highlights and detailed results

**Style:**

- Use this if you're training the model to replicate a style rather than a subject

- Good for photographers wanting to recreate their aesthetic

**Create Mask:**

- Tells the AI to focus on the subject and ignore backgrounds

- Recommended for most portrait-based LoRAs

- Can still be used without portrait mode if you want non-photorealistic renditions

**Multi-resolution Training:**

- Enable this if your training photos have varying resolutions

- Helps achieve better results with mixed-quality source images

#### 4. Set Number of Steps

The number of steps determines how strictly the AI will recreate your subject:

- Lower steps (1000-3000): More versatile, can place your subject in different scenarios but may occasionally be less accurate

- Higher steps (4000+): More accurate resemblance but less creative freedom and versatility

Recommendation: 2000 steps works well for most purposes, balancing accuracy with versatility.

#### 5. Upload Your Zip File

Drop your prepared zip file into the uploader and wait for it to complete.

### Step 3: Create Your LoRA

Click "Create LoRA" to begin the training process. This typically takes about five minutes.

**Important note:** Once a LoRA is trained, it cannot be modified. If you want to make changes, you'll need to train a completely new model.

## Using Your LoRA

Once training is complete, your new LoRA will appear in the dropdown menu when using the Flux LoRA model. To generate images with your custom LoRA:

1. Select Flux LoRA as your model

2. Choose your custom LoRA from the dropdown

3. Include your trigger word in your prompt

4. Add any additional descriptions for poses, settings, or styles

For example: "dustin wearing a business suit in a modern office, professional portrait, high quality"

## Tips for Best Results

- Be specific with your prompts

- Include your trigger word near the beginning of your prompt

- Experiment with different styles and scenarios

- Use negative prompts to avoid unwanted elements

- Try different step counts to find the sweet spot for your specific LoRA

## Conclusion

Creating custom LoRAs in Magai opens up endless creative possibilities for personalized AI-generated imagery. Whether you're creating professional headshots, concept art, or creative portraits, your custom LoRA will help you achieve consistent, personalized results that accurately represent your subject.

Remember that the quality of your input images greatly affects the quality of your LoRA, so take time to select diverse, high-quality images for the best results.

Did this answer your question?