mirror of
https://github.com/finegrain-ai/refiners.git
synced 2024-11-12 16:18:22 +00:00
add black to CI
This commit is contained in:
parent
08a5341452
commit
32c1cfdbb1
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
|
@ -24,6 +24,9 @@ jobs:
|
||||||
- name: poetry install
|
- name: poetry install
|
||||||
run: poetry install --no-interaction --extras=training
|
run: poetry install --no-interaction --extras=training
|
||||||
|
|
||||||
|
- name: black
|
||||||
|
run: poetry run black --check .
|
||||||
|
|
||||||
- name: lint
|
- name: lint
|
||||||
run: poetry run ruff check .
|
run: poetry run ruff check .
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ def test_weights_path() -> Path:
|
||||||
def test_e2e_path() -> Path:
|
def test_e2e_path() -> Path:
|
||||||
return PARENT_PATH / "e2e"
|
return PARENT_PATH / "e2e"
|
||||||
|
|
||||||
|
|
||||||
@fixture(scope="session")
|
@fixture(scope="session")
|
||||||
def test_textual_inversion_path() -> Path:
|
def test_textual_inversion_path() -> Path:
|
||||||
return PARENT_PATH / "foundationals" / "clip" / "test_concepts_ref"
|
return PARENT_PATH / "foundationals" / "clip" / "test_concepts_ref"
|
||||||
|
|
|
@ -41,8 +41,10 @@ def our_encoder_with_new_concepts(
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="module")
|
@pytest.fixture(scope="module")
|
||||||
def ref_sd15_with_new_concepts(runwayml_weights_path: Path, test_textual_inversion_path: Path, test_device: torch.device):
|
def ref_sd15_with_new_concepts(
|
||||||
pipe = StableDiffusionPipeline.from_pretrained(runwayml_weights_path, torch_dtype=torch.float16).to(test_device) # type: ignore
|
runwayml_weights_path: Path, test_textual_inversion_path: Path, test_device: torch.device
|
||||||
|
):
|
||||||
|
pipe = StableDiffusionPipeline.from_pretrained(runwayml_weights_path, torch_dtype=torch.float16).to(test_device) # type: ignore
|
||||||
pipe.load_textual_inversion(test_textual_inversion_path / "cat-toy") # type: ignore
|
pipe.load_textual_inversion(test_textual_inversion_path / "cat-toy") # type: ignore
|
||||||
pipe.load_textual_inversion(test_textual_inversion_path / "gta5-artwork") # type: ignore
|
pipe.load_textual_inversion(test_textual_inversion_path / "gta5-artwork") # type: ignore
|
||||||
return pipe
|
return pipe
|
||||||
|
|
Loading…
Reference in a new issue