Costs
Using LoRA adapters increases the price of images if you generate them by using LoRA adapters. See the price list for text-to-image models.Prerequisites
If you want to use a Python script or a cURL command, meet the requirements below. If you want to work in the web interface, no prerequisites are needed.- Create an API key for authentication.
-
Save the API key to an environment variable:
-
Install the
requests
andipyplot
packages:
Steps
Get the link to the LoRA adapter
- On Civitai, go to the Models section.
-
Open the page of the required LoRA adapter.
If you do not deploy your own adapter and want to select it on Civitai, set the following filters to find appropriate variants:
- Model types:
LoRA
. - Base model: select one of the text-to-image models that Nebius AI Studio supports.
- Model types:
-
On the LoRA adapter page, copy the download link:
- Right-click the button.
- In the context menu, select Copy link.
Generate an image
Run the Python script below. It generates the image of a cat in the style of Studio Ghibli and dark fairytales. The script stores the image file with the To generate the image by using the script above:
.webp
extension in the local images
directory.-
Configure the
loras
parameter. It allows you to build LoRA adapters into the model matrices and to create an image in the required style. Set the following parameters:-
loras.url
: The download link to Civitai that you received earlier. -
loras.scale
(optional): The LoRA adapter scale. This parameter influences how strongly the image style is applied. For example, the style is more pronounced in images if the scale is3
and less pronounced if the scale is0.5
. The default value is1
.
-
-
(Optional) To apply several LoRA adapters, add them to the
loras
list:You can add no more than four LoRA adapters. They are combined together. -
In the
prompt
parameter, specify a prompt with a trigger word. This is the word that triggers the LoRA adapter and helps apply the image style. You can find the trigger word on the LoRA adapter page at Civitai. For example, the Hand Detail FLUX & XL LoRA adapter has the trigger words “detailed hands” so your prompt can be “Generate an image with detailed hands.”