defaultAn astronaut riding a rainbow unicorn
typetext
{
"apply_watermark": false,
"guidance_scale": 7.5,
"height": 768,
"high_noise_frac": 0.8,
"image": "https://replicate.delivery/pbxt/K5xtYPHAZ4BMchYyLFrhBik3rPSgSnM3CGjlJkFNDfVTszSI/Screenshot%202023-12-22%20at%2023.29.58.png",
"lora_scale": 0.8,
"negative_prompt": "",
"num_inference_steps": 25,
"num_outputs": 1,
"prompt": "A TOK emoji of a man wearing minimalistic glasses, photorealistic, white background",
"prompt_strength": 0.8,
"refine": "no_refiner",
"scheduler": "K_EULER",
"width": 768
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Njr**********************************
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 martintmv-git/emoji-me using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"martintmv-git/emoji-me:f37bd488cf23cfc519ded20ae2d87611b80efd723d6fc85229b387931da424c4",
{
input: {
apply_watermark: false,
guidance_scale: 7.5,
height: 768,
high_noise_frac: 0.8,
image: "https://replicate.delivery/pbxt/K5xtYPHAZ4BMchYyLFrhBik3rPSgSnM3CGjlJkFNDfVTszSI/Screenshot%202023-12-22%20at%2023.29.58.png",
lora_scale: 0.8,
negative_prompt: "",
num_inference_steps: 25,
num_outputs: 1,
prompt: "A TOK emoji of a man wearing minimalistic glasses, photorealistic, white background",
prompt_strength: 0.8,
refine: "no_refiner",
scheduler: "K_EULER",
width: 768
}
}
);
// 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=r8_Njr**********************************
This is your API token. Keep it to yourself.
import replicate
Run martintmv-git/emoji-me using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"martintmv-git/emoji-me:f37bd488cf23cfc519ded20ae2d87611b80efd723d6fc85229b387931da424c4",
input={
"apply_watermark": False,
"guidance_scale": 7.5,
"height": 768,
"high_noise_frac": 0.8,
"image": "https://replicate.delivery/pbxt/K5xtYPHAZ4BMchYyLFrhBik3rPSgSnM3CGjlJkFNDfVTszSI/Screenshot%202023-12-22%20at%2023.29.58.png",
"lora_scale": 0.8,
"negative_prompt": "",
"num_inference_steps": 25,
"num_outputs": 1,
"prompt": "A TOK emoji of a man wearing minimalistic glasses, photorealistic, white background",
"prompt_strength": 0.8,
"refine": "no_refiner",
"scheduler": "K_EULER",
"width": 768
}
)
# To access the file URL:
print(output[0].url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output[0].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_Njr**********************************
This is your API token. Keep it to yourself.
Run martintmv-git/emoji-me 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": "martintmv-git/emoji-me:f37bd488cf23cfc519ded20ae2d87611b80efd723d6fc85229b387931da424c4",
"input": {
"apply_watermark": false,
"guidance_scale": 7.5,
"height": 768,
"high_noise_frac": 0.8,
"image": "https://replicate.delivery/pbxt/K5xtYPHAZ4BMchYyLFrhBik3rPSgSnM3CGjlJkFNDfVTszSI/Screenshot%202023-12-22%20at%2023.29.58.png",
"lora_scale": 0.8,
"negative_prompt": "",
"num_inference_steps": 25,
"num_outputs": 1,
"prompt": "A TOK emoji of a man wearing minimalistic glasses, photorealistic, white background",
"prompt_strength": 0.8,
"refine": "no_refiner",
"scheduler": "K_EULER",
"width": 768
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "m2p6h7tby2ttiqr5ytroyquyiq",
"model": "martintmv-git/emoji-me",
"version": "f37bd488cf23cfc519ded20ae2d87611b80efd723d6fc85229b387931da424c4",
"input": {
"apply_watermark": false,
"guidance_scale": 7.5,
"height": 768,
"high_noise_frac": 0.8,
"image": "https://replicate.delivery/pbxt/K5xtYPHAZ4BMchYyLFrhBik3rPSgSnM3CGjlJkFNDfVTszSI/Screenshot%202023-12-22%20at%2023.29.58.png",
"lora_scale": 0.8,
"negative_prompt": "",
"num_inference_steps": 25,
"num_outputs": 1,
"prompt": "A TOK emoji of a man wearing minimalistic glasses, photorealistic, white background",
"prompt_strength": 0.8,
"refine": "no_refiner",
"scheduler": "K_EULER",
"width": 768
},
"logs": "Using seed: 61049\nLoading fine-tuned model\nDoes not have Unet. assume we are using LoRA\nLoading Unet LoRA\nPrompt: A <s0><s1> emoji of a man wearing minimalistic glasses, photorealistic, white background\nimg2img mode\n 0%| | 0/20 [00:00<?, ?it/s]\n 5%|▌ | 1/20 [00:00<00:08, 2.30it/s]\n 10%|█ | 2/20 [00:00<00:07, 2.30it/s]\n 15%|█▌ | 3/20 [00:01<00:07, 2.30it/s]\n 20%|██ | 4/20 [00:01<00:06, 2.30it/s]\n 25%|██▌ | 5/20 [00:02<00:06, 2.30it/s]\n 30%|███ | 6/20 [00:02<00:06, 2.30it/s]\n 35%|███▌ | 7/20 [00:03<00:05, 2.29it/s]\n 40%|████ | 8/20 [00:03<00:05, 2.29it/s]\n 45%|████▌ | 9/20 [00:03<00:04, 2.29it/s]\n 50%|█████ | 10/20 [00:04<00:04, 2.29it/s]\n 55%|█████▌ | 11/20 [00:04<00:03, 2.29it/s]\n 60%|██████ | 12/20 [00:05<00:03, 2.29it/s]\n 65%|██████▌ | 13/20 [00:05<00:03, 2.29it/s]\n 70%|███████ | 14/20 [00:06<00:02, 2.29it/s]\n 75%|███████▌ | 15/20 [00:06<00:02, 2.29it/s]\n 80%|████████ | 16/20 [00:06<00:01, 2.29it/s]\n 85%|████████▌ | 17/20 [00:07<00:01, 2.29it/s]\n 90%|█████████ | 18/20 [00:07<00:00, 2.28it/s]\n 95%|█████████▌| 19/20 [00:08<00:00, 2.28it/s]\n100%|██████████| 20/20 [00:08<00:00, 2.28it/s]\n100%|██████████| 20/20 [00:08<00:00, 2.29it/s]",
"output": [
"https://replicate.delivery/pbxt/AfjhA9W2neqDrE9Uf2UJ5Yq20XrqHROYb7YuPvuFa0MNY2JkA/out-0.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-12-22T21:34:48.063935Z",
"started_at": "2023-12-22T21:34:50.714083Z",
"completed_at": "2023-12-22T21:35:03.417535Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/m2p6h7tby2ttiqr5ytroyquyiq/cancel",
"get": "https://api.replicate.com/v1/predictions/m2p6h7tby2ttiqr5ytroyquyiq"
},
"metrics": {
"predict_time": 12.703452,
"total_time": 15.3536
}
}
