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.
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";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run jyoung105/tcd-sdxl using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"jyoung105/tcd-sdxl:263938d8d5a4f35eb5fe2ed5ad343dd8708e041e94873b0840fe308cd82e37d8",
{
input: {
eta: 0.3,
steps: 4,
width: 1024,
height: 1024,
prompt: "A man with hoodie on, illustration",
clip_skip: 0,
num_images: 1,
guidance_scale: 0
}
}
);
// 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 jyoung105/tcd-sdxl using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"jyoung105/tcd-sdxl:263938d8d5a4f35eb5fe2ed5ad343dd8708e041e94873b0840fe308cd82e37d8",
input={
"eta": 0.3,
"steps": 4,
"width": 1024,
"height": 1024,
"prompt": "A man with hoodie on, illustration",
"clip_skip": 0,
"num_images": 1,
"guidance_scale": 0
}
)
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 jyoung105/tcd-sdxl 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": "jyoung105/tcd-sdxl:263938d8d5a4f35eb5fe2ed5ad343dd8708e041e94873b0840fe308cd82e37d8",
"input": {
"eta": 0.3,
"steps": 4,
"width": 1024,
"height": 1024,
"prompt": "A man with hoodie on, illustration",
"clip_skip": 0,
"num_images": 1,
"guidance_scale": 0
}
}' \
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": "2024-10-28T18:35:36.080257Z",
"created_at": "2024-10-28T18:31:55.530000Z",
"data_removed": false,
"error": null,
"id": "e4wg7wgzh9rgg0cjthk9gjefr0",
"input": {
"eta": 0.3,
"steps": 4,
"width": 1024,
"height": 1024,
"prompt": "A man with hoodie on, illustration",
"clip_skip": 0,
"num_images": 1,
"guidance_scale": 0
},
"logs": "DEVICE: cuda\nDTYPE: torch.float16\nUsing seed: 2552\nFinish setup in 0.00012612342834472656 secs.\n[Debug] Prompt: A man with hoodie on, illustration, best quality, high detail, sharp focus\n 0%| | 0/4 [00:00<?, ?it/s]\n 25%|██▌ | 1/4 [00:00<00:00, 5.46it/s]\n 50%|█████ | 2/4 [00:00<00:00, 7.33it/s]\n 75%|███████▌ | 3/4 [00:00<00:00, 8.20it/s]\n100%|██████████| 4/4 [00:00<00:00, 8.69it/s]\n100%|██████████| 4/4 [00:00<00:00, 8.06it/s]\nFinish generation in 1.8718194961547852 secs.",
"metrics": {
"predict_time": 3.641744649,
"total_time": 220.550257
},
"output": [
"https://replicate.delivery/pbxt/HmozeYNd6DxSFaqfOpLnUk2IV2HiKgKfpoyZdbJiVROtbxWnA/out_0.png"
],
"started_at": "2024-10-28T18:35:32.438512Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/e4wg7wgzh9rgg0cjthk9gjefr0",
"cancel": "https://api.replicate.com/v1/predictions/e4wg7wgzh9rgg0cjthk9gjefr0/cancel"
},
"version": "263938d8d5a4f35eb5fe2ed5ad343dd8708e041e94873b0840fe308cd82e37d8"
}
DEVICE: cuda
DTYPE: torch.float16
Using seed: 2552
Finish setup in 0.00012612342834472656 secs.
[Debug] Prompt: A man with hoodie on, illustration, best quality, high detail, sharp focus
0%| | 0/4 [00:00<?, ?it/s]
25%|██▌ | 1/4 [00:00<00:00, 5.46it/s]
50%|█████ | 2/4 [00:00<00:00, 7.33it/s]
75%|███████▌ | 3/4 [00:00<00:00, 8.20it/s]
100%|██████████| 4/4 [00:00<00:00, 8.69it/s]
100%|██████████| 4/4 [00:00<00:00, 8.06it/s]
Finish generation in 1.8718194961547852 secs.