How cool would it be if there was a platform where your creative visions come to life with just a few clicks—a world where you can fine-tune cutting-edge AI models to craft stunning images uniquely yours? Welcome to Civitai, a vibrant platform dedicated to empowering creators by providing access to a vast and ever-growing library of Stable Diffusion models. Whether you’re an artist, designer, or AI enthusiast, Civitai offers you the tools to explore, experiment, and collaborate with a global community. Ready to dive deeper into what makes Civitai the go-to hub for creative innovation? Let’s explore!
Civitai is a platform where fine-tuning enthusiasts can effortlessly share their creations and connect with other creators. It is an innovative platform designed to enhance the creation and exploration of AI-generated media. It provides an environment where users can upload, share, and discover custom models trained on various datasets. These models, supported by AI media software, serve as unique tools for generating original content. It gives access to various checkpoint-trained models.
Also read: Parameter-Efficient Fine-Tuning of Large Language Models with LoRA and QLoRA
Civitai model refers to a machine-learning algorithm trained to produce art or media in a certain style. To create a media-generating model, a dataset representing the desired style or subject is assembled and used for training. The model then generates new, original media by identifying patterns and features from its training data. The output is not an exact copy of the training examples but a unique creation inspired by the dataset. Models can be trained to produce anything from photorealistic images and abstract patterns to diverse audio arrangements, short stories, or even videos, enabling the creation of content that would be challenging and time-consuming to produce manually.
Let’s look at a few models on Civitai:
A very popular model on Civitai, this checkpointed trained model can be downloaded and used locally or, optionally, directly on the platform. Let’s try generating an image using this stable diffusion model.
I generated a 1024×1024 image with the prompt “A person sitting on a tree with a balloon.” You can set the number of images to 1 if you want to spend fewer credits, or Buzz, as they call it. After signing up, you’ll be offered 100 Buzz.
The ‘create’ option on Civitai allows users to generate images using AI models, and can have credit limitations. However, if you download the model and use it locally or on a service that supports it, you shouldn’t encounter any restrictions from Civitai.
Let’s look at another stable diffusion checkpoint model on Civitai. Let’s download the model and use it this time. We’ll need a GPU for this, so I’ll be using Google Colab for the demo.
We’ll be using the stable diffusion webui using Automatic 1111: Link
Note that Colab has limited support for Automatic1111 on the free version, so you may find it difficult as the notebook gets disconnected after 5 minutes of use, and you’ll get a warning like “you may be executing code that is disallowed.” If you have a good GPU on your computer, then I’ll suggest you do it locally.
Let’s look at the code.
Please make sure to change the runtime type and select GPU:
!git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
!pip install -r /content/stable-diffusion-webui/requirements.txt
Let’s download the Photon (v1) model from Civitai: Civitai Photon
Note: You can click on the mount drive option on the top left of your notebook
“/content/stable-diffusion-webui/models/Stable-diffusion”
!mv /content/drive/MyDrive/photon_v1.safetensors /content/stable-diffusion-webui/models/Stable-diffusion/photon_v1.safetensors
!python /content/stable-diffusion-webui/launch.py --share
Select photon_v1 in the stable diffusion checkpoint and start prompting in the text2img section. As you can see, I prompted “A man carrying an umbrella” and clicked Generate at the top right. Feel free to tweak the settings before you generate.
You can download the image by right-clicking it; here’s the 512×512 image I generated.
Let’s look at how to use Civitai’s Lora models:
We need to download a Lora model and its base model, or else we won’t be able to use it. I’ll demonstrate this using: Vixon’s Anime/Manga Styles Lora model.
The base model for this Lora model is the Pony model; let’s download both models from Civitai.
Pony Diffusion V6 XL: Click Here
You can perform the steps we performed in the previous section for using the Photon_v1 model. Let’s continue with the remaining steps:
!mv /content/drive/MyDrive/ponyDiffusionV6XL_v6StartWithThisOne.safetensors /content/stable-diffusion-webui/models/Stable-diffusion/ponyDiffusionV6XL_v6StartWithThisOne.safetensors
!mkdir /content/stable-diffusion-webui/models/Lora
!mv /content/drive/MyDrive/DragonBallZXLP.safetensors /content/stable-diffusion-webui/models/Lora/DragonBallZXLP.safetensors
!python /content/stable-diffusion-webui/launch.py --share
Click on the public URL, and you’ll be greeted with this UI
Now click on the stable diffusion checkpoint dropdown and select Pony, let’s now click on the Lora section and select Vixon’s Anime/Manga Styles and we’re good to prompt.
I prompted “<lora:DragonBallZXLP:1> Goku, green hair, fight, high quality, Dragon Ball Z, watercolor \(medium\), traditional media,” and clicked generate (I used the trigger words for the model, which helps give better results, you can find the trigger words on the model’s page on Civitai – Click Here)
This is the image I generated using Vixon’s Anime/Manga Styles Lora model.
Civitai serves as an innovative hub for AI enthusiasts and creators, offering a platform for refining and distributing models like Stable Diffusion. Whether it’s crafting digital art or testing out LoRA techniques, Civitai provides a wide range of tools and resources to inspire creativity. The ease of sharing and discovering models fosters a collaborative community for those passionate about AI-generated media. By utilizing Civitai, creators can explore new possibilities in AI-driven content, simplifying the process of generating distinct and captivating media.
Ans. The model vanishes from Google Drive because the mv command moves the file, removing it from its original spot. To prevent this, use the cp command instead, which duplicates the file to the target directory without deleting the original in Google Drive.
Ans. To set up a Stable Diffusion model like Photon_v1 on Google Colab, clone the Automatic1111 repository, install the required dependencies, download the model, place it in the appropriate directory, and then launch the web UI to start generating images.
Ans. A LoRA (Low-Rank Adaptation) model is a fine-tuning technique that adds extra parameters to a base model, making the fine-tuning process more efficient. On Civitai, you can download and pair LoRA models with their base models to produce specific media styles.
Ans. You can indeed run Civitai models locally on your computer. After downloading, you can use them with tools like the Stable Diffusion web UI (Automatic1111) on your local machine, as long as you have the necessary hardware, such as a GPU.