You're looking at a specific version of this model. Jump to the model overview.
lucataco /pixart-xl-2:816c9967
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 lucataco/pixart-xl-2 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lucataco/pixart-xl-2:816c99673841b9448bc2539834c16d40e0315bbf92fef0317b57a226727409bb",
{
input: {
style: "None",
width: 1024,
height: 1024,
prompt: "an astronaut sitting in a diner, eating fries, cinematic, analog film",
scheduler: "DPMSolverMultistep",
num_outputs: 1,
guidance_scale: 4.5,
num_inference_steps: 14
}
}
);
console.log(output);
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 lucataco/pixart-xl-2 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/pixart-xl-2:816c99673841b9448bc2539834c16d40e0315bbf92fef0317b57a226727409bb",
input={
"style": "None",
"width": 1024,
"height": 1024,
"prompt": "an astronaut sitting in a diner, eating fries, cinematic, analog film",
"scheduler": "DPMSolverMultistep",
"num_outputs": 1,
"guidance_scale": 4.5,
"num_inference_steps": 14
}
)
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 lucataco/pixart-xl-2 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": "816c99673841b9448bc2539834c16d40e0315bbf92fef0317b57a226727409bb",
"input": {
"style": "None",
"width": 1024,
"height": 1024,
"prompt": "an astronaut sitting in a diner, eating fries, cinematic, analog film",
"scheduler": "DPMSolverMultistep",
"num_outputs": 1,
"guidance_scale": 4.5,
"num_inference_steps": 14
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
brew install cog
If you don’t have Homebrew, there are other installation options available.
Run this to download the model and run it in your local environment:
cog predict r8.im/lucataco/pixart-xl-2@sha256:816c99673841b9448bc2539834c16d40e0315bbf92fef0317b57a226727409bb \
-i 'style="None"' \
-i 'width=1024' \
-i 'height=1024' \
-i 'prompt="an astronaut sitting in a diner, eating fries, cinematic, analog film"' \
-i 'scheduler="DPMSolverMultistep"' \
-i 'num_outputs=1' \
-i 'guidance_scale=4.5' \
-i 'num_inference_steps=14'
To learn more, take a look at the Cog documentation.
Run this to download the model and run it in your local environment:
docker run -d -p 5000:5000 --gpus=all r8.im/lucataco/pixart-xl-2@sha256:816c99673841b9448bc2539834c16d40e0315bbf92fef0317b57a226727409bb
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "style": "None", "width": 1024, "height": 1024, "prompt": "an astronaut sitting in a diner, eating fries, cinematic, analog film", "scheduler": "DPMSolverMultistep", "num_outputs": 1, "guidance_scale": 4.5, "num_inference_steps": 14 } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Add a payment method to run this model.
Each run costs approximately $0.044. Alternatively, try out our featured models for free.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2023-12-04T04:30:13.212351Z",
"created_at": "2023-12-04T04:27:50.578331Z",
"data_removed": false,
"error": null,
"id": "o23ccgdbvi46p2uvxuqrhoccry",
"input": {
"style": "None",
"width": 1024,
"height": 1024,
"prompt": "an astronaut sitting in a diner, eating fries, cinematic, analog film",
"scheduler": "DPMSolverMultistep",
"num_outputs": 1,
"guidance_scale": 4.5,
"num_inference_steps": 14
},
"logs": "Using seed: 255397398\nPrompt: an astronaut sitting in a diner, eating fries, cinematic, analog film Negative Prompt: None\n 0%| | 0/14 [00:00<?, ?it/s]\n 7%|▋ | 1/14 [00:00<00:04, 2.86it/s]\n 14%|█▍ | 2/14 [00:00<00:03, 3.16it/s]\n 21%|██▏ | 3/14 [00:00<00:03, 3.26it/s]\n 29%|██▊ | 4/14 [00:01<00:03, 3.29it/s]\n 36%|███▌ | 5/14 [00:01<00:02, 3.32it/s]\n 43%|████▎ | 6/14 [00:01<00:02, 3.34it/s]\n 50%|█████ | 7/14 [00:02<00:02, 3.35it/s]\n 57%|█████▋ | 8/14 [00:02<00:01, 3.36it/s]\n 64%|██████▍ | 9/14 [00:02<00:01, 3.36it/s]\n 71%|███████▏ | 10/14 [00:03<00:01, 3.36it/s]\n 79%|███████▊ | 11/14 [00:03<00:00, 3.36it/s]\n 86%|████████▌ | 12/14 [00:03<00:00, 3.36it/s]\n 93%|█████████▎| 13/14 [00:03<00:00, 3.36it/s]\n100%|██████████| 14/14 [00:04<00:00, 3.36it/s]\n100%|██████████| 14/14 [00:04<00:00, 3.33it/s]",
"metrics": {
"predict_time": 6.041227,
"total_time": 142.63402
},
"output": [
"https://replicate.delivery/pbxt/nSBVHLqeoD1KECVJ5OJSm90ihtI0zm4qeBvQ9ACZNMQUfg9jA/out-0.png"
],
"started_at": "2023-12-04T04:30:07.171124Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/o23ccgdbvi46p2uvxuqrhoccry",
"cancel": "https://api.replicate.com/v1/predictions/o23ccgdbvi46p2uvxuqrhoccry/cancel"
},
"version": "816c99673841b9448bc2539834c16d40e0315bbf92fef0317b57a226727409bb"
}
Using seed: 255397398
Prompt: an astronaut sitting in a diner, eating fries, cinematic, analog film Negative Prompt: None
0%| | 0/14 [00:00<?, ?it/s]
7%|▋ | 1/14 [00:00<00:04, 2.86it/s]
14%|█▍ | 2/14 [00:00<00:03, 3.16it/s]
21%|██▏ | 3/14 [00:00<00:03, 3.26it/s]
29%|██▊ | 4/14 [00:01<00:03, 3.29it/s]
36%|███▌ | 5/14 [00:01<00:02, 3.32it/s]
43%|████▎ | 6/14 [00:01<00:02, 3.34it/s]
50%|█████ | 7/14 [00:02<00:02, 3.35it/s]
57%|█████▋ | 8/14 [00:02<00:01, 3.36it/s]
64%|██████▍ | 9/14 [00:02<00:01, 3.36it/s]
71%|███████▏ | 10/14 [00:03<00:01, 3.36it/s]
79%|███████▊ | 11/14 [00:03<00:00, 3.36it/s]
86%|████████▌ | 12/14 [00:03<00:00, 3.36it/s]
93%|█████████▎| 13/14 [00:03<00:00, 3.36it/s]
100%|██████████| 14/14 [00:04<00:00, 3.36it/s]
100%|██████████| 14/14 [00:04<00:00, 3.33it/s]