Upload extensions_built_in/concept_replacer/__init__.py with huggingface_hub
Browse files
extensions_built_in/concept_replacer/__init__.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This is an example extension for custom training. It is great for experimenting with new ideas.
|
| 2 |
+
from toolkit.extension import Extension
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
# This is for generic training (LoRA, Dreambooth, FineTuning)
|
| 6 |
+
class ConceptReplacerExtension(Extension):
|
| 7 |
+
# uid must be unique, it is how the extension is identified
|
| 8 |
+
uid = "concept_replacer"
|
| 9 |
+
|
| 10 |
+
# name is the name of the extension for printing
|
| 11 |
+
name = "Concept Replacer"
|
| 12 |
+
|
| 13 |
+
# This is where your process class is loaded
|
| 14 |
+
# keep your imports in here so they don't slow down the rest of the program
|
| 15 |
+
@classmethod
|
| 16 |
+
def get_process(cls):
|
| 17 |
+
# import your process class here so it is only loaded when needed and return it
|
| 18 |
+
from .ConceptReplacer import ConceptReplacer
|
| 19 |
+
return ConceptReplacer
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
AI_TOOLKIT_EXTENSIONS = [
|
| 24 |
+
# you can put a list of extensions here
|
| 25 |
+
ConceptReplacerExtension,
|
| 26 |
+
]
|