Skip to content

This repo contains the code for clarity-upscaler deployment.

License

Notifications You must be signed in to change notification settings

sdtechdev/replicate-clarity-upscaler

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clarity-Upscaler

This repository contains the code for the Clarity-Upscaler deployment. The initial codebase was taken and modified from https://github.com/philz1337x/clarity-upscaler/tree/main.

Deploying the Clarity-Upscaler Model on Replicate

  1. Install replicate-cog on a local GPU machine:

    sudo curl -o /usr/local/bin/cog -L "https://github.com/replicate/cog/releases/latest/download/cog_$(uname -s)_$(uname -m)"
    sudo chmod +x /usr/local/bin/cog

    For the latest installation instructions, see replicate-cog.

    Note: While cog technically allows deployment from non-GPU machines, deploying this pipeline from a non-GPU machine (e.g., Macbook M3 Pro Max) has been unsuccessful. We recommend using either a personal GPU machine or a Lambdalabs GPU instance (A100 40GB) for making changes and pushing the model.

  2. Clone this repository:

    git clone https://github.com/sdtechdev/replicate-clarity-upscaler
    cd replicate-clarity-upscaler
  3. Download the required models and checkpoints:

    python download_weights.py

    To test if the pipeline is working properly, make a prediction locally:

    sudo cog predict -i image=@init.png
  4. Either create a new model on the sdtechdev Replicate account or use the existing model repository: clarity-upscaler-4-deployment.

  5. Push the model to Replicate:

    # First, login to Replicate
    sudo cog login
    
    # Then push the model
    sudo cog push r8.im/sdtechdev/clarity-upscaler-4-deployment

    Building and pushing the Docker image (approximately 27GB) can take 10-12 minutes depending on available cache images and internet speed.

Note: A GitHub Actions workflow is available to automate model deployment to Replicate (see .github/workflows/push.yml). However, due to the large Docker image size, the workflow fails on default GitHub runners. A custom-hosted runner is required to successfully push using GitHub Actions.

About

This repo contains the code for clarity-upscaler deployment.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 89.0%
  • JavaScript 7.4%
  • HTML 1.9%
  • CSS 1.1%
  • Other 0.6%