Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
adirik /realvisxl-v4.0-lightning:2ef27001
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run adirik/realvisxl-v4.0-lightning using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"adirik/realvisxl-v4.0-lightning:2ef27001faad83347bf7a4186c7a39bb162380c5d7fd1d0bf29fe08410229559",
{
input: {
width: 768,
height: 768,
prompt: "An old couple holding hands and walking on the beach",
refine: "expert_ensemble_refiner",
scheduler: "DPM++_SDE_Karras",
num_outputs: 1,
refine_steps: 4,
guidance_scale: 2,
apply_watermark: false,
high_noise_frac: 0.8,
negative_prompt: "(worst quality, low quality, illustration, 3d, 2d, painting, cartoons, sketch), open mouth",
prompt_strength: 0.8,
num_inference_steps: 6
}
}
);
// To access the file URL:
console.log(output[0].url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output[0]);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run adirik/realvisxl-v4.0-lightning using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"adirik/realvisxl-v4.0-lightning:2ef27001faad83347bf7a4186c7a39bb162380c5d7fd1d0bf29fe08410229559",
input={
"width": 768,
"height": 768,
"prompt": "An old couple holding hands and walking on the beach",
"refine": "expert_ensemble_refiner",
"scheduler": "DPM++_SDE_Karras",
"num_outputs": 1,
"refine_steps": 4,
"guidance_scale": 2,
"apply_watermark": False,
"high_noise_frac": 0.8,
"negative_prompt": "(worst quality, low quality, illustration, 3d, 2d, painting, cartoons, sketch), open mouth",
"prompt_strength": 0.8,
"num_inference_steps": 6
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run adirik/realvisxl-v4.0-lightning using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"version": "adirik/realvisxl-v4.0-lightning:2ef27001faad83347bf7a4186c7a39bb162380c5d7fd1d0bf29fe08410229559",
"input": {
"width": 768,
"height": 768,
"prompt": "An old couple holding hands and walking on the beach",
"refine": "expert_ensemble_refiner",
"scheduler": "DPM++_SDE_Karras",
"num_outputs": 1,
"refine_steps": 4,
"guidance_scale": 2,
"apply_watermark": false,
"high_noise_frac": 0.8,
"negative_prompt": "(worst quality, low quality, illustration, 3d, 2d, painting, cartoons, sketch), open mouth",
"prompt_strength": 0.8,
"num_inference_steps": 6
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2024-03-11T14:38:48.610327Z",
"created_at": "2024-03-11T14:37:20.118941Z",
"data_removed": false,
"error": null,
"id": "l2ln5p3bw2j5fypbloedlmdifq",
"input": {
"width": 768,
"height": 768,
"prompt": "An old couple holding hands and walking on the beach",
"refine": "expert_ensemble_refiner",
"scheduler": "DPM++_SDE_Karras",
"num_outputs": 1,
"refine_steps": 4,
"guidance_scale": 2,
"apply_watermark": false,
"high_noise_frac": 0.8,
"negative_prompt": "(worst quality, low quality, illustration, 3d, 2d, painting, cartoons, sketch), open mouth",
"prompt_strength": 0.8,
"num_inference_steps": 6
},
"logs": "Using seed: 834\nPrompt: An old couple holding hands and walking on the beach\ntxt2img mode\n 0%| | 0/4 [00:00<?, ?it/s]\n 25%|██▌ | 1/4 [00:00<00:01, 1.51it/s]\n 50%|█████ | 2/4 [00:00<00:00, 2.91it/s]\n 75%|███████▌ | 3/4 [00:00<00:00, 4.12it/s]\n100%|██████████| 4/4 [00:01<00:00, 5.12it/s]\n100%|██████████| 4/4 [00:01<00:00, 3.89it/s]\n 0%| | 0/2 [00:00<?, ?it/s]\n 50%|█████ | 1/2 [00:00<00:00, 7.18it/s]\n100%|██████████| 2/2 [00:00<00:00, 7.61it/s]\n100%|██████████| 2/2 [00:00<00:00, 7.53it/s]",
"metrics": {
"predict_time": 3.930859,
"total_time": 88.491386
},
"output": [
"https://replicate.delivery/pbxt/SAtDdzcZkB6CO9rt4cK9Hrrk5HNOFfuYmkljetg52YfuLZeJB/out-0.png"
],
"started_at": "2024-03-11T14:38:44.679468Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/l2ln5p3bw2j5fypbloedlmdifq",
"cancel": "https://api.replicate.com/v1/predictions/l2ln5p3bw2j5fypbloedlmdifq/cancel"
},
"version": "2ef27001faad83347bf7a4186c7a39bb162380c5d7fd1d0bf29fe08410229559"
}
Using seed: 834
Prompt: An old couple holding hands and walking on the beach
txt2img mode
0%| | 0/4 [00:00<?, ?it/s]
25%|██▌ | 1/4 [00:00<00:01, 1.51it/s]
50%|█████ | 2/4 [00:00<00:00, 2.91it/s]
75%|███████▌ | 3/4 [00:00<00:00, 4.12it/s]
100%|██████████| 4/4 [00:01<00:00, 5.12it/s]
100%|██████████| 4/4 [00:01<00:00, 3.89it/s]
0%| | 0/2 [00:00<?, ?it/s]
50%|█████ | 1/2 [00:00<00:00, 7.18it/s]
100%|██████████| 2/2 [00:00<00:00, 7.61it/s]
100%|██████████| 2/2 [00:00<00:00, 7.53it/s]