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.
afiaka87 /sd-aesthetic-guidance:1af76e80
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 afiaka87/sd-aesthetic-guidance using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"afiaka87/sd-aesthetic-guidance:1af76e8016e3eaca8d9b053220e3fe3c49f1e770031c6ac6c5ce5fc7a3b115e8",
{
input: {
width: 512,
height: 512,
prompt: "an image of a scissors",
num_outputs: 1,
guidance_scale: 7.5,
prompt_strength: 0.8,
aesthetic_rating: 8,
aesthetic_weight: 0.2,
num_inference_steps: 90
}
}
);
// 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 afiaka87/sd-aesthetic-guidance using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"afiaka87/sd-aesthetic-guidance:1af76e8016e3eaca8d9b053220e3fe3c49f1e770031c6ac6c5ce5fc7a3b115e8",
input={
"width": 512,
"height": 512,
"prompt": "an image of a scissors",
"num_outputs": 1,
"guidance_scale": 7.5,
"prompt_strength": 0.8,
"aesthetic_rating": 8,
"aesthetic_weight": 0.2,
"num_inference_steps": 90
}
)
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 afiaka87/sd-aesthetic-guidance 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": "afiaka87/sd-aesthetic-guidance:1af76e8016e3eaca8d9b053220e3fe3c49f1e770031c6ac6c5ce5fc7a3b115e8",
"input": {
"width": 512,
"height": 512,
"prompt": "an image of a scissors",
"num_outputs": 1,
"guidance_scale": 7.5,
"prompt_strength": 0.8,
"aesthetic_rating": 8,
"aesthetic_weight": 0.2,
"num_inference_steps": 90
}
}' \
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": "2022-09-03T01:38:12.276666Z",
"created_at": "2022-09-03T01:38:04.684594Z",
"data_removed": false,
"error": null,
"id": "wnuakmdzg5cldco2vqleeiykku",
"input": {
"width": 512,
"height": 512,
"prompt": "an image of a scissors",
"num_outputs": 1,
"guidance_scale": 7.5,
"prompt_strength": 0.8,
"aesthetic_rating": "8",
"aesthetic_weight": "0.2",
"num_inference_steps": "90"
},
"logs": "Using seed: 36715\n\n0it [00:00, ?it/s]\n2it [00:00, 13.44it/s]\n4it [00:00, 13.10it/s]\n6it [00:00, 13.38it/s]\n8it [00:00, 13.53it/s]\n10it [00:00, 13.55it/s]\n12it [00:00, 13.59it/s]\n14it [00:01, 13.68it/s]\n16it [00:01, 13.51it/s]\n18it [00:01, 13.66it/s]\n20it [00:01, 13.77it/s]\n22it [00:01, 13.84it/s]\n24it [00:01, 13.90it/s]\n26it [00:01, 13.81it/s]\n28it [00:02, 13.76it/s]\n30it [00:02, 13.79it/s]\n32it [00:02, 13.52it/s]\n34it [00:02, 13.67it/s]\n36it [00:02, 13.76it/s]\n38it [00:02, 13.38it/s]\n40it [00:02, 13.53it/s]\n42it [00:03, 13.58it/s]\n44it [00:03, 13.55it/s]\n46it [00:03, 13.60it/s]\n48it [00:03, 13.64it/s]\n50it [00:03, 13.56it/s]\n52it [00:03, 13.61it/s]\n54it [00:03, 13.39it/s]\n56it [00:04, 13.43it/s]\n58it [00:04, 13.54it/s]\n60it [00:04, 13.62it/s]\n62it [00:04, 13.70it/s]\n64it [00:04, 13.76it/s]\n66it [00:04, 13.57it/s]\n68it [00:04, 13.66it/s]\n70it [00:05, 13.67it/s]\n72it [00:05, 13.70it/s]\n74it [00:05, 13.79it/s]\n76it [00:05, 13.79it/s]\n78it [00:05, 13.40it/s]\n80it [00:05, 13.49it/s]\n82it [00:06, 13.55it/s]\n84it [00:06, 13.64it/s]\n86it [00:06, 13.74it/s]\n88it [00:06, 13.64it/s]\n90it [00:06, 13.61it/s]\n90it [00:06, 13.62it/s]",
"metrics": {
"predict_time": 7.420751,
"total_time": 7.592072
},
"output": [
"https://replicate.delivery/mgxm/43afdbae-2343-4c99-8cc3-ba876820c0fa/out-0.png"
],
"started_at": "2022-09-03T01:38:04.855915Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/wnuakmdzg5cldco2vqleeiykku",
"cancel": "https://api.replicate.com/v1/predictions/wnuakmdzg5cldco2vqleeiykku/cancel"
},
"version": "1af76e8016e3eaca8d9b053220e3fe3c49f1e770031c6ac6c5ce5fc7a3b115e8"
}
Using seed: 36715
0it [00:00, ?it/s]
2it [00:00, 13.44it/s]
4it [00:00, 13.10it/s]
6it [00:00, 13.38it/s]
8it [00:00, 13.53it/s]
10it [00:00, 13.55it/s]
12it [00:00, 13.59it/s]
14it [00:01, 13.68it/s]
16it [00:01, 13.51it/s]
18it [00:01, 13.66it/s]
20it [00:01, 13.77it/s]
22it [00:01, 13.84it/s]
24it [00:01, 13.90it/s]
26it [00:01, 13.81it/s]
28it [00:02, 13.76it/s]
30it [00:02, 13.79it/s]
32it [00:02, 13.52it/s]
34it [00:02, 13.67it/s]
36it [00:02, 13.76it/s]
38it [00:02, 13.38it/s]
40it [00:02, 13.53it/s]
42it [00:03, 13.58it/s]
44it [00:03, 13.55it/s]
46it [00:03, 13.60it/s]
48it [00:03, 13.64it/s]
50it [00:03, 13.56it/s]
52it [00:03, 13.61it/s]
54it [00:03, 13.39it/s]
56it [00:04, 13.43it/s]
58it [00:04, 13.54it/s]
60it [00:04, 13.62it/s]
62it [00:04, 13.70it/s]
64it [00:04, 13.76it/s]
66it [00:04, 13.57it/s]
68it [00:04, 13.66it/s]
70it [00:05, 13.67it/s]
72it [00:05, 13.70it/s]
74it [00:05, 13.79it/s]
76it [00:05, 13.79it/s]
78it [00:05, 13.40it/s]
80it [00:05, 13.49it/s]
82it [00:06, 13.55it/s]
84it [00:06, 13.64it/s]
86it [00:06, 13.74it/s]
88it [00:06, 13.64it/s]
90it [00:06, 13.61it/s]
90it [00:06, 13.62it/s]