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.
colinmcdonnell22 /yap-man:ab0e0fc9
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 colinmcdonnell22/yap-man using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"colinmcdonnell22/yap-man:ab0e0fc932f74ebf4a66e0e92551f2c7141adaa67573ead1fc3a035daf42a01f",
{
input: {
model: "schnell",
prompt: "three people hanging out in the cafe YAP",
go_fast: true,
lora_scale: 1.3,
megapixels: "1",
num_outputs: 1,
aspect_ratio: "1:1",
output_format: "png",
guidance_scale: 3.5,
output_quality: 80,
prompt_strength: 0.8,
extra_lora_scale: 1,
num_inference_steps: 4
}
}
);
// 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 colinmcdonnell22/yap-man using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"colinmcdonnell22/yap-man:ab0e0fc932f74ebf4a66e0e92551f2c7141adaa67573ead1fc3a035daf42a01f",
input={
"model": "schnell",
"prompt": "three people hanging out in the cafe YAP",
"go_fast": True,
"lora_scale": 1.3,
"megapixels": "1",
"num_outputs": 1,
"aspect_ratio": "1:1",
"output_format": "png",
"guidance_scale": 3.5,
"output_quality": 80,
"prompt_strength": 0.8,
"extra_lora_scale": 1,
"num_inference_steps": 4
}
)
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 colinmcdonnell22/yap-man 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": "colinmcdonnell22/yap-man:ab0e0fc932f74ebf4a66e0e92551f2c7141adaa67573ead1fc3a035daf42a01f",
"input": {
"model": "schnell",
"prompt": "three people hanging out in the cafe YAP",
"go_fast": true,
"lora_scale": 1.3,
"megapixels": "1",
"num_outputs": 1,
"aspect_ratio": "1:1",
"output_format": "png",
"guidance_scale": 3.5,
"output_quality": 80,
"prompt_strength": 0.8,
"extra_lora_scale": 1,
"num_inference_steps": 4
}
}' \
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-12-01T05:56:33.766415Z",
"created_at": "2024-12-01T05:56:32.145000Z",
"data_removed": false,
"error": null,
"id": "njfnvep325rm80ckg35bfk1tnc",
"input": {
"model": "schnell",
"prompt": "three people hanging out in the cafe YAP",
"go_fast": true,
"lora_scale": 1.3,
"megapixels": "1",
"num_outputs": 1,
"aspect_ratio": "1:1",
"output_format": "png",
"guidance_scale": 3.5,
"output_quality": 80,
"prompt_strength": 0.8,
"extra_lora_scale": 1,
"num_inference_steps": 4
},
"logs": "Lora https://replicate.delivery/xezq/cAOTQkvOA4Z7EJmvygxcOCSdpsOCUprcPHqfCOqlBTGETN7JA/trained_model.tar already loaded\nrunning quantized prediction\nUsing seed: 2633343159\n 0%| | 0/4 [00:00<?, ?it/s]\n 50%|█████ | 2/4 [00:00<00:00, 18.77it/s]\n100%|██████████| 4/4 [00:00<00:00, 13.86it/s]\n100%|██████████| 4/4 [00:00<00:00, 14.42it/s]\nTotal safe images: 1 out of 1",
"metrics": {
"predict_time": 0.834542508,
"total_time": 1.621415
},
"output": [
"https://replicate.delivery/xezq/86GqQoMDKY6VERrFJQNRStke74AXvmerPKYBZe1WWfyGJrZPB/out-0.png"
],
"started_at": "2024-12-01T05:56:32.931872Z",
"status": "succeeded",
"urls": {
"stream": "https://stream.replicate.com/v1/files/bcwr-bqpun7qlook2wb5lsdaacprgntep2xav6nziu5cl2eoy5h5a632a",
"get": "https://api.replicate.com/v1/predictions/njfnvep325rm80ckg35bfk1tnc",
"cancel": "https://api.replicate.com/v1/predictions/njfnvep325rm80ckg35bfk1tnc/cancel"
},
"version": "ab0e0fc932f74ebf4a66e0e92551f2c7141adaa67573ead1fc3a035daf42a01f"
}
Lora https://replicate.delivery/xezq/cAOTQkvOA4Z7EJmvygxcOCSdpsOCUprcPHqfCOqlBTGETN7JA/trained_model.tar already loaded
running quantized prediction
Using seed: 2633343159
0%| | 0/4 [00:00<?, ?it/s]
50%|█████ | 2/4 [00:00<00:00, 18.77it/s]
100%|██████████| 4/4 [00:00<00:00, 13.86it/s]
100%|██████████| 4/4 [00:00<00:00, 14.42it/s]
Total safe images: 1 out of 1