diff --git a/.circleci/test.yml b/.circleci/test.yml index 31deec713a..3fcd589743 100644 --- a/.circleci/test.yml +++ b/.circleci/test.yml @@ -61,7 +61,7 @@ jobs: command: | pip install git+https://github.com/open-mmlab/mmengine.git@main pip install -U openmim - mim install 'mmcv >= 2.0.0rc1' + mim install 'mmcv >= 2.0.0' pip install -r requirements/tests.txt - run: name: Build and install @@ -104,7 +104,7 @@ jobs: command: | docker exec mmedit pip install -e /mmengine docker exec mmedit pip install -U openmim - docker exec mmedit mim install 'mmcv >= 2.0.0rc1' + docker exec mmedit mim install 'mmcv >= 2.0.0' docker exec mmedit pip install -r requirements/tests.txt - run: name: Build and install @@ -125,7 +125,7 @@ workflows: branches: ignore: - dev-1.x - - 1.x + - main pr_stage_test: when: not: @@ -137,11 +137,11 @@ workflows: branches: ignore: - dev-1.x - - 1.x + - main - build_cpu: name: minimum_version_cpu - torch: 1.6.0 - torchvision: 0.7.0 + torch: 1.8.1 + torchvision: 0.9.1 python: 3.7.4 requires: - lint @@ -171,10 +171,10 @@ workflows: jobs: - build_cuda: name: minimum_version_gpu - torch: 1.6.0 + torch: 1.8.1 # Use double quotation mark to explicitly specify its type # as string instead of number - cuda: "10.1" + cuda: "10.2" filters: branches: only: diff --git a/.github/workflows/merge_stage_test.yml b/.github/workflows/merge_stage_test.yml index 0e395cdde5..fb76ac62ba 100644 --- a/.github/workflows/merge_stage_test.yml +++ b/.github/workflows/merge_stage_test.yml @@ -14,7 +14,7 @@ on: branches: - dev-1.x - test-1.x - - 1.x + - main - test-branch concurrency: @@ -23,7 +23,7 @@ concurrency: jobs: build_cpu_py: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 strategy: matrix: python-version: [3.8, 3.9] @@ -32,21 +32,21 @@ jobs: - torch: 1.8.1 torchvision: 0.9.1 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Upgrade pip run: pip install pip --upgrade - name: Install PyTorch - run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/torch_stable.html + run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html - name: Install MMEngine run: pip install git+https://github.com/open-mmlab/mmengine.git@main - name: Install MMCV run: | pip install -U openmim - mim install 'mmcv >= 2.0.0rc1' + mim install 'mmcv >= 2.0.0' - name: Install other dependencies run: | pip install -r requirements/tests.txt @@ -59,16 +59,12 @@ jobs: coverage report -m build_cpu_pt: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 strategy: matrix: python-version: [3.7] - torch: [1.6.0, 1.7.1, 1.8.1, 1.9.1, 1.10.1, 1.11.0, 1.12.1, 1.13.0] + torch: [1.8.1, 1.9.1, 1.10.1, 1.11.0, 1.12.1, 1.13.0] include: - - torch: 1.6.0 - torchvision: 0.7.0 - - torch: 1.7.1 - torchvision: 0.8.2 - torch: 1.8.1 torchvision: 0.9.1 - torch: 1.9.1 @@ -82,21 +78,21 @@ jobs: - torch: 1.13.0 torchvision: 0.14.0 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Upgrade pip run: pip install pip --upgrade - name: Install PyTorch - run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/torch_stable.html + run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html - name: Install MMEngine run: pip install git+https://github.com/open-mmlab/mmengine.git@main - name: Install MMCV run: | pip install -U openmim - mim install 'mmcv >= 2.0.0rc1' + mim install 'mmcv >= 2.0.0' - name: Install other dependencies run: | pip install -r requirements/tests.txt @@ -119,7 +115,7 @@ jobs: fail_ci_if_error: false build_cu102: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 container: image: pytorch/pytorch:1.8.1-cuda10.2-cudnn7-devel strategy: @@ -129,37 +125,33 @@ jobs: - torch: 1.8.1 cuda: 10.2 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Upgrade pip run: pip install pip --upgrade - name: Fetch GPG keys run: | - apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub - apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub - - name: Install Python-dev - run: apt-get update && apt-get install -y python${{matrix.python-version}}-dev - if: ${{matrix.python-version != 3.9}} + apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub + apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu2204/x86_64/7fa2af80.pub - name: Install system dependencies run: | apt-get update && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6 - name: Install PyTorch - run: python -m pip install torch==1.8.1+cpu torchvision==0.9.1+cpu -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html + run: pip install torch==1.8.1+cpu torchvision==0.9.1+cpu -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html - name: Install mmediting dependencies run: | pip install -U openmim - mim install 'mmcv >= 2.0.0rc1' + mim install 'mmcv >= 2.0.0' pip install -r requirements/tests.txt - name: Build and install run: | - python setup.py check -m -s - TORCH_CUDA_ARCH_LIST=7.0 pip install -e . + pip install -e . build_cu116: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 container: image: pytorch/pytorch:1.13.0-cuda11.6-cudnn8-devel strategy: @@ -169,35 +161,31 @@ jobs: - torch: 1.8.1 cuda: 10.2 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Upgrade pip run: pip install pip --upgrade - name: Fetch GPG keys run: | - apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub - apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub - - name: Install Python-dev - run: apt-get update && apt-get install -y python${{matrix.python-version}}-dev - if: ${{matrix.python-version != 3.9}} + apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub + apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu2204/x86_64/7fa2af80.pub - name: Install system dependencies run: | apt-get update && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6 - name: Install PyTorch - run: python -m pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cpu + run: pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cpu - name: Install mmediting dependencies run: | pip install git+https://github.com/open-mmlab/mmengine.git@main pip install -U openmim - mim install 'mmcv >= 2.0.0rc1' + mim install 'mmcv >= 2.0.0' pip install -r requirements/tests.txt - name: Build and install run: | - python setup.py check -m -s - TORCH_CUDA_ARCH_LIST=7.0 pip install -e . + pip install -e . - name: Run unittests and generate coverage report run: | coverage run --branch --source mmedit -m pytest tests/ @@ -205,16 +193,15 @@ jobs: coverage report -m build_windows: - runs-on: ${{ matrix.os }} + runs-on: windows-2022 strategy: matrix: - os: [windows-2022] python: [3.7] platform: [cpu, cu111] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Upgrade pip @@ -227,7 +214,7 @@ jobs: run: | python -m pip install git+https://github.com/open-mmlab/mmengine.git@main python -m pip install -U openmim - mim install 'mmcv >= 2.0.0rc1' + mim install 'mmcv >= 2.0.0' python -m pip install -r requirements/tests.txt - name: Build and install run: | diff --git a/.github/workflows/pr_stage_test.yml b/.github/workflows/pr_stage_test.yml index bac567a170..eea5973767 100644 --- a/.github/workflows/pr_stage_test.yml +++ b/.github/workflows/pr_stage_test.yml @@ -17,7 +17,7 @@ concurrency: jobs: build_cpu: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 strategy: matrix: python-version: [3.7] @@ -25,9 +25,9 @@ jobs: - torch: 1.8.1 torchvision: 0.9.1 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Upgrade pip @@ -39,7 +39,7 @@ jobs: - name: Install MMCV run: | pip install -U openmim - mim install 'mmcv >= 2.0.0rc1' + mim install 'mmcv >= 2.0.0' - name: Install other dependencies run: | pip install -r requirements/tests.txt @@ -64,58 +64,53 @@ jobs: # uses: mxschmitt/action-tmate@v3 build_cu102: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 container: image: pytorch/pytorch:1.8.1-cuda10.2-cudnn7-devel strategy: matrix: python-version: [3.7] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Upgrade pip run: pip install pip --upgrade - name: Fetch GPG keys run: | - apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub - apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub - - name: Install Python-dev - run: apt-get update && apt-get install -y python${{matrix.python-version}}-dev - if: ${{matrix.python-version != 3.9}} + apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub + apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu2204/x86_64/7fa2af80.pub - name: Install system dependencies run: | apt-get update apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libxrender-dev - name: Install PyTorch - run: python -m pip install torch==1.8.1+cpu torchvision==0.9.1+cpu -f https://download.pytorch.org/whl/torch_stable.html + run: pip install torch==1.8.1+cpu torchvision==0.9.1+cpu -f https://download.pytorch.org/whl/torch_stable.html - name: Install mmedit dependencies run: | pip install git+https://github.com/open-mmlab/mmengine.git@main pip install -U openmim - mim install 'mmcv >= 2.0.0rc1' + mim install 'mmcv >= 2.0.0' pip install -r requirements/tests.txt - name: Build and install run: | - python setup.py check -m -s - TORCH_CUDA_ARCH_LIST=7.0 pip install -e . + pip install -e . # - name: Setup tmate session # if: ${{ failure() }} # uses: mxschmitt/action-tmate@v3 build_windows: - runs-on: ${{ matrix.os }} + runs-on: windows-2022 strategy: matrix: - os: [windows-2022] - python: [3.7] + python-version: [3.7] platform: [cpu, cu111] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Upgrade pip @@ -128,7 +123,7 @@ jobs: run: | python -m pip install git+https://github.com/open-mmlab/mmengine.git@main python -m pip install -U openmim - mim install 'mmcv >= 2.0.0rc1' + mim install 'mmcv >= 2.0.0' python -m pip install -r requirements/tests.txt - name: Build and install run: | diff --git a/.github/workflows/test_mim.yml b/.github/workflows/test_mim.yml index ab95e781b6..b9e838b95e 100644 --- a/.github/workflows/test_mim.yml +++ b/.github/workflows/test_mim.yml @@ -17,7 +17,7 @@ concurrency: jobs: build_cpu: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 strategy: matrix: python-version: [3.7] @@ -27,9 +27,9 @@ jobs: torch_version: torch1.8 torchvision: 0.9.0 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Upgrade pip diff --git a/README.md b/README.md index b21028df9f..e70272008a 100644 --- a/README.md +++ b/README.md @@ -19,17 +19,17 @@
 
