defaulta cat wearing glasses at the beach
typetext
{
"guidance_scale": 4,
"image1": "https://replicate.delivery/pbxt/KNhvYb6Ux4ZbIu4C0W9W5Z2DDOkFvhwSl9h3O0zv8sbQuf5N/cat.png",
"image2": "https://replicate.delivery/pbxt/KNhvYqUGSU8ZuYWSX0UiJswZ0hLV63GSzeKT4CV0RRU1W4rc/blue_sunglasses.png",
"negative_prompt": "over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry",
"num_inference_steps": 50,
"prompt": "a cat wearing glasses at the beach",
"subject_category1": "cat",
"subject_category2": "glasses"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_2CE**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run cjwbw/lambda-eclipse using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"cjwbw/lambda-eclipse:0e36b028d4ed70538c3e6ad369ebd2acf872b41e339b0adf1f6f7d095e248a55",
{
input: {
guidance_scale: 4,
image1: "https://replicate.delivery/pbxt/KNhvYb6Ux4ZbIu4C0W9W5Z2DDOkFvhwSl9h3O0zv8sbQuf5N/cat.png",
image2: "https://replicate.delivery/pbxt/KNhvYqUGSU8ZuYWSX0UiJswZ0hLV63GSzeKT4CV0RRU1W4rc/blue_sunglasses.png",
negative_prompt: "over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry",
num_inference_steps: 50,
prompt: "a cat wearing glasses at the beach",
subject_category1: "cat",
subject_category2: "glasses"
}
}
);
// To access the file URL:
console.log(output.url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", 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=r8_2CE**********************************
This is your API token. Keep it to yourself.
import replicate
Run cjwbw/lambda-eclipse using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"cjwbw/lambda-eclipse:0e36b028d4ed70538c3e6ad369ebd2acf872b41e339b0adf1f6f7d095e248a55",
input={
"guidance_scale": 4,
"image1": "https://replicate.delivery/pbxt/KNhvYb6Ux4ZbIu4C0W9W5Z2DDOkFvhwSl9h3O0zv8sbQuf5N/cat.png",
"image2": "https://replicate.delivery/pbxt/KNhvYqUGSU8ZuYWSX0UiJswZ0hLV63GSzeKT4CV0RRU1W4rc/blue_sunglasses.png",
"negative_prompt": "over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry",
"num_inference_steps": 50,
"prompt": "a cat wearing glasses at the beach",
"subject_category1": "cat",
"subject_category2": "glasses"
}
)
# To access the file URL:
print(output.url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_2CE**********************************
This is your API token. Keep it to yourself.
Run cjwbw/lambda-eclipse 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": "cjwbw/lambda-eclipse:0e36b028d4ed70538c3e6ad369ebd2acf872b41e339b0adf1f6f7d095e248a55",
"input": {
"guidance_scale": 4,
"image1": "https://replicate.delivery/pbxt/KNhvYb6Ux4ZbIu4C0W9W5Z2DDOkFvhwSl9h3O0zv8sbQuf5N/cat.png",
"image2": "https://replicate.delivery/pbxt/KNhvYqUGSU8ZuYWSX0UiJswZ0hLV63GSzeKT4CV0RRU1W4rc/blue_sunglasses.png",
"negative_prompt": "over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry",
"num_inference_steps": 50,
"prompt": "a cat wearing glasses at the beach",
"subject_category1": "cat",
"subject_category2": "glasses"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "io7rpm3bsnmvixw34b3buj33pq",
"model": "cjwbw/lambda-eclipse",
"version": "0e36b028d4ed70538c3e6ad369ebd2acf872b41e339b0adf1f6f7d095e248a55",
"input": {
"guidance_scale": 4,
"image1": "https://replicate.delivery/pbxt/KNhvYb6Ux4ZbIu4C0W9W5Z2DDOkFvhwSl9h3O0zv8sbQuf5N/cat.png",
"image2": "https://replicate.delivery/pbxt/KNhvYqUGSU8ZuYWSX0UiJswZ0hLV63GSzeKT4CV0RRU1W4rc/blue_sunglasses.png",
"negative_prompt": "over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry",
"num_inference_steps": 50,
"prompt": "a cat wearing glasses at the beach",
"subject_category1": "cat",
"subject_category2": "glasses"
},
"logs": "Using seed: 50866\n 0%| | 0/50 [00:00<?, ?it/s]\n 4%|▍ | 2/50 [00:00<00:03, 12.38it/s]\n 8%|▊ | 4/50 [00:00<00:03, 12.44it/s]\n 12%|█▏ | 6/50 [00:00<00:03, 12.47it/s]\n 16%|█▌ | 8/50 [00:00<00:03, 12.49it/s]\n 20%|██ | 10/50 [00:00<00:03, 12.49it/s]\n 24%|██▍ | 12/50 [00:00<00:03, 12.52it/s]\n 28%|██▊ | 14/50 [00:01<00:02, 12.53it/s]\n 32%|███▏ | 16/50 [00:01<00:02, 12.56it/s]\n 36%|███▌ | 18/50 [00:01<00:02, 12.58it/s]\n 40%|████ | 20/50 [00:01<00:02, 12.60it/s]\n 44%|████▍ | 22/50 [00:01<00:02, 12.60it/s]\n 48%|████▊ | 24/50 [00:01<00:02, 12.55it/s]\n 52%|█████▏ | 26/50 [00:02<00:01, 12.56it/s]\n 56%|█████▌ | 28/50 [00:02<00:01, 12.58it/s]\n 60%|██████ | 30/50 [00:02<00:01, 12.59it/s]\n 64%|██████▍ | 32/50 [00:02<00:01, 12.58it/s]\n 68%|██████▊ | 34/50 [00:02<00:01, 12.60it/s]\n 72%|███████▏ | 36/50 [00:02<00:01, 12.61it/s]\n 76%|███████▌ | 38/50 [00:03<00:00, 12.61it/s]\n 80%|████████ | 40/50 [00:03<00:00, 12.61it/s]\n 84%|████████▍ | 42/50 [00:03<00:00, 12.61it/s]\n 88%|████████▊ | 44/50 [00:03<00:00, 12.61it/s]\n 92%|█████████▏| 46/50 [00:03<00:00, 12.60it/s]\n 96%|█████████▌| 48/50 [00:03<00:00, 12.60it/s]\n100%|██████████| 50/50 [00:03<00:00, 12.60it/s]\n100%|██████████| 50/50 [00:03<00:00, 12.57it/s]",
"output": "https://replicate.delivery/pbxt/hrAQiNWHRxZqAhezHKf5rSyN39iXFCgKmS711HqubX4eE3qkA/out.png",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-02-10T23:28:24.848434Z",
"started_at": "2024-02-10T23:28:24.884909Z",
"completed_at": "2024-02-10T23:28:31.887973Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/io7rpm3bsnmvixw34b3buj33pq/cancel",
"get": "https://api.replicate.com/v1/predictions/io7rpm3bsnmvixw34b3buj33pq"
},
"metrics": {
"predict_time": 7.003064,
"total_time": 7.039539
}
}

