Step 1: Setting Up Replicate Account
The foundation of this entire process rests on Replicate, a robust platform that empowers you to run and fine-tune open-source AI models with unparalleled ease. Navigating to Replicate.com will be the initial step, this web platform is used to train and generate images. Begin by signing in using a GitHub account. If you do not have a GitHub account, creating one is fast and easy. After signing in, setting up billing is needed. It might seem like an unnecessary hurdle, but don't worry – it will cost you just a few dollars to bring your AI visions to life. Training an AI model on your face costs around $2 and generating images will be an extra 5 cents. You can set up your profile by going to the account settings and clicking on manage billing.
Step 2: Train the AI Model on Your Face
After creating a Replicate account, you need to train the AI model to recognize your face. The first step of the training process requires going to AI toolkit via the Replicate.com website.
The presenter of this step by step Tutorial leaves the link to AI toolkit down in the description. After visiting the AI toolkit, enter all of the values, it will start training a model that can be used in later steps. To begin, click on the Destination drop-down menu, and select a model. If you don’t have a model, click create new model, it is recommended to call it something like "your name-Lora", in the video example he uses "AiAndy-Lora". Leave the setting to public. Then, upload the images of your face. Be sure to rename the images before uploading, the file names must match the format a_photo_of_TOK.png. The most important piece is that 12 photos of your face must be uploaded. The key thing to remember when you’re uploading these photos is to avoid uploading photos where you look strange and only upload the best photos of yourself. Create a zip file containing all of the photos and upload it via the drop file option. Skip the model_name field and go straight to entering the Hugging Face token. After that, you're ready for step number three!
Step 3: Creating a Hugging Face Account
A Hugging Face account is required to make the AI model work. You can begin by going to the Hugging Face website. Make a hugging face account by going to huggingface.co if you don’t already have one. Next click on sign up. Once signed up, click on the top right, then settings. On the left side, click on Access Token. Then click on create new token, and give it a bunch of access. You don’t have to give billing access or discussion and post access, it is all about keeping the process simple. Afterwards, copy and paste the hugging face token into the AI face training at the HF token on replicate. Next, create a model. Go to the right side and click on create new token, and it will show all your new models. Click on this and save the copied data from hugging face on the training data. To make the model public so Replicate will get access.
Step 4: Generate Image of Your Face
Next is to generate images using AI face. Start by visiting replicate.com/lucataco/flux-dev-lora which is linked in the video description.
After arriving on that website, scroll down to the HF_LORA part. Start prompting using the keyword, that was created in the photos name. Next, copy and paste close of face, then driving a porsche 911 in the italian alps for more accurate result, otherwise the AI will mix photos. If the AI messes up, simply add man at the front. The best way to fix this issue is to check with the prompt GPT.
Step 5: Make a Custom Prompting GPT
To take your image generation a step further, creating a custom prompting GPT can give you better results. Instead of writing long prompts that can be messy, the custom GPT can do it for you. Simply click on explore GPTS, on the top right click on create. There is also a link below that you can use to copy. Go to the top left and click on edit GPT. Change the code to AiAndy or the name the image files were saved under. This will use Prompt engineering principles to add style and quality. This is a fast and easy way to build quality prompts.