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/pcm using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"jyoung105/pcm:ade7e3a05da3aef723543b16f3d5310dab761b55aadfc31a56c6d427ab4fa869",
{
input: {
eta: 0,
steps: 8,
width: 1024,
height: 1024,
prompt: "A man with hoodie on, illustration",
clip_skip: 0,
num_images: 1,
guidance_scale: 6
}
}
);
// 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/pcm using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"jyoung105/pcm:ade7e3a05da3aef723543b16f3d5310dab761b55aadfc31a56c6d427ab4fa869",
input={
"eta": 0,
"steps": 8,
"width": 1024,
"height": 1024,
"prompt": "A man with hoodie on, illustration",
"clip_skip": 0,
"num_images": 1,
"guidance_scale": 6
}
)
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/pcm 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/pcm:ade7e3a05da3aef723543b16f3d5310dab761b55aadfc31a56c6d427ab4fa869",
"input": {
"eta": 0,
"steps": 8,
"width": 1024,
"height": 1024,
"prompt": "A man with hoodie on, illustration",
"clip_skip": 0,
"num_images": 1,
"guidance_scale": 6
}
}' \
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:31:20.103262Z",
"created_at": "2024-10-28T18:27:42.009000Z",
"data_removed": false,
"error": null,
"id": "6azat1t175rgp0cjthhbe46m3r",
"input": {
"eta": 0,
"steps": 8,
"width": 1024,
"height": 1024,
"prompt": "A man with hoodie on, illustration",
"clip_skip": 0,
"num_images": 1,
"guidance_scale": 6
},
"logs": "DEVICE: cuda\nDTYPE: torch.float16\nUsing seed: 25237\nFinish setup in 0.0003285408020019531 secs.\n[Debug] Prompt: A man with hoodie on, illustration, best quality, high detail, sharp focus\n 0%| | 0/8 [00:00<?, ?it/s]\n 12%|█▎ | 1/8 [00:00<00:01, 3.66it/s]\n 25%|██▌ | 2/8 [00:00<00:01, 4.47it/s]\n 38%|███▊ | 3/8 [00:00<00:01, 4.80it/s]\n 50%|█████ | 4/8 [00:00<00:00, 4.97it/s]\n 62%|██████▎ | 5/8 [00:01<00:00, 5.07it/s]\n 75%|███████▌ | 6/8 [00:01<00:00, 5.11it/s]\n 88%|████████▊ | 7/8 [00:01<00:00, 5.14it/s]\n100%|██████████| 8/8 [00:01<00:00, 5.17it/s]\n100%|██████████| 8/8 [00:01<00:00, 4.97it/s]\nFinish generation in 2.998079538345337 secs.",
"metrics": {
"predict_time": 4.974898598,
"total_time": 218.094262
},
"output": [
"https://replicate.delivery/pbxt/YaaStcJrazozFZKitcS0kyvQ2jY4TQSdExxQm7HCFVkdK26E/out_0.png"
],
"started_at": "2024-10-28T18:31:15.128364Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/6azat1t175rgp0cjthhbe46m3r",
"cancel": "https://api.replicate.com/v1/predictions/6azat1t175rgp0cjthhbe46m3r/cancel"
},
"version": "ade7e3a05da3aef723543b16f3d5310dab761b55aadfc31a56c6d427ab4fa869"
}
DEVICE: cuda
DTYPE: torch.float16
Using seed: 25237
Finish setup in 0.0003285408020019531 secs.
[Debug] Prompt: A man with hoodie on, illustration, best quality, high detail, sharp focus
0%| | 0/8 [00:00<?, ?it/s]
12%|█▎ | 1/8 [00:00<00:01, 3.66it/s]
25%|██▌ | 2/8 [00:00<00:01, 4.47it/s]
38%|███▊ | 3/8 [00:00<00:01, 4.80it/s]
50%|█████ | 4/8 [00:00<00:00, 4.97it/s]
62%|██████▎ | 5/8 [00:01<00:00, 5.07it/s]
75%|███████▌ | 6/8 [00:01<00:00, 5.11it/s]
88%|████████▊ | 7/8 [00:01<00:00, 5.14it/s]
100%|██████████| 8/8 [00:01<00:00, 5.17it/s]
100%|██████████| 8/8 [00:01<00:00, 4.97it/s]
Finish generation in 2.998079538345337 secs.