1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
const axios = require('axios');
const fs = require('fs');
const path = require('path');
async function toB64(imgPath) {
const data = fs.readFileSync(path.resolve(imgPath));
return Buffer.from(data).toString('base64');
}
const api_key = "YOUR API-KEY";
const url = "https://api.segmind.com/v1/face-detailer";
const data = {
"image": "toB64('https://segmind-sd-models.s3.amazonaws.com/display_images/face-detailer-test-ip.png')",
"prompt": "clear face and natural skin",
"negative_prompt": "bad quality, painting, blur",
"samples": 1,
"num_inference_steps": 25,
"guidance_scale": 5,
"seed": 12467,
"denoise": 0.4,
"image_format": "jpeg",
"image_quality": 95,
"base64": false
};
(async function() {
try {
const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } });
console.log(response.data);
} catch (error) {
console.error('Error:', error.response.data);
}
})();
Input image
The positive prompt describing the image
Negative prompt to avoid undesired features in the image
Number of image samples to generate
min : 1,
max : 4
Number of inference steps for image generation
min : 15,
max : 75
Guidance scale for generating the image
min : 5,
max : 10
Random seed for image generation
Denoising strength to apply during generation
min : 0,
max : 1
Format of the output image
Allowed values:
Quality of the output image
min : 10,
max : 100
Base64 encoding of the output image.
To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.
Face Detailer is an advanced AI tool designed to enhance and restore facial features in images. Face Detailer is perfect for restoring characters’ faces in images. Its comprehensive processing pipeline ensures high-quality facial detail enhancement, making it an essential tool for photographers and digital artists.
Automatically detects and improves facial details in images. Ideal for repairing low-resolution faces with high-resolution synthesis.
Utilizes a two-step method for severely damaged faces. The first pass recreates the fundamental outline, while the second pass focuses on detailed reconstruction.
Eliminates distortion caused by the background.Ensures enhancements are aligned with face contours without affecting surrounding areas.
Upscales images to significantly increase resolution. Enhances details and reduces artifacts, perfect for high-resolution stills.
Face Detailer is perfect for restoring characters’ faces in various image formats. Its comprehensive processing pipeline ensures high-quality facial detail enhancement, making it an essential tool for photographers and digital artists.