mirror of
https://github.com/huggingface/diffusers.git
synced 2026-01-29 07:22:12 +03:00
[LoRA] Add LoRA training script (#1884)
* [Lora] first upload * add first lora version * upload * more * first training * up * correct * improve * finish loaders and inference * up * up * fix more * up * finish more * finish more * up * up * change year * revert year change * Change lines * Add cloneofsimo as co-author. Co-authored-by: Simo Ryu <cloneofsimo@gmail.com> * finish * fix docs * Apply suggestions from code review Co-authored-by: Pedro Cuenca <pedro@huggingface.co> Co-authored-by: Suraj Patil <surajp815@gmail.com> * upload * finish Co-authored-by: Simo Ryu <cloneofsimo@gmail.com> Co-authored-by: Pedro Cuenca <pedro@huggingface.co> Co-authored-by: Suraj Patil <surajp815@gmail.com>
This commit is contained in:
committed by
GitHub
parent
ac3fc64906
commit
ed616bd8a8
@@ -217,6 +217,13 @@ try:
|
||||
except importlib_metadata.PackageNotFoundError:
|
||||
_k_diffusion_available = False
|
||||
|
||||
_wandb_available = importlib.util.find_spec("wandb") is not None
|
||||
try:
|
||||
_wandb_version = importlib_metadata.version("wandb")
|
||||
logger.debug(f"Successfully imported k-diffusion version {_wandb_version }")
|
||||
except importlib_metadata.PackageNotFoundError:
|
||||
_wandb_available = False
|
||||
|
||||
|
||||
def is_torch_available():
|
||||
return _torch_available
|
||||
@@ -274,6 +281,10 @@ def is_k_diffusion_available():
|
||||
return _k_diffusion_available
|
||||
|
||||
|
||||
def is_wandb_available():
|
||||
return _wandb_available
|
||||
|
||||
|
||||
# docstyle-ignore
|
||||
FLAX_IMPORT_ERROR = """
|
||||
{0} requires the FLAX library but it was not found in your environment. Checkout the instructions on the
|
||||
@@ -328,6 +339,12 @@ K_DIFFUSION_IMPORT_ERROR = """
|
||||
install k-diffusion`
|
||||
"""
|
||||
|
||||
# docstyle-ignore
|
||||
WANDB_IMPORT_ERROR = """
|
||||
{0} requires the wandb library but it was not found in your environment. You can install it with pip: `pip
|
||||
install wandb`
|
||||
"""
|
||||
|
||||
|
||||
BACKENDS_MAPPING = OrderedDict(
|
||||
[
|
||||
@@ -340,6 +357,7 @@ BACKENDS_MAPPING = OrderedDict(
|
||||
("unidecode", (is_unidecode_available, UNIDECODE_IMPORT_ERROR)),
|
||||
("librosa", (is_librosa_available, LIBROSA_IMPORT_ERROR)),
|
||||
("k_diffusion", (is_k_diffusion_available, K_DIFFUSION_IMPORT_ERROR)),
|
||||
("wandb", (is_wandb_available, WANDB_IMPORT_ERROR)),
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user