Files
generative-models/pyproject.toml
Stephan Auerhahn 931d7a389a Add inference helpers & tests (#57)
* Add inference helpers & tests

* Support testing with hatch

* fixes to hatch script

* add inference test action

* change workflow trigger

* widen trigger to test

* revert changes to workflow triggers

* Install local python in action

* Trigger on push again

* fix python version

* add CODEOWNERS and change triggers

* Report tests results

* update action versions

* format

* Fix typo and add refiner helper

* use a shared path loaded from a secret for checkpoints source

* typo fix

* Use device from input and remove duplicated code

* PR feedback

* fix call to load_model_from_config

* Move model to gpu

* Refactor helpers

* cleanup

* test refiner, prep for 1.0, align with metadata

* fix paths on second load

* deduplicate streamlit code

* filenames

* fixes

* add pydantic to requirements

* fix usage of `msg` in demo script

* remove double text

* run black

* fix streamlit sampling when returning latents

* extract function for streamlit output

* another fix for streamlit outputs

* fix img2img in streamlit

* Make fp16 optional and fix device param

* PR feedback

* fix dict cast for dataclass

* run black, update ci script

* cache pip dependencies on hosted runners, remove extra runs

* install package in ci env

* fix cache path

* PR cleanup

* one more cleanup

* don't cache, it filled up
2023-07-26 04:37:24 -07:00

48 lines
1.2 KiB
TOML

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "sgm"
dynamic = ["version"]
description = "Stability Generative Models"
readme = "README.md"
license-files = { paths = ["LICENSE"] }
requires-python = ">=3.8"
[project.urls]
Homepage = "https://github.com/Stability-AI/generative-models"
[tool.hatch.version]
path = "sgm/__init__.py"
[tool.hatch.build]
# This needs to be explicitly set so the configuration files
# grafted into the `sgm` directory get included in the wheel's
# RECORD file.
include = [
"sgm",
]
# The force-include configurations below make Hatch copy
# the configs/ directory (containing the various YAML files required
# to generatively model) into the source distribution and the wheel.
[tool.hatch.build.targets.sdist.force-include]
"./configs" = "sgm/configs"
[tool.hatch.build.targets.wheel.force-include]
"./configs" = "sgm/configs"
[tool.hatch.envs.ci]
skip-install = false
dependencies = [
"pytest"
]
[tool.hatch.envs.ci.scripts]
test-inference = [
"pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2+cu118 --index-url https://download.pytorch.org/whl/cu118",
"pip install -r requirements/pt2.txt",
"pytest -v tests/inference/test_inference.py {args}",
]