defaultAn astronaut riding a rainbow unicorn
typetext
{
"apply_watermark": true,
"guidance_scale": 7.5,
"height": 1024,
"high_noise_frac": 0.8,
"lora_scale": 0.6,
"negative_prompt": "",
"num_inference_steps": 50,
"num_outputs": 4,
"prompt": "profile of TOK, formal wear, professional photograph, DSLR",
"prompt_strength": 0.8,
"refine": "no_refiner",
"scheduler": "K_EULER",
"width": 1024
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_PAL**********************************
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 extrange/qinxiang using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"extrange/qinxiang:9f927bc8a17986b557daa8e4f655ef7c09a112e4e0ec5ba6806f36e56ec9f56b",
{
input: {
apply_watermark: true,
guidance_scale: 7.5,
height: 1024,
high_noise_frac: 0.8,
lora_scale: 0.6,
negative_prompt: "",
num_inference_steps: 50,
num_outputs: 4,
prompt: "profile of TOK, formal wear, professional photograph, DSLR",
prompt_strength: 0.8,
refine: "no_refiner",
scheduler: "K_EULER",
width: 1024
}
}
);
// 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_PAL**********************************
This is your API token. Keep it to yourself.
import replicate
Run extrange/qinxiang using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"extrange/qinxiang:9f927bc8a17986b557daa8e4f655ef7c09a112e4e0ec5ba6806f36e56ec9f56b",
input={
"apply_watermark": True,
"guidance_scale": 7.5,
"height": 1024,
"high_noise_frac": 0.8,
"lora_scale": 0.6,
"negative_prompt": "",
"num_inference_steps": 50,
"num_outputs": 4,
"prompt": "profile of TOK, formal wear, professional photograph, DSLR",
"prompt_strength": 0.8,
"refine": "no_refiner",
"scheduler": "K_EULER",
"width": 1024
}
)
# 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_PAL**********************************
This is your API token. Keep it to yourself.
Run extrange/qinxiang 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": "extrange/qinxiang:9f927bc8a17986b557daa8e4f655ef7c09a112e4e0ec5ba6806f36e56ec9f56b",
"input": {
"apply_watermark": true,
"guidance_scale": 7.5,
"height": 1024,
"high_noise_frac": 0.8,
"lora_scale": 0.6,
"negative_prompt": "",
"num_inference_steps": 50,
"num_outputs": 4,
"prompt": "profile of TOK, formal wear, professional photograph, DSLR",
"prompt_strength": 0.8,
"refine": "no_refiner",
"scheduler": "K_EULER",
"width": 1024
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "iy2tuv3bjmmh35pwkeuzok2cwm",
"model": "extrange/qinxiang",
"version": "9f927bc8a17986b557daa8e4f655ef7c09a112e4e0ec5ba6806f36e56ec9f56b",
"input": {
"apply_watermark": true,
"guidance_scale": 7.5,
"height": 1024,
"high_noise_frac": 0.8,
"lora_scale": 0.6,
"negative_prompt": "",
"num_inference_steps": 50,
"num_outputs": 4,
"prompt": "profile of TOK, formal wear, professional photograph, DSLR",
"prompt_strength": 0.8,
"refine": "no_refiner",
"scheduler": "K_EULER",
"width": 1024
},
"logs": "Using seed: 43767\nEnsuring enough disk space...\nFree disk space: 1553610043392\nDownloading weights: https://pbxt.replicate.delivery/kNaheb5WGz3TG6gDZgmEQBBe27HmyvXff2R9iyLa3UIckzHHB/trained_model.tar\nb'Downloaded 186 MB bytes in 4.320s (43 MB/s)\\nExtracted 186 MB in 0.078s (2.4 GB/s)\\n'\nDownloaded weights in 4.760844707489014 seconds\nLoading fine-tuned model\nDoes not have Unet. assume we are using LoRA\nLoading Unet LoRA\nPrompt: profile of <s0><s1>, formal wear, professional photograph, DSLR\ntxt2img mode\n 0%| | 0/50 [00:00<?, ?it/s]\n 2%|▏ | 1/50 [00:01<00:51, 1.05s/it]\n 4%|▍ | 2/50 [00:02<00:50, 1.05s/it]\n 6%|▌ | 3/50 [00:03<00:49, 1.04s/it]\n 8%|▊ | 4/50 [00:04<00:48, 1.05s/it]\n 10%|█ | 5/50 [00:05<00:47, 1.05s/it]\n 12%|█▏ | 6/50 [00:06<00:46, 1.05s/it]\n 14%|█▍ | 7/50 [00:07<00:45, 1.05s/it]\n 16%|█▌ | 8/50 [00:08<00:44, 1.05s/it]\n 18%|█▊ | 9/50 [00:09<00:43, 1.05s/it]\n 20%|██ | 10/50 [00:10<00:41, 1.05s/it]\n 22%|██▏ | 11/50 [00:11<00:40, 1.05s/it]\n 24%|██▍ | 12/50 [00:12<00:39, 1.05s/it]\n 26%|██▌ | 13/50 [00:13<00:38, 1.05s/it]\n 28%|██▊ | 14/50 [00:14<00:37, 1.05s/it]\n 30%|███ | 15/50 [00:15<00:36, 1.05s/it]\n 32%|███▏ | 16/50 [00:16<00:35, 1.05s/it]\n 34%|███▍ | 17/50 [00:17<00:34, 1.05s/it]\n 36%|███▌ | 18/50 [00:18<00:33, 1.05s/it]\n 38%|███▊ | 19/50 [00:19<00:32, 1.05s/it]\n 40%|████ | 20/50 [00:20<00:31, 1.05s/it]\n 42%|████▏ | 21/50 [00:21<00:30, 1.05s/it]\n 44%|████▍ | 22/50 [00:23<00:29, 1.05s/it]\n 46%|████▌ | 23/50 [00:24<00:28, 1.05s/it]\n 48%|████▊ | 24/50 [00:25<00:27, 1.05s/it]\n 50%|█████ | 25/50 [00:26<00:26, 1.05s/it]\n 52%|█████▏ | 26/50 [00:27<00:25, 1.05s/it]\n 54%|█████▍ | 27/50 [00:28<00:24, 1.05s/it]\n 56%|█████▌ | 28/50 [00:29<00:23, 1.05s/it]\n 58%|█████▊ | 29/50 [00:30<00:22, 1.05s/it]\n 60%|██████ | 30/50 [00:31<00:20, 1.05s/it]\n 62%|██████▏ | 31/50 [00:32<00:19, 1.05s/it]\n 64%|██████▍ | 32/50 [00:33<00:18, 1.05s/it]\n 66%|██████▌ | 33/50 [00:34<00:17, 1.05s/it]\n 68%|██████▊ | 34/50 [00:35<00:16, 1.05s/it]\n 70%|███████ | 35/50 [00:36<00:15, 1.05s/it]\n 72%|███████▏ | 36/50 [00:37<00:14, 1.05s/it]\n 74%|███████▍ | 37/50 [00:38<00:13, 1.05s/it]\n 76%|███████▌ | 38/50 [00:39<00:12, 1.05s/it]\n 78%|███████▊ | 39/50 [00:40<00:11, 1.05s/it]\n 80%|████████ | 40/50 [00:41<00:10, 1.05s/it]\n 82%|████████▏ | 41/50 [00:42<00:09, 1.05s/it]\n 84%|████████▍ | 42/50 [00:44<00:08, 1.05s/it]\n 86%|████████▌ | 43/50 [00:45<00:07, 1.05s/it]\n 88%|████████▊ | 44/50 [00:46<00:06, 1.05s/it]\n 90%|█████████ | 45/50 [00:47<00:05, 1.05s/it]\n 92%|█████████▏| 46/50 [00:48<00:04, 1.05s/it]\n 94%|█████████▍| 47/50 [00:49<00:03, 1.05s/it]\n 96%|█████████▌| 48/50 [00:50<00:02, 1.05s/it]\n 98%|█████████▊| 49/50 [00:51<00:01, 1.05s/it]\n100%|██████████| 50/50 [00:52<00:00, 1.05s/it]\n100%|██████████| 50/50 [00:52<00:00, 1.05s/it]",
"output": [
"https://pbxt.replicate.delivery/2T2Ba6koW2bVEJkZdN1Xt8Xav3RvQqm7fqyW2s5KJRRktF5IA/out-0.png",
"https://pbxt.replicate.delivery/QmL5otbAuOodC13yg0tT68iIflRHnQ8YFNSEnBhHJK0ktF5IA/out-1.png",
"https://pbxt.replicate.delivery/mfa2OI4DCesU0U7UbvNIC1zy6d4xTZDscA41LXjqRW8JbLyRA/out-2.png",
"https://pbxt.replicate.delivery/SJS8eGLCppXnVi2TIvZHoYMsRuNINZR5vssf4eFekjvmstIHB/out-3.png"
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-10-27T00:29:59.384097Z",
"started_at": "2023-10-27T00:30:02.542474Z",
"completed_at": "2023-10-27T00:31:06.031361Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/iy2tuv3bjmmh35pwkeuzok2cwm/cancel",
"get": "https://api.replicate.com/v1/predictions/iy2tuv3bjmmh35pwkeuzok2cwm"
},
"metrics": {
"predict_time": 63.488887,
"total_time": 66.647264
}
}