[![PyPI](https://badge.fury.io/py/mmedit.svg)](https://pypi.org/project/mmedit/) -[![docs](https://img.shields.io/badge/docs-latest-blue)](https://mmediting.readthedocs.io/en/1.x/) +[![docs](https://img.shields.io/badge/docs-latest-blue)](https://mmediting.readthedocs.io/en/latest/) [![badge](https://github.com/open-mmlab/mmediting/workflows/build/badge.svg)](https://github.com/open-mmlab/mmediting/actions) [![codecov](https://codecov.io/gh/open-mmlab/mmediting/branch/master/graph/badge.svg)](https://codecov.io/gh/open-mmlab/mmediting) -[![license](https://img.shields.io/github/license/open-mmlab/mmediting.svg)](https://github.com/open-mmlab/mmediting/blob/1.x/LICENSE) +[![license](https://img.shields.io/github/license/open-mmlab/mmediting.svg)](https://github.com/open-mmlab/mmediting/blob/main/LICENSE) [![open issues](https://isitmaintained.com/badge/open/open-mmlab/mmediting.svg)](https://github.com/open-mmlab/mmediting/issues) [![issue resolution](https://isitmaintained.com/badge/resolution/open-mmlab/mmediting.svg)](https://github.com/open-mmlab/mmediting/issues) -[๐Ÿ“˜Documentation](https://mmediting.readthedocs.io/en/1.x/) | -[๐Ÿ› ๏ธInstallation](https://mmediting.readthedocs.io/en/1.x/get_started/install.html) | -[๐Ÿ“ŠModel Zoo](https://mmediting.readthedocs.io/en/1.x/model_zoo/overview.html) | -[๐Ÿ†•Update News](https://mmediting.readthedocs.io/en/1.x/changelog.html) | +[๐Ÿ“˜Documentation](https://mmediting.readthedocs.io/en/latest/) | +[๐Ÿ› ๏ธInstallation](https://mmediting.readthedocs.io/en/latest/get_started/install.html) | +[๐Ÿ“ŠModel Zoo](https://mmediting.readthedocs.io/en/latest/model_zoo/overview.html) | +[๐Ÿ†•Update News](https://mmediting.readthedocs.io/en/latest/changelog.html) | [๐Ÿš€Ongoing Projects](https://github.com/open-mmlab/mmediting/projects) | [๐Ÿค”Reporting Issues](https://github.com/open-mmlab/mmediting/issues) @@ -53,10 +53,11 @@ English | [็ฎ€ไฝ“ไธญๆ–‡](README_zh-CN.md) ## ๐Ÿš€ What's New -### New release [**MMEditing v1.0.0rc6**](https://github.com/open-mmlab/mmediting/releases/tag/v1.0.0rc6) \[02/03/2023\]: +### New release [**MMEditing v1.0.0rc7**](https://github.com/open-mmlab/mmediting/releases/tag/v1.0.0rc7) \[07/04/2023\]: -- Support Gradio gui of Inpainting inference. -- Support Colorization, Translationin and all GAN models inferencer. +- Support DiffuserWrapper +- Support ControlNet (training and inference). +- Support PyTorch 2.0 (successfully compile 33+ models on 'inductor' backend). **MMEditing** has supported all the tasks, models, metrics, and losses in [MMGeneration](https://github.com/open-mmlab/mmgeneration) and unifies interfaces of all components based on [MMEngine](https://github.com/open-mmlab/mmengine) ๐Ÿ˜. @@ -85,7 +86,7 @@ Currently, MMEditing support multiple image and video generation/editing tasks. https://user-images.githubusercontent.com/12782558/217152698-49169038-9872-4200-80f7-1d5f7613afd7.mp4 -The best practice on our main 1.x branch works with **Python 3.8+** and **PyTorch 1.9+**. +The best practice on our main branch works with **Python 3.8+** and **PyTorch 1.9+**. ### โœจ Major features @@ -99,7 +100,7 @@ The best practice on our main 1.x branch works with **Python 3.8+** and **PyTorc - **New Modular Design for Flexible Combination** - We decompose the editing framework into different modules and one can easily construct a customized editor framework by combining different modules. Specifically, a new design for complex loss modules is proposed for customizing the links between modules, which can achieve flexible combinations among different modules.(Tutorial for [losses](https://mmediting.readthedocs.io/en/dev-1.x/howto/losses.html)) + We decompose the editing framework into different modules and one can easily construct a customized editor framework by combining different modules. Specifically, a new design for complex loss modules is proposed for customizing the links between modules, which can achieve flexible combinations among different modules.(Tutorial for [losses](https://mmediting.readthedocs.io/en/latest/howto/losses.html)) - **Efficient Distributed Training** @@ -135,14 +136,14 @@ Install MMCV with [MIM](https://github.com/open-mmlab/mim). ```shell pip3 install openmim # wait for more pre-compiled pkgs to release -mim install 'mmcv>=2.0.0rc1' +mim install 'mmcv>=2.0.0' ``` **Step 3.** Install MMEditing from source. ```shell -git clone -b 1.x https://github.com/open-mmlab/mmediting.git +git clone https://github.com/open-mmlab/mmediting.git cd mmediting pip3 install -e . ``` @@ -305,6 +306,7 @@ Please see [quick run](docs/en/get_started/quick_run.md) and [inference](docs/en