[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
af638f98c3
commit
f28be14639
2 changed files with 7 additions and 6 deletions
|
|
@ -282,7 +282,6 @@ def _assert_trusted_base_model(base_model: str) -> None:
|
|||
BEFORE ``from_pretrained`` so an untrusted remote repo (which could ship pickle weights)
|
||||
is never fetched or deserialised."""
|
||||
from core.inference.diffusion import _is_trusted_diffusion_repo
|
||||
|
||||
if not _is_trusted_diffusion_repo(base_model):
|
||||
raise ValueError(
|
||||
f"Refusing to train from untrusted base model '{base_model}'. Use a local path or "
|
||||
|
|
@ -351,8 +350,12 @@ def run_diffusion_lora_training(
|
|||
if _check_stop():
|
||||
out_dir = Path(cfg.output_dir).expanduser()
|
||||
_emit(
|
||||
on_event, "complete",
|
||||
output_dir = str(out_dir), lora_path = None, stopped = True, steps_run = 0,
|
||||
on_event,
|
||||
"complete",
|
||||
output_dir = str(out_dir),
|
||||
lora_path = None,
|
||||
stopped = True,
|
||||
steps_run = 0,
|
||||
)
|
||||
return str(out_dir)
|
||||
|
||||
|
|
|
|||
|
|
@ -123,9 +123,7 @@ def test_config_from_dict_ignores_unknown_and_tuples_targets():
|
|||
def test_config_rejects_zero_lora_alpha():
|
||||
# An explicit zero alpha would scale the adapter to nothing; reject it.
|
||||
with pytest.raises(ValueError, match = "lora_alpha"):
|
||||
DiffusionLoraConfig(
|
||||
base_model = "b", data_dir = "d", output_dir = "o", lora_alpha = 0
|
||||
).normalized()
|
||||
DiffusionLoraConfig(base_model = "b", data_dir = "d", output_dir = "o", lora_alpha = 0).normalized()
|
||||
|
||||
|
||||
def test_config_coerces_string_learning_rate():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue