Skip to content
/ superid Public

Get started with PiktID's API for developers. This repository explains how to integrate SuperID, the best AI upscaler for human faces.

Notifications You must be signed in to change notification settings

piktid/superid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SuperID by PiktID logo

SuperID by PiktID

SuperID 3.1.0

Official Website Discord Follow

SuperID is GenAI upscaler, particularly suitable for portrait photos. It is based on GANs, transformers and diffusion models, rendering it extremely powerful in adding missing details.

SuperID examples

About

SuperID utilizes generative models to intelligently upscale your photos. It can be extremely powerful in the following scenarios:

  • Close-up portrait photos: Since the generative models behind SuperID are trained on human faces, the AI performs better when a single face is provided as input.
  • Small thumbnails: When the photo to upscale is at very low resolution (e.g. 128x128), SuperID can add missing details.
  • Photos with noise and JPEG artifacts: SuperID can effectively denoise and remove artifacts from your photos.
  • Images with transparent backgrounds: SuperID intelligently upscales PNG images (e.g. logos) with transparent backgrounds.

Getting Started

Open In Colab

The following instructions suppose you have already installed a recent version of Python. For a general overview, please visit the API documentation. To use any PiktID API, an access token is required.

Step 0 - Register here. 10 credits are given for free to all new users.

Step 1 - Clone the SuperID library

# Installation commands
$ git clone https://github.com/piktid/superid.git
$ cd superid
$ pip install -r requirements.txt

Step 2 - Export the email and password as environmental variables

$ export SUPERID_EMAIL={Your email here}
$ export SUPERID_PASSWORD={Your password here}

Step 3 - Run the main function with the URL of the image to be upscaled

$ python3 main.py --url 'your-url'

Without any additional argument, SuperID upscales the image times 2 and provides the result asynchronously. If you want to change the output resolution, format or retrieval method, use the following general command:

$ python3 main.py --scale_factor '2' --output_format 'PNG' --email
  • scale_factor: Select the upscaling factor: upscale time 2 or times 4
  • output_format: Save the upscaled image in PNG or JPEG
  • email: Get the output link via email once ready

Face fixer

It is now possible to automatically enhance little faces in photos while upscaling the input. To do so, add the flag:

$ python3 main.py --face_fixer

Image denoising (coming soon)

It is also possible to reduce the noise in the original photo by playing with the parameter (range 0-1), as in the example:

$ python3 main.py --denoise_input '0.5'

Creative upscaling (for advanced users)

To modify the capabilities of SuperID towards more conservative or creative outputs, control the upscaling process through the generative parameters as follows:

$ python3 main.py --prompt '' --prompt_strength '0.35' --controlnet_scale '0.5' --seed 0
  • prompt: Describe your image
  • prompt_strength: The lower the more similar to the input image, the higher, the more diverse (range 0-1)
  • guidance_scale: How much to follow the prompt description (range 1-10)
  • controlnet_scale: The higher, the more the upscaling will follow the lines of the input image (range 0-1)
  • seed: Choose a seed to replicate the results

Fast upscaling (coming soon)

When the output quality is not the main priority, we allow users to opt for a fast upscaling process via the command:

$ python3 main.py --fast

Contact

[email protected]

About

Get started with PiktID's API for developers. This repository explains how to integrate SuperID, the best AI upscaler for human faces.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages