rastermoves 0.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. rastermoves-0.3.1/.dockerignore +4 -0
  2. rastermoves-0.3.1/.github/dependabot.yml +15 -0
  3. rastermoves-0.3.1/.github/workflows/release.yml +272 -0
  4. rastermoves-0.3.1/.github/workflows/tests.yml +145 -0
  5. rastermoves-0.3.1/CHANGELOG.md +86 -0
  6. rastermoves-0.3.1/Dockerfile +32 -0
  7. rastermoves-0.3.1/LICENSE +674 -0
  8. rastermoves-0.3.1/MANIFEST.in +9 -0
  9. rastermoves-0.3.1/PKG-INFO +547 -0
  10. rastermoves-0.3.1/README.md +489 -0
  11. rastermoves-0.3.1/THIRD_PARTY_NOTICES.md +30 -0
  12. rastermoves-0.3.1/docs/ALL_MODELS.md +200 -0
  13. rastermoves-0.3.1/docs/MIGRATION.md +112 -0
  14. rastermoves-0.3.1/docs/PLUGINS.md +211 -0
  15. rastermoves-0.3.1/docs/PROFILING.md +243 -0
  16. rastermoves-0.3.1/docs/REFINEMENT.md +333 -0
  17. rastermoves-0.3.1/docs/RELEASING.md +214 -0
  18. rastermoves-0.3.1/docs/SECURITY.md +82 -0
  19. rastermoves-0.3.1/docs/SOURCES.md +87 -0
  20. rastermoves-0.3.1/docs/TESTING.md +358 -0
  21. rastermoves-0.3.1/examples/batch_api.py +26 -0
  22. rastermoves-0.3.1/examples/models/example-ultrasharp-v2.json +40 -0
  23. rastermoves-0.3.1/examples/refine_api.py +30 -0
  24. rastermoves-0.3.1/pyproject.toml +51 -0
  25. rastermoves-0.3.1/scripts/release_tools.py +145 -0
  26. rastermoves-0.3.1/scripts/smoke_installed.py +71 -0
  27. rastermoves-0.3.1/setup.cfg +4 -0
  28. rastermoves-0.3.1/src/rastermoves/__init__.py +14 -0
  29. rastermoves-0.3.1/src/rastermoves/__main__.py +2 -0
  30. rastermoves-0.3.1/src/rastermoves/backends/__init__.py +0 -0
  31. rastermoves-0.3.1/src/rastermoves/backends/base.py +17 -0
  32. rastermoves-0.3.1/src/rastermoves/backends/onnx_backend.py +110 -0
  33. rastermoves-0.3.1/src/rastermoves/backends/spandrel_backend.py +158 -0
  34. rastermoves-0.3.1/src/rastermoves/catalog.py +127 -0
  35. rastermoves-0.3.1/src/rastermoves/cli.py +353 -0
  36. rastermoves-0.3.1/src/rastermoves/downloads.py +184 -0
  37. rastermoves-0.3.1/src/rastermoves/errors.py +14 -0
  38. rastermoves-0.3.1/src/rastermoves/models/2x-NomosUni-span-multijpg.json +29 -0
  39. rastermoves-0.3.1/src/rastermoves/models/4x-LexicaHAT.json +26 -0
  40. rastermoves-0.3.1/src/rastermoves/models/4x-Remacri.json +27 -0
  41. rastermoves-0.3.1/src/rastermoves/models/4x-SPANkendata.json +27 -0
  42. rastermoves-0.3.1/src/rastermoves/models/4x-UltraSharpV2.json +40 -0
  43. rastermoves-0.3.1/src/rastermoves/models/4x-realesr-animevideo-v3.json +28 -0
  44. rastermoves-0.3.1/src/rastermoves/models/4x-realesr-general-x4v3.json +29 -0
  45. rastermoves-0.3.1/src/rastermoves/models/4x-realesrgan-x4plus.json +29 -0
  46. rastermoves-0.3.1/src/rastermoves/network.py +86 -0
  47. rastermoves-0.3.1/src/rastermoves/paths.py +16 -0
  48. rastermoves-0.3.1/src/rastermoves/pipeline.py +283 -0
  49. rastermoves-0.3.1/src/rastermoves/plugins.py +63 -0
  50. rastermoves-0.3.1/src/rastermoves/py.typed +0 -0
  51. rastermoves-0.3.1/src/rastermoves/refinement/__init__.py +5 -0
  52. rastermoves-0.3.1/src/rastermoves/refinement/api.py +359 -0
  53. rastermoves-0.3.1/src/rastermoves/refinement/cli.py +159 -0
  54. rastermoves-0.3.1/src/rastermoves/refinement/diffusers_backend.py +371 -0
  55. rastermoves-0.3.1/src/rastermoves/refinement/specs.py +146 -0
  56. rastermoves-0.3.1/src/rastermoves/refinement/tiles.py +114 -0
  57. rastermoves-0.3.1/src/rastermoves/registry.py +84 -0
  58. rastermoves-0.3.1/src/rastermoves/specs.py +103 -0
  59. rastermoves-0.3.1/src/rastermoves/sweep.py +296 -0
  60. rastermoves-0.3.1/src/rastermoves/tiling.py +117 -0
  61. rastermoves-0.3.1/src/rastermoves/tracing.py +350 -0
  62. rastermoves-0.3.1/src/rastermoves.egg-info/PKG-INFO +547 -0
  63. rastermoves-0.3.1/src/rastermoves.egg-info/SOURCES.txt +83 -0
  64. rastermoves-0.3.1/src/rastermoves.egg-info/dependency_links.txt +1 -0
  65. rastermoves-0.3.1/src/rastermoves.egg-info/entry_points.txt +2 -0
  66. rastermoves-0.3.1/src/rastermoves.egg-info/requires.txt +54 -0
  67. rastermoves-0.3.1/src/rastermoves.egg-info/top_level.txt +1 -0
  68. rastermoves-0.3.1/tests/conftest.py +44 -0
  69. rastermoves-0.3.1/tests/test_backend_adapters.py +144 -0
  70. rastermoves-0.3.1/tests/test_catalog_registry.py +134 -0
  71. rastermoves-0.3.1/tests/test_downloads.py +170 -0
  72. rastermoves-0.3.1/tests/test_live.py +20 -0
  73. rastermoves-0.3.1/tests/test_package_identity.py +172 -0
  74. rastermoves-0.3.1/tests/test_pipeline_cli.py +150 -0
  75. rastermoves-0.3.1/tests/test_plugin_entrypoints.py +51 -0
  76. rastermoves-0.3.1/tests/test_refinement.py +362 -0
  77. rastermoves-0.3.1/tests/test_refinement_backend.py +286 -0
  78. rastermoves-0.3.1/tests/test_refinement_live.py +20 -0
  79. rastermoves-0.3.1/tests/test_refinement_runtime.py +70 -0
  80. rastermoves-0.3.1/tests/test_refinement_workflows.py +143 -0
  81. rastermoves-0.3.1/tests/test_release_tools.py +196 -0
  82. rastermoves-0.3.1/tests/test_safe_loading.py +53 -0
  83. rastermoves-0.3.1/tests/test_sweep.py +289 -0
  84. rastermoves-0.3.1/tests/test_tiling.py +102 -0
  85. rastermoves-0.3.1/tests/test_tracing.py +520 -0
@@ -0,0 +1,4 @@
1
+ **
2
+ !Dockerfile
3
+ !dist/
4
+ !dist/*.whl
@@ -0,0 +1,15 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: github-actions
4
+ directory: /
5
+ schedule:
6
+ interval: weekly
7
+ - package-ecosystem: pip
8
+ directory: /
9
+ schedule:
10
+ interval: weekly
11
+ open-pull-requests-limit: 5
12
+ - package-ecosystem: docker
13
+ directory: /
14
+ schedule:
15
+ interval: weekly
@@ -0,0 +1,272 @@
1
+ name: Release
2
+ on:
3
+ push:
4
+ tags: ['v*']
5
+ workflow_dispatch:
6
+ inputs:
7
+ tag:
8
+ description: Existing version tag; leave blank only for a TestPyPI rehearsal of the selected ref
9
+ required: false
10
+ type: string
11
+ target:
12
+ description: TestPyPI only, or all configured production destinations
13
+ required: true
14
+ type: choice
15
+ default: testpypi
16
+ options: [testpypi, production]
17
+ # One release at a time: do not cancel a partly-published distribution.
18
+ concurrency:
19
+ group: rastermoves-release
20
+ cancel-in-progress: false
21
+ permissions:
22
+ contents: read
23
+ jobs:
24
+ prepare:
25
+ if: github.repository == 'kieransimkin/RasterMoves'
26
+ runs-on: ubuntu-latest
27
+ timeout-minutes: 5
28
+ outputs:
29
+ tag: ${{ steps.metadata.outputs.tag }}
30
+ version: ${{ steps.metadata.outputs.version }}
31
+ commit: ${{ steps.metadata.outputs.commit }}
32
+ image: ${{ steps.metadata.outputs.image }}
33
+ prerelease: ${{ steps.metadata.outputs.prerelease }}
34
+ target: ${{ steps.route.outputs.target }}
35
+ steps:
36
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
37
+ with:
38
+ ref: ${{ inputs.tag && format('refs/tags/{0}', inputs.tag) || github.ref }}
39
+ fetch-depth: 0
40
+ persist-credentials: false
41
+ - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
42
+ with:
43
+ python-version: '3.12'
44
+ - name: Validate tag, source versions and exact commit
45
+ id: metadata
46
+ env:
47
+ RELEASE_TAG: ${{ github.event_name == 'push' && github.ref_name || inputs.tag }}
48
+ TARGET: ${{ inputs.target || 'production' }}
49
+ shell: bash
50
+ run: |
51
+ extra=()
52
+ if [ "$TARGET" = testpypi ] && [ -z "$RELEASE_TAG" ]; then extra+=(--allow-untagged); fi
53
+ python scripts/release_tools.py metadata --tag "$RELEASE_TAG" --repository "$GITHUB_REPOSITORY" \
54
+ --github-output "$GITHUB_OUTPUT" "${extra[@]}"
55
+ - id: route
56
+ env:
57
+ TARGET: ${{ inputs.target || 'production' }}
58
+ run: echo "target=$TARGET" >> "$GITHUB_OUTPUT"
59
+ checks:
60
+ needs: prepare
61
+ uses: ./.github/workflows/tests.yml
62
+ with:
63
+ ref: ${{ needs.prepare.outputs.commit }}
64
+ pypi:
65
+ needs: [prepare, checks]
66
+ if: needs.prepare.outputs.target == 'production'
67
+ runs-on: ubuntu-latest
68
+ timeout-minutes: 10
69
+ environment:
70
+ name: pypi
71
+ url: https://pypi.org/project/rastermoves/
72
+ permissions:
73
+ id-token: write
74
+ steps:
75
+ - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
76
+ with:
77
+ name: python-dist
78
+ path: dist/
79
+ - name: Publish wheel and source distribution using Trusted Publishing
80
+ uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1
81
+ with:
82
+ packages-dir: dist/
83
+ attestations: true
84
+ # Do not conceal a duplicate version or changed release by skipping it.
85
+ skip-existing: false
86
+ testpypi:
87
+ needs: [prepare, checks]
88
+ if: needs.prepare.outputs.target == 'testpypi' || vars.PUBLISH_TESTPYPI == 'true'
89
+ runs-on: ubuntu-latest
90
+ timeout-minutes: 10
91
+ environment:
92
+ name: testpypi
93
+ url: https://test.pypi.org/project/rastermoves/
94
+ permissions:
95
+ id-token: write
96
+ steps:
97
+ - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
98
+ with:
99
+ name: python-dist
100
+ path: dist/
101
+ - uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1
102
+ with:
103
+ packages-dir: dist/
104
+ repository-url: https://test.pypi.org/legacy/
105
+ attestations: true
106
+ skip-existing: false
107
+ github-release:
108
+ needs: [prepare, checks]
109
+ if: needs.prepare.outputs.target == 'production'
110
+ runs-on: ubuntu-latest
111
+ timeout-minutes: 10
112
+ permissions:
113
+ contents: write
114
+ env:
115
+ GH_TOKEN: ${{ github.token }}
116
+ GH_REPO: ${{ github.repository }}
117
+ TAG: ${{ needs.prepare.outputs.tag }}
118
+ VERSION: ${{ needs.prepare.outputs.version }}
119
+ PRERELEASE: ${{ needs.prepare.outputs.prerelease }}
120
+ steps:
121
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
122
+ with:
123
+ ref: ${{ needs.prepare.outputs.commit }}
124
+ persist-credentials: false
125
+ - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
126
+ with:
127
+ python-version: '3.12'
128
+ - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
129
+ with:
130
+ name: python-dist
131
+ path: dist/
132
+ - run: python scripts/release_tools.py dist --checksums dist/SHA256SUMS
133
+ - name: Attach artifacts while draft, then publish the release
134
+ shell: bash
135
+ run: |
136
+ # Never replace assets on an already published/immutable release.
137
+ if DRAFT=$(gh release view "$TAG" --json isDraft --jq .isDraft); then
138
+ if [ "$DRAFT" != true ]; then
139
+ mkdir -p "$RUNNER_TEMP/existing-release"
140
+ gh release download "$TAG" -D "$RUNNER_TEMP/existing-release" \
141
+ -p '*.whl' -p '*.tar.gz' -p 'SHA256SUMS'
142
+ for file in dist/*.whl dist/*.tar.gz dist/SHA256SUMS; do
143
+ cmp "$file" "$RUNNER_TEMP/existing-release/$(basename "$file")"
144
+ done
145
+ echo 'Published release already has the identical artifacts.'
146
+ exit 0
147
+ fi
148
+ else
149
+ gh release create "$TAG" --verify-tag --draft --title "RasterMoves $VERSION" --generate-notes
150
+ fi
151
+ gh release upload "$TAG" dist/*.whl dist/*.tar.gz dist/SHA256SUMS --clobber
152
+ gh release edit "$TAG" --draft=false --prerelease="$PRERELEASE"
153
+ ghcr:
154
+ needs: [prepare, checks]
155
+ if: needs.prepare.outputs.target == 'production'
156
+ runs-on: ubuntu-latest
157
+ timeout-minutes: 40
158
+ permissions:
159
+ contents: read
160
+ packages: write
161
+ outputs:
162
+ digest: ${{ steps.publish.outputs.digest }}
163
+ env:
164
+ IMAGE: ${{ needs.prepare.outputs.image }}
165
+ VERSION: ${{ needs.prepare.outputs.version }}
166
+ PRERELEASE: ${{ needs.prepare.outputs.prerelease }}
167
+ steps:
168
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
169
+ with:
170
+ ref: ${{ needs.prepare.outputs.commit }}
171
+ persist-credentials: false
172
+ - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
173
+ with:
174
+ name: python-dist
175
+ path: dist/
176
+ - uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
177
+ - name: Build CPU container from the tested wheel (not from PyPI)
178
+ uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6
179
+ with:
180
+ context: .
181
+ platforms: linux/amd64
182
+ load: true
183
+ push: false
184
+ tags: rastermoves:release-check
185
+ build-args: |
186
+ VERSION=${{ needs.prepare.outputs.version }}
187
+ REVISION=${{ needs.prepare.outputs.commit }}
188
+ SOURCE_URL=https://github.com/${{ github.repository }}
189
+ cache-from: type=gha,scope=rastermoves-cpu
190
+ cache-to: type=gha,mode=max,scope=rastermoves-cpu
191
+ - name: Smoke-test the image before pushing it
192
+ shell: bash
193
+ run: |
194
+ docker run --rm --network none rastermoves:release-check --version
195
+ docker run --rm --network none --entrypoint python \
196
+ -v "$PWD/scripts/smoke_installed.py:/tmp/smoke_installed.py:ro" \
197
+ rastermoves:release-check /tmp/smoke_installed.py --version "$VERSION" --runtimes
198
+ - uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
199
+ with:
200
+ registry: ghcr.io
201
+ username: ${{ github.actor }}
202
+ password: ${{ github.token }}
203
+ - name: Push the exact smoke-tested image
204
+ id: publish
205
+ shell: bash
206
+ run: |
207
+ tags=("$VERSION" "$VERSION-cpu")
208
+ if [ "$PRERELEASE" = false ]; then tags+=(latest cpu); fi
209
+ for tag in "${tags[@]}"; do
210
+ docker tag rastermoves:release-check "$IMAGE:$tag"
211
+ docker push "$IMAGE:$tag"
212
+ done
213
+ REPO_DIGEST=$(docker inspect --format '{{index .RepoDigests 0}}' "$IMAGE:$VERSION")
214
+ DIGEST=${REPO_DIGEST##*@}
215
+ [[ "$DIGEST" =~ ^sha256:[a-f0-9]{64}$ ]]
216
+ echo "digest=$DIGEST" >> "$GITHUB_OUTPUT"
217
+ echo "Published $IMAGE@$DIGEST" >> "$GITHUB_STEP_SUMMARY"
218
+ dockerhub:
219
+ needs: [prepare, ghcr]
220
+ if: needs.prepare.outputs.target == 'production' && vars.DOCKERHUB_USERNAME != ''
221
+ runs-on: ubuntu-latest
222
+ timeout-minutes: 20
223
+ permissions:
224
+ packages: read
225
+ env:
226
+ VERSION: ${{ needs.prepare.outputs.version }}
227
+ PRERELEASE: ${{ needs.prepare.outputs.prerelease }}
228
+ SOURCE_IMAGE: ${{ needs.prepare.outputs.image }}@${{ needs.ghcr.outputs.digest }}
229
+ HUB_REPOSITORY: ${{ vars.DOCKERHUB_REPOSITORY || format('{0}/rastermoves', vars.DOCKERHUB_USERNAME) }}
230
+ steps:
231
+ - name: Check Docker Hub credentials and lowercase repository name
232
+ env:
233
+ HUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
234
+ shell: bash
235
+ run: |
236
+ test -n "$HUB_TOKEN" || { echo 'Set DOCKERHUB_TOKEN or remove DOCKERHUB_USERNAME to disable the mirror.'; exit 1; }
237
+ [[ "$HUB_REPOSITORY" =~ ^[a-z0-9][a-z0-9_-]*/[a-z0-9][a-z0-9_.-]*$ ]]
238
+ - uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
239
+ - uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
240
+ with:
241
+ registry: ghcr.io
242
+ username: ${{ github.actor }}
243
+ password: ${{ github.token }}
244
+ - uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
245
+ with:
246
+ username: ${{ vars.DOCKERHUB_USERNAME }}
247
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
248
+ - name: Mirror the GHCR digest without rebuilding
249
+ shell: bash
250
+ run: |
251
+ tags=(-t "docker.io/$HUB_REPOSITORY:$VERSION" -t "docker.io/$HUB_REPOSITORY:$VERSION-cpu")
252
+ if [ "$PRERELEASE" = false ]; then tags+=(-t "docker.io/$HUB_REPOSITORY:latest" -t "docker.io/$HUB_REPOSITORY:cpu"); fi
253
+ docker buildx imagetools create "${tags[@]}" "$SOURCE_IMAGE"
254
+ summary:
255
+ if: always()
256
+ needs: [prepare, checks, pypi, testpypi, github-release, ghcr, dockerhub]
257
+ runs-on: ubuntu-latest
258
+ timeout-minutes: 5
259
+ permissions: {}
260
+ steps:
261
+ - name: Show each destination's actual result
262
+ env:
263
+ JOBS: ${{ toJSON(needs) }}
264
+ run: |
265
+ python - <<'PY'
266
+ import json, os
267
+ with open(os.environ['GITHUB_STEP_SUMMARY'], 'a') as f:
268
+ f.write('## RasterMoves release results\n\n| Job | Result |\n|---|---|\n')
269
+ for name, info in json.loads(os.environ['JOBS']).items():
270
+ f.write(f"| {name} | {info['result']} |\n")
271
+ f.write('\nSkipped optional destinations are not published. Re-run failed jobs after fixing configuration.\n')
272
+ PY
@@ -0,0 +1,145 @@
1
+ name: Tests
2
+ on:
3
+ push:
4
+ branches: ['**']
5
+ pull_request:
6
+ workflow_dispatch:
7
+ inputs:
8
+ live_models:
9
+ description: Download and run real pretrained model smoke tests
10
+ type: boolean
11
+ default: false
12
+ workflow_call:
13
+ inputs:
14
+ ref:
15
+ description: Exact commit to test (release workflow supplies the tagged SHA)
16
+ type: string
17
+ default: ''
18
+ live_models:
19
+ type: boolean
20
+ default: false
21
+ permissions:
22
+ contents: read
23
+ jobs:
24
+ unit:
25
+ runs-on: ${{ matrix.os }}
26
+ timeout-minutes: 20
27
+ strategy:
28
+ fail-fast: false
29
+ matrix:
30
+ os: [ubuntu-latest]
31
+ python: ['3.10', '3.11', '3.12', '3.13']
32
+ include:
33
+ - os: windows-latest
34
+ python: '3.12'
35
+ - os: macos-latest
36
+ python: '3.12'
37
+ steps:
38
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
39
+ with:
40
+ ref: ${{ inputs.ref || github.sha }}
41
+ persist-credentials: false
42
+ - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
43
+ with:
44
+ python-version: ${{ matrix.python }}
45
+ cache: pip
46
+ - run: python -m pip install -e '.[dev]'
47
+ - run: python -m pytest -q
48
+ runtimes:
49
+ runs-on: ubuntu-latest
50
+ timeout-minutes: 25
51
+ steps:
52
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
53
+ with:
54
+ ref: ${{ inputs.ref || github.sha }}
55
+ persist-credentials: false
56
+ - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
57
+ with:
58
+ python-version: '3.12'
59
+ cache: pip
60
+ - run: python -m pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
61
+ - run: python -m pip install -e '.[torch,onnx,gdrive,dev]'
62
+ - run: python -m pip check
63
+ - run: python -m pytest -q
64
+ env:
65
+ OMP_NUM_THREADS: '2'
66
+ MKL_NUM_THREADS: '2'
67
+ refinement-runtime:
68
+ runs-on: ubuntu-latest
69
+ timeout-minutes: 25
70
+ steps:
71
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
72
+ with:
73
+ ref: ${{ inputs.ref || github.sha }}
74
+ persist-credentials: false
75
+ - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
76
+ with:
77
+ python-version: '3.12'
78
+ cache: pip
79
+ - run: python -m pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
80
+ - run: python -m pip install -e '.[refine,dev]'
81
+ - run: python -m pip check
82
+ - name: Exercise real SD1.5 and SDXL APIs with tiny random weights (no downloads)
83
+ run: python -m pytest -q tests/test_refinement_runtime.py
84
+ env:
85
+ RASTERMOVES_REQUIRE_DIFFUSERS: '1'
86
+ OMP_NUM_THREADS: '2'
87
+ MKL_NUM_THREADS: '2'
88
+ package:
89
+ runs-on: ubuntu-latest
90
+ timeout-minutes: 20
91
+ steps:
92
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
93
+ with:
94
+ ref: ${{ inputs.ref || github.sha }}
95
+ persist-credentials: false
96
+ - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
97
+ with:
98
+ python-version: '3.12'
99
+ cache: pip
100
+ - run: python -m pip install -e '.[dev]'
101
+ - name: Build and validate distributable artifacts
102
+ shell: bash
103
+ run: |
104
+ echo "SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD)" >> "$GITHUB_ENV"
105
+ - run: python -m build
106
+ - run: python scripts/release_tools.py dist --normalize
107
+ - run: python -m twine check --strict dist/*
108
+ - name: Smoke-test isolated wheel and source installations
109
+ shell: bash
110
+ run: |
111
+ VERSION=$(python -c 'import rastermoves; print(rastermoves.__version__)')
112
+ python -m venv "$RUNNER_TEMP/wheel-test"
113
+ WHEEL=$(find dist -maxdepth 1 -name '*.whl' -print -quit)
114
+ "$RUNNER_TEMP/wheel-test/bin/python" -m pip install "${WHEEL}[trace]"
115
+ cp scripts/smoke_installed.py "$RUNNER_TEMP/smoke_installed.py"
116
+ (cd "$RUNNER_TEMP" && ./wheel-test/bin/python smoke_installed.py --version "$VERSION" --trace)
117
+ python -m venv "$RUNNER_TEMP/sdist-test"
118
+ SDIST=$(find dist -maxdepth 1 -name '*.tar.gz' -print -quit)
119
+ "$RUNNER_TEMP/sdist-test/bin/python" -m pip install "${SDIST}[trace]"
120
+ (cd "$RUNNER_TEMP" && ./sdist-test/bin/python smoke_installed.py --version "$VERSION" --trace)
121
+ - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
122
+ with:
123
+ name: python-dist
124
+ path: dist/
125
+ if-no-files-found: error
126
+ retention-days: 14
127
+ live:
128
+ if: inputs.live_models == true
129
+ runs-on: ubuntu-latest
130
+ timeout-minutes: 30
131
+ steps:
132
+ - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
133
+ with:
134
+ ref: ${{ inputs.ref || github.sha }}
135
+ persist-credentials: false
136
+ - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
137
+ with:
138
+ python-version: '3.12'
139
+ - run: python -m pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
140
+ - run: python -m pip install -e '.[torch,onnx,dev]'
141
+ - run: python -m pytest -q tests/test_live.py
142
+ env:
143
+ RASTERMOVES_LIVE: '1'
144
+ OMP_NUM_THREADS: '2'
145
+ MKL_NUM_THREADS: '2'
@@ -0,0 +1,86 @@
1
+ # Changelog
2
+
3
+ ## 0.3.1 - 2026-10-08
4
+
5
+ - Include the reviewed use-and-improve workflow, evaluation checklist and improvement-loop diagram.
6
+ - Document mixed-runtime comparison recovery and clarify the current optional model routes.
7
+ - No image-processing algorithm or default-model changes.
8
+
9
+ ## 0.3.0 — 2026-10-02
10
+
11
+ - Add optional same-size SD1.5/SDXL ControlNet Tile img2img workflows, with pinned
12
+ Hugging Face component revisions, safe checkpoint loading and explicit offline prefetch.
13
+ - Add `refiners`, `download-refiner`, standalone `refine`, and `upscale --refiner`.
14
+ - Keep original upscaler plugins/defaults unchanged; the heavyweight `refine` extra
15
+ is separate from base, `all` and the published CPU container.
16
+ - Use frozen-input spatial tiles, independent diffusion tile controls and coordinate-derived
17
+ seeds; report actual denoising steps instead of implying configured steps all execute.
18
+ - Preserve lossless baselines, alpha and protected pixels; add outward mask feathering,
19
+ explicit blending and optional global RGB mean matching.
20
+ - Add hash-verified resume, per-workflow journals, failure/interruption baseline retention,
21
+ output collision guards and explicit one-refiner all-model comparisons.
22
+ - Extend stage traces with VAE encode/decode, denoising and compositing; record CUDA
23
+ allocator peaks when running the native CUDA refinement backend.
24
+ - Add local refiner entry points, offline tests, optional random-weight Diffusers runtime
25
+ CI, opt-in pretrained smoke tests, and installed-artifact workflow smoke checks.
26
+ - This is the first ControlNet Tile implementation, not MultiDiffusion/shared-latent
27
+ inference or a SeedVR2/VOSR/SUPIR restoration integration.
28
+
29
+ ## 0.2.1 — 2026-10-02
30
+
31
+ - Add opt-in `--trace`, `--trace-file` and `--trace-interval` options for single-image,
32
+ batch, all-model and dry-run commands.
33
+ - Stream Chrome JSON timelines with nested stage durations, process CPU seconds /
34
+ utilization, RSS/VMS and thread counters, plus system available-memory context.
35
+ - Include per-model metrics in comparison summaries; preserve failure/interruption
36
+ traces, mark resumed results as reused rather than inventing new inference timings.
37
+ - Distinguish download/cache verification, backend load, inference attempts (including
38
+ OOM retry markers), postprocessing, writes and cleanup.
39
+ - Add a lazy optional `trace` dependency extra (`psutil`), also included in `all`/`dev`.
40
+ - Never overwrite existing traces; choose numbered defaults on subsequent runs.
41
+ - Add tracing documentation, regression tests and installed-artifact tracing smoke tests.
42
+ - No model/plugin interface, checkpoint source, architecture or publication-credential changes.
43
+
44
+ ## 0.2.0 — 2026-10-02
45
+
46
+ - Add `upscale --all-models -o DIRECTORY`, with `--sync-models` for the full
47
+ OpenModelDB catalogue and `--dry-run` to inspect the selection before downloading.
48
+ - Process models sequentially with isolated failures, deterministic per-model
49
+ filenames, provenance sidecars and an incremental `summary.json`.
50
+ - Add checksum-validated `--resume`, folder locking, explicit overwrite controls,
51
+ interruption recording and nonzero exit codes for incomplete comparisons.
52
+ - Add tag-driven CI/CD for PyPI Trusted Publishing, GitHub Release assets/checksums,
53
+ GHCR CPU containers, optional TestPyPI rehearsals and optional Docker Hub mirroring.
54
+ - Gate publication on Linux/Windows/macOS tests, optional-runtime tests, wheel/sdist
55
+ validation and isolated-install smoke checks; smoke-test containers before pushing.
56
+ - Pin third-party Actions to verified commit SHAs and configure Dependabot updates.
57
+ - Add version/tag guards, deterministic source archives, release documentation,
58
+ Dockerfile, and package/repository/author metadata.
59
+
60
+
61
+ ## 0.1.1 — 2026-10-02
62
+
63
+ ### RasterMoves rename
64
+
65
+ - Rename the UpscaleLab distribution, executable, and Python package to `rastermoves`.
66
+ - Identify RasterMoves as the image-upscaling component of the DanceFlow family.
67
+ - Rename Python plugin entry-point groups to `rastermoves.models` and
68
+ `rastermoves.backends`; update imports, plugin documentation, and examples.
69
+ - Rename environment variables to `RASTERMOVES_CACHE`, `RASTERMOVES_PLUGIN_PATH`,
70
+ `RASTERMOVES_OFFLINE`, and `RASTERMOVES_LIVE`.
71
+ - Use RasterMoves-specific default cache/config directories, temporary output prefixes,
72
+ HTTP user agent, CLI help, diagnostics, and test workflow settings.
73
+ - Include the tool name and version in JSON output provenance reports.
74
+ - Add rename regression tests and a migration guide, including reuse of existing
75
+ downloaded weights without requiring another download.
76
+
77
+ The eight bundled model definitions, model IDs, publisher checksums, source URLs,
78
+ licences, supported backends, and image-processing options are unchanged. This is a
79
+ local source/wheel release, not a publication to PyPI or GitHub. Legacy command/import
80
+ aliases are not installed; see [MIGRATION.md](docs/MIGRATION.md).
81
+
82
+ ## 0.1.0 — 2026-10-02
83
+
84
+ Initial implementation under the working name UpscaleLab: per-model JSON plugins,
85
+ OpenModelDB catalogue import, automatic downloads and caching, Spandrel/PyTorch and
86
+ ONNX adapters, tiled inference, CLI and Python API, and regression tests.
@@ -0,0 +1,32 @@
1
+ # Build a wheel first: python -m build. Release CI copies its tested wheel here.
2
+ FROM python:3.12-slim-bookworm
3
+ ARG VERSION=dev
4
+ ARG REVISION=unknown
5
+ ARG SOURCE_URL=https://github.com/kieransimkin/RasterMoves
6
+ LABEL org.opencontainers.image.title="RasterMoves" \
7
+ org.opencontainers.image.description="Modular CPU image upscaling for DanceFlow" \
8
+ org.opencontainers.image.source="${SOURCE_URL}" \
9
+ org.opencontainers.image.version="${VERSION}" \
10
+ org.opencontainers.image.revision="${REVISION}" \
11
+ org.opencontainers.image.licenses="GPL-3.0-only"
12
+ ENV PYTHONUNBUFFERED=1 \
13
+ PYTHONDONTWRITEBYTECODE=1 \
14
+ PIP_NO_CACHE_DIR=1 \
15
+ RASTERMOVES_CACHE=/cache \
16
+ HF_HOME=/cache/huggingface \
17
+ OMP_NUM_THREADS=2 \
18
+ MKL_NUM_THREADS=2
19
+ RUN apt-get update && apt-get install -y --no-install-recommends libgomp1 \
20
+ && rm -rf /var/lib/apt/lists/*
21
+ COPY dist/*.whl /tmp/wheels/
22
+ # Explicit CPU wheels prevent accidentally shipping multi-GB CUDA dependencies.
23
+ RUN python -m pip install --index-url https://download.pytorch.org/whl/cpu 'torch>=2.6' 'torchvision>=0.21' \
24
+ && for wheel in /tmp/wheels/*.whl; do python -m pip install "${wheel}[all]"; done \
25
+ && python -m pip check \
26
+ && rm -rf /tmp/wheels \
27
+ && mkdir -p /cache /work \
28
+ && chown -R 10001:10001 /cache /work
29
+ USER 10001:10001
30
+ WORKDIR /work
31
+ ENTRYPOINT ["rastermoves"]
32
+ CMD ["--help"]