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.
lucataco /shiba-diffusion:849b3b19
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 lucataco/shiba-diffusion using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lucataco/shiba-diffusion:849b3b198a022bdaab1c528ac3eac5930852d1c545bf9c4dc8077a9ad7dff0b3",
{
input: {
width: 512,
height: 512,
prompt: "a shiba wearing a tuxedo",
scheduler: "K-LMS",
num_outputs: 1,
guidance_scale: 4,
prompt_strength: 1,
num_inference_steps: 30
}
}
);
// 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 lucataco/shiba-diffusion using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/shiba-diffusion:849b3b198a022bdaab1c528ac3eac5930852d1c545bf9c4dc8077a9ad7dff0b3",
input={
"width": 512,
"height": 512,
"prompt": "a shiba wearing a tuxedo",
"scheduler": "K-LMS",
"num_outputs": 1,
"guidance_scale": 4,
"prompt_strength": 1,
"num_inference_steps": 30
}
)
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 lucataco/shiba-diffusion 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": "lucataco/shiba-diffusion:849b3b198a022bdaab1c528ac3eac5930852d1c545bf9c4dc8077a9ad7dff0b3",
"input": {
"width": 512,
"height": 512,
"prompt": "a shiba wearing a tuxedo",
"scheduler": "K-LMS",
"num_outputs": 1,
"guidance_scale": 4,
"prompt_strength": 1,
"num_inference_steps": 30
}
}' \
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": "2023-02-24T08:34:59.972850Z",
"created_at": "2023-02-24T08:34:56.746628Z",
"data_removed": false,
"error": null,
"id": "6hjgwhzk35cljp3ycjbztjmcjq",
"input": {
"width": 512,
"height": 512,
"prompt": "a shiba wearing a tuxedo",
"scheduler": "K-LMS",
"num_outputs": 1,
"guidance_scale": 4,
"prompt_strength": 1,
"num_inference_steps": 30
},
"logs": "Using seed: 45642\n 0%| | 0/30 [00:00<?, ?it/s]\n 7%|▋ | 2/30 [00:00<00:02, 11.20it/s]\n 13%|█▎ | 4/30 [00:00<00:02, 11.16it/s]\n 20%|██ | 6/30 [00:00<00:02, 11.15it/s]\n 27%|██▋ | 8/30 [00:00<00:01, 11.13it/s]\n 33%|███▎ | 10/30 [00:00<00:01, 11.00it/s]\n 40%|████ | 12/30 [00:01<00:01, 10.57it/s]\n 47%|████▋ | 14/30 [00:01<00:01, 10.29it/s]\n 53%|█████▎ | 16/30 [00:01<00:01, 10.78it/s]\n 60%|██████ | 18/30 [00:01<00:01, 10.70it/s]\n 67%|██████▋ | 20/30 [00:01<00:00, 10.75it/s]\n 73%|███████▎ | 22/30 [00:02<00:00, 10.95it/s]\n 80%|████████ | 24/30 [00:02<00:00, 11.03it/s]\n 87%|████████▋ | 26/30 [00:02<00:00, 11.30it/s]\n 93%|█████████▎| 28/30 [00:02<00:00, 11.47it/s]\n100%|██████████| 30/30 [00:02<00:00, 11.36it/s]\n100%|██████████| 30/30 [00:02<00:00, 11.02it/s]",
"metrics": {
"predict_time": 3.163308,
"total_time": 3.226222
},
"output": [
"https://replicate.delivery/pbxt/RyVkiyEH8sJLFJyfZw7gcndq1oZfbQNXs6u9bbenGenMLKGCB/out-0.png"
],
"started_at": "2023-02-24T08:34:56.809542Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/6hjgwhzk35cljp3ycjbztjmcjq",
"cancel": "https://api.replicate.com/v1/predictions/6hjgwhzk35cljp3ycjbztjmcjq/cancel"
},
"version": "849b3b198a022bdaab1c528ac3eac5930852d1c545bf9c4dc8077a9ad7dff0b3"
}
Using seed: 45642
0%| | 0/30 [00:00<?, ?it/s]
7%|▋ | 2/30 [00:00<00:02, 11.20it/s]
13%|█▎ | 4/30 [00:00<00:02, 11.16it/s]
20%|██ | 6/30 [00:00<00:02, 11.15it/s]
27%|██▋ | 8/30 [00:00<00:01, 11.13it/s]
33%|███▎ | 10/30 [00:00<00:01, 11.00it/s]
40%|████ | 12/30 [00:01<00:01, 10.57it/s]
47%|████▋ | 14/30 [00:01<00:01, 10.29it/s]
53%|█████▎ | 16/30 [00:01<00:01, 10.78it/s]
60%|██████ | 18/30 [00:01<00:01, 10.70it/s]
67%|██████▋ | 20/30 [00:01<00:00, 10.75it/s]
73%|███████▎ | 22/30 [00:02<00:00, 10.95it/s]
80%|████████ | 24/30 [00:02<00:00, 11.03it/s]
87%|████████▋ | 26/30 [00:02<00:00, 11.30it/s]
93%|█████████▎| 28/30 [00:02<00:00, 11.47it/s]
100%|██████████| 30/30 [00:02<00:00, 11.36it/s]
100%|██████████| 30/30 [00:02<00:00, 11.02it/s]