Download Photopea for offline use
Go to file
uglyworm 0b8b293876 start the server immediately to avoid freezing the space on HuggingFace
start the server immediately to avoid freezing the space on HuggingFace due to the long download of font files during the first time
2024-03-28 21:06:56 +00:00
www.photopea.com Add replace back and fix it 2023-12-08 12:26:04 -05:00
README.md Removed dependencies on external libraries, added parallel downloading for font/template, added script to remove junk from the top bar, added local server startup, and minor refactoring 2024-03-29 00:56:57 +05:00
run.py start the server immediately to avoid freezing the space on HuggingFace 2024-03-28 21:06:56 +00:00

README.md

Photopea Offline

Why I made this

The creator of Photopea, a great free alternative to Photoshop, is not interested on making an offline version, so I took it upon myself to make it.

Issues

If there are any issues, please let me know.

How to use

  1. Download the repository: git clone https://git.nixnet.services/uglyworm/Photopea-Offline.git photopea
  2. Open a terminal
  3. cd into the folder where you downloaded it: cd photopea
  4. In the folder, type this: python run.py (recommends: python run.py --update --fonts, see Notes)
  5. Open local link that was printed to the console (e.g.: http://localhost:7860/). It should load, and you can use it like normal.

Notes

  • If you want to update main photopea files, just append --update to the run.py file.
  • If you want to download the fonts, just append --fonts to the run.py file.
  • If you want to download the templates, just append --templates to the run.py file.

Deploy on HuggingFace Spaces (and similar things)

  1. Log-in to HF

  2. Create new Docker Space with Blank template

  3. In 'Files'-tab create new file with name Dockerfile (w/o extension)

  4. Paste code like this:

    FROM python:3.10  # or python:3.11 or python:3.12
    WORKDIR /code
    RUN git clone https://git.nixnet.services/uglyworm/Photopea-Offline.git photopea  # replace repo url to yours
    COPY . .
    RUN chmod -R u+w /code
    RUN find /code -type d -exec chmod 0777 {} \;  # Suchlike permissions changes are required to run in HF.
    RUN find /code -type f -exec chmod 0666 {} \;
    EXPOSE 7860
    CMD ["python", "/code/photopea/run.py", "--update", "--fonts", "--templates"]  # If you want, remove unneeded args.
    

    Save and wait until the building is complete, all assets have been downloaded, and the server is up.

    Note: Downloading fonts and templates can be a long process: many small files with a total size of over 2+ GB are downloaded! Luckily, this occurs only once.

Note: These projects are not officially associated with this one