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.
lightweight-ai /model1:ecd637df
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";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run lightweight-ai/model1 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lightweight-ai/model1:ecd637dfb6bcdefb2b80fb5085468cff9febf54f13059d58816f9b84fa5e3979",
{
input: {
width: 640,
height: 1024,
prompt: "pixel art is a cartoon illustration of a dog sitting on a chair in front of a fireplace. The dog is brown and black in color and has a big smile on its face. It is wearing a red hat and is holding a cup of coffee in its paws. The fireplace is made of wood and has large flames burning around it. There is a speech bubble above the dog that reads \"What the hell.\" The background is a green wall with a window and a door. The floor is covered in dirt and there is a small table with a cup on it in the foreground.",
lora_name: "PixelArt",
lora_scale: 0.8,
num_outputs: 1,
output_format: "png",
output_quality: 100,
prompt_strength: 0.8,
num_inference_steps: 4
}
}
);
// 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 lightweight-ai/model1 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lightweight-ai/model1:ecd637dfb6bcdefb2b80fb5085468cff9febf54f13059d58816f9b84fa5e3979",
input={
"width": 640,
"height": 1024,
"prompt": "pixel art is a cartoon illustration of a dog sitting on a chair in front of a fireplace. The dog is brown and black in color and has a big smile on its face. It is wearing a red hat and is holding a cup of coffee in its paws. The fireplace is made of wood and has large flames burning around it. There is a speech bubble above the dog that reads \"What the hell.\" The background is a green wall with a window and a door. The floor is covered in dirt and there is a small table with a cup on it in the foreground.",
"lora_name": "PixelArt",
"lora_scale": 0.8,
"num_outputs": 1,
"output_format": "png",
"output_quality": 100,
"prompt_strength": 0.8,
"num_inference_steps": 4
}
)
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 lightweight-ai/model1 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": "lightweight-ai/model1:ecd637dfb6bcdefb2b80fb5085468cff9febf54f13059d58816f9b84fa5e3979",
"input": {
"width": 640,
"height": 1024,
"prompt": "pixel art is a cartoon illustration of a dog sitting on a chair in front of a fireplace. The dog is brown and black in color and has a big smile on its face. It is wearing a red hat and is holding a cup of coffee in its paws. The fireplace is made of wood and has large flames burning around it. There is a speech bubble above the dog that reads \\"What the hell.\\" The background is a green wall with a window and a door. The floor is covered in dirt and there is a small table with a cup on it in the foreground.",
"lora_name": "PixelArt",
"lora_scale": 0.8,
"num_outputs": 1,
"output_format": "png",
"output_quality": 100,
"prompt_strength": 0.8,
"num_inference_steps": 4
}
}' \
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-11-12T08:38:08.361294Z",
"created_at": "2024-11-12T08:38:03.998000Z",
"data_removed": false,
"error": null,
"id": "jyqc0rphvsrj00ck3y2vgnrdp8",
"input": {
"width": 640,
"height": 1024,
"prompt": "pixel art is a cartoon illustration of a dog sitting on a chair in front of a fireplace. The dog is brown and black in color and has a big smile on its face. It is wearing a red hat and is holding a cup of coffee in its paws. The fireplace is made of wood and has large flames burning around it. There is a speech bubble above the dog that reads \"What the hell.\" The background is a green wall with a window and a door. The floor is covered in dirt and there is a small table with a cup on it in the foreground.",
"lora_name": "PixelArt",
"lora_scale": 0.8,
"num_outputs": 1,
"output_format": "png",
"output_quality": 100,
"prompt_strength": 0.8,
"num_inference_steps": 4
},
"logs": "Using seed: 29596\nPrompt: pixel art is a cartoon illustration of a dog sitting on a chair in front of a fireplace. The dog is brown and black in color and has a big smile on its face. It is wearing a red hat and is holding a cup of coffee in its paws. The fireplace is made of wood and has large flames burning around it. There is a speech bubble above the dog that reads \"What the hell.\" The background is a green wall with a window and a door. The floor is covered in dirt and there is a small table with a cup on it in the foreground.\ntxt2img mode\nDownloading LoRA weights from - safetensor URL: https://sg-model-store.s3.ap-northeast-2.amazonaws.com/System/Lora/Pixel+Art/V1/pixelart.safetensors\n/src/weights-cache/b4bba06e5c8d5562\nLoading LoRA took: 2.65 seconds\nThe following part of your input was truncated because CLIP can only handle sequences up to 77 tokens: ['that reads \" what the hell.\" the background is a green wall with a window and a door. the floor is covered in dirt and there is a small table with a cup on it in the foreground.']\n 0%| | 0/4 [00:00<?, ?it/s]\n 25%|██▌ | 1/4 [00:00<00:01, 2.82it/s]\n 50%|█████ | 2/4 [00:00<00:00, 3.18it/s]\n 75%|███████▌ | 3/4 [00:00<00:00, 3.03it/s]\n100%|██████████| 4/4 [00:01<00:00, 2.98it/s]\n100%|██████████| 4/4 [00:01<00:00, 3.00it/s]",
"metrics": {
"predict_time": 4.353921034,
"total_time": 4.363294
},
"output": [
"https://replicate.delivery/yhqm/uzOrvA4KrVanE5P9CNQoUNHpia0604Xejfc7RdTLfOCgvYgnA/out-0.png"
],
"started_at": "2024-11-12T08:38:04.007373Z",
"status": "succeeded",
"urls": {
"stream": "https://stream.replicate.com/v1/files/qoxq-gcqkyipbie6lseyslgrxldikj52fxbynynbgadz52s72tr3fj5eq",
"get": "https://api.replicate.com/v1/predictions/jyqc0rphvsrj00ck3y2vgnrdp8",
"cancel": "https://api.replicate.com/v1/predictions/jyqc0rphvsrj00ck3y2vgnrdp8/cancel"
},
"version": "ecd637dfb6bcdefb2b80fb5085468cff9febf54f13059d58816f9b84fa5e3979"
}
Using seed: 29596
Prompt: pixel art is a cartoon illustration of a dog sitting on a chair in front of a fireplace. The dog is brown and black in color and has a big smile on its face. It is wearing a red hat and is holding a cup of coffee in its paws. The fireplace is made of wood and has large flames burning around it. There is a speech bubble above the dog that reads "What the hell." The background is a green wall with a window and a door. The floor is covered in dirt and there is a small table with a cup on it in the foreground.
txt2img mode
Downloading LoRA weights from - safetensor URL: https://sg-model-store.s3.ap-northeast-2.amazonaws.com/System/Lora/Pixel+Art/V1/pixelart.safetensors
/src/weights-cache/b4bba06e5c8d5562
Loading LoRA took: 2.65 seconds
The following part of your input was truncated because CLIP can only handle sequences up to 77 tokens: ['that reads " what the hell." the background is a green wall with a window and a door. the floor is covered in dirt and there is a small table with a cup on it in the foreground.']
0%| | 0/4 [00:00<?, ?it/s]
25%|██▌ | 1/4 [00:00<00:01, 2.82it/s]
50%|█████ | 2/4 [00:00<00:00, 3.18it/s]
75%|███████▌ | 3/4 [00:00<00:00, 3.03it/s]
100%|██████████| 4/4 [00:01<00:00, 2.98it/s]
100%|██████████| 4/4 [00:01<00:00, 3.00it/s]