You're looking at a specific version of this model. Jump to the model overview.
sontungpytn /genshin-ai-image-x:bb775fc8
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 sontungpytn/genshin-ai-image-x using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"sontungpytn/genshin-ai-image-x:bb775fc8060914b8baade7123a7ff41e9df8904aa129cf4517bd1bd5d8fa3b84",
{
input: {
width: 512,
height: 512,
prompt: "1girl, solo, umbrella, moonlight, city, butterfly, detail background",
character: "raidenshogundef",
scheduler: "K_EULER",
num_outputs: 1,
guidance_scale: 7,
negative_prompt: "paintings, sketches, fingers, (worst quality:2), (low quality:2)",
num_inference_steps: 24
}
}
);
// 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 sontungpytn/genshin-ai-image-x using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"sontungpytn/genshin-ai-image-x:bb775fc8060914b8baade7123a7ff41e9df8904aa129cf4517bd1bd5d8fa3b84",
input={
"width": 512,
"height": 512,
"prompt": "1girl, solo, umbrella, moonlight, city, butterfly, detail background",
"character": "raidenshogundef",
"scheduler": "K_EULER",
"num_outputs": 1,
"guidance_scale": 7,
"negative_prompt": "paintings, sketches, fingers, (worst quality:2), (low quality:2)",
"num_inference_steps": 24
}
)
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 sontungpytn/genshin-ai-image-x 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": "sontungpytn/genshin-ai-image-x:bb775fc8060914b8baade7123a7ff41e9df8904aa129cf4517bd1bd5d8fa3b84",
"input": {
"width": 512,
"height": 512,
"prompt": "1girl, solo, umbrella, moonlight, city, butterfly, detail background",
"character": "raidenshogundef",
"scheduler": "K_EULER",
"num_outputs": 1,
"guidance_scale": 7,
"negative_prompt": "paintings, sketches, fingers, (worst quality:2), (low quality:2)",
"num_inference_steps": 24
}
}' \
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/sontungpytn/genshin-ai-image-x@sha256:bb775fc8060914b8baade7123a7ff41e9df8904aa129cf4517bd1bd5d8fa3b84 \
-i 'width=512' \
-i 'height=512' \
-i 'prompt="1girl, solo, umbrella, moonlight, city, butterfly, detail background"' \
-i 'character="raidenshogundef"' \
-i 'scheduler="K_EULER"' \
-i 'num_outputs=1' \
-i 'guidance_scale=7' \
-i 'negative_prompt="paintings, sketches, fingers, (worst quality:2), (low quality:2)"' \
-i 'num_inference_steps=24'
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/sontungpytn/genshin-ai-image-x@sha256:bb775fc8060914b8baade7123a7ff41e9df8904aa129cf4517bd1bd5d8fa3b84
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "width": 512, "height": 512, "prompt": "1girl, solo, umbrella, moonlight, city, butterfly, detail background", "character": "raidenshogundef", "scheduler": "K_EULER", "num_outputs": 1, "guidance_scale": 7, "negative_prompt": "paintings, sketches, fingers, (worst quality:2), (low quality:2)", "num_inference_steps": 24 } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2023-11-16T19:08:43.718000Z",
"created_at": "2023-11-16T19:08:38.051086Z",
"data_removed": false,
"error": null,
"id": "76bo2trbbuxjurxeqofpjjt6i4",
"input": {
"width": 512,
"height": 512,
"prompt": "1girl, solo, umbrella, moonlight, city, butterfly, detail background",
"character": "raidenshogundef",
"scheduler": "K_EULER",
"num_outputs": 1,
"guidance_scale": 7,
"negative_prompt": "paintings, sketches, fingers, (worst quality:2), (low quality:2)",
"num_inference_steps": 24
},
"logs": "Using seed: 14262892\n 0%| | 0/24 [00:00<?, ?it/s]\n 4%|▍ | 1/24 [00:00<00:05, 3.92it/s]\n 8%|▊ | 2/24 [00:00<00:04, 4.80it/s]\n 12%|█▎ | 3/24 [00:00<00:04, 5.17it/s]\n 17%|█▋ | 4/24 [00:00<00:03, 5.36it/s]\n 21%|██ | 5/24 [00:00<00:03, 5.47it/s]\n 25%|██▌ | 6/24 [00:01<00:03, 5.55it/s]\n 29%|██▉ | 7/24 [00:01<00:03, 5.53it/s]\n 33%|███▎ | 8/24 [00:01<00:02, 5.56it/s]\n 38%|███▊ | 9/24 [00:01<00:02, 5.60it/s]\n 42%|████▏ | 10/24 [00:01<00:02, 5.61it/s]\n 46%|████▌ | 11/24 [00:02<00:02, 5.64it/s]\n 50%|█████ | 12/24 [00:02<00:02, 5.64it/s]\n 54%|█████▍ | 13/24 [00:02<00:01, 5.63it/s]\n 58%|█████▊ | 14/24 [00:02<00:01, 5.62it/s]\n 62%|██████▎ | 15/24 [00:02<00:01, 5.63it/s]\n 67%|██████▋ | 16/24 [00:02<00:01, 5.62it/s]\n 71%|███████ | 17/24 [00:03<00:01, 5.62it/s]\n 75%|███████▌ | 18/24 [00:03<00:01, 5.62it/s]\n 79%|███████▉ | 19/24 [00:03<00:00, 5.60it/s]\n 83%|████████▎ | 20/24 [00:03<00:00, 5.61it/s]\n 88%|████████▊ | 21/24 [00:03<00:00, 5.62it/s]\n 92%|█████████▏| 22/24 [00:03<00:00, 5.62it/s]\n 96%|█████████▌| 23/24 [00:04<00:00, 5.62it/s]\n100%|██████████| 24/24 [00:04<00:00, 5.60it/s]\n100%|██████████| 24/24 [00:04<00:00, 5.53it/s]",
"metrics": {
"predict_time": 5.649061,
"total_time": 5.666914
},
"output": [
"https://replicate.delivery/pbxt/04QMaI6rejU1YSBYp1YqSFwfZWtflMZBeIz4AyMKyThrrGkHB/out-0.png"
],
"started_at": "2023-11-16T19:08:38.068939Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/76bo2trbbuxjurxeqofpjjt6i4",
"cancel": "https://api.replicate.com/v1/predictions/76bo2trbbuxjurxeqofpjjt6i4/cancel"
},
"version": "bb775fc8060914b8baade7123a7ff41e9df8904aa129cf4517bd1bd5d8fa3b84"
}
Using seed: 14262892
0%| | 0/24 [00:00<?, ?it/s]
4%|▍ | 1/24 [00:00<00:05, 3.92it/s]
8%|▊ | 2/24 [00:00<00:04, 4.80it/s]
12%|█▎ | 3/24 [00:00<00:04, 5.17it/s]
17%|█▋ | 4/24 [00:00<00:03, 5.36it/s]
21%|██ | 5/24 [00:00<00:03, 5.47it/s]
25%|██▌ | 6/24 [00:01<00:03, 5.55it/s]
29%|██▉ | 7/24 [00:01<00:03, 5.53it/s]
33%|███▎ | 8/24 [00:01<00:02, 5.56it/s]
38%|███▊ | 9/24 [00:01<00:02, 5.60it/s]
42%|████▏ | 10/24 [00:01<00:02, 5.61it/s]
46%|████▌ | 11/24 [00:02<00:02, 5.64it/s]
50%|█████ | 12/24 [00:02<00:02, 5.64it/s]
54%|█████▍ | 13/24 [00:02<00:01, 5.63it/s]
58%|█████▊ | 14/24 [00:02<00:01, 5.62it/s]
62%|██████▎ | 15/24 [00:02<00:01, 5.63it/s]
67%|██████▋ | 16/24 [00:02<00:01, 5.62it/s]
71%|███████ | 17/24 [00:03<00:01, 5.62it/s]
75%|███████▌ | 18/24 [00:03<00:01, 5.62it/s]
79%|███████▉ | 19/24 [00:03<00:00, 5.60it/s]
83%|████████▎ | 20/24 [00:03<00:00, 5.61it/s]
88%|████████▊ | 21/24 [00:03<00:00, 5.62it/s]
92%|█████████▏| 22/24 [00:03<00:00, 5.62it/s]
96%|█████████▌| 23/24 [00:04<00:00, 5.62it/s]
100%|██████████| 24/24 [00:04<00:00, 5.60it/s]
100%|██████████| 24/24 [00:04<00:00, 5.53it/s]