Skip to content

StyleCLIP Playground is a project that provides a web front-end to the StyleCLIP's official implementation.

License

Notifications You must be signed in to change notification settings

RapDoodle/StyleCLIP-Playground

Repository files navigation

StyleCLIP Playground

StyleCLIP Playground is a project that provides a front-end to the StyleCLIP official implementation.

Screenshots

Disclaimer

Due to the time constraint, this project was built within 24 hours. The code may contain vulneraibilities that hackers can expliot. I highly recommend not to deploy the project to a publically accessible server. The project is still under development (after I finish my assignments and taking the finals). If you are interested in the project, considering star to the project ;)

Installation guide

  1. Install Anaconda.

  2. Create a virtual environemnt (recommended) and activate the environment.

conda create -n styleclip python==3.10 -y
conda activate styleclip
  1. Install PyTorch

If you have a GPU with CUDA support

conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.6 -c pytorch -c conda-forge

If you wish to run it on a machine without NVIDIA graphic card, install the CPU only version.

conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 -c pytorch
  1. Install other dependencies with pip.
pip install -r requirements.txt
  1. Download the pretrained models and extract according to the folder structure.

  2. Populate the database (by default, run with SQLite3).

python populate.py

By default, several users are created. They are admin, user1, and user2. Their passwords are 12345678.

  1. Run the front-end (development server).
python run_web.py dev
  1. Run the service-end.
python run_service.py --device=cpu --app-config=dev
  1. Access the web with http://127.0.0.1. The port number can be changed in configurations/dev.json. Note: This is just for development purposes, do not deploy the application like this. Instead, use a WSGI server.

Credits

Part of the code of this project is based on the open-source development framework, Mangee Flask-RESTful. The framework was developed by Bohui WU (@RapDoodle, one of our team members). The complete source code of the framework can be found in https://github.com/RapDoodle/mangee-flask-restful.

License

The project is licensed under the MIT License.

About

StyleCLIP Playground is a project that provides a web front-end to the StyleCLIP's official implementation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published