Upload extensions_built_in/advanced_generator/__init__.py with huggingface_hub
Browse files
extensions_built_in/advanced_generator/__init__.py
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 AdvancedReferenceGeneratorExtension(Extension):
|
| 7 |
+
# uid must be unique, it is how the extension is identified
|
| 8 |
+
uid = "reference_generator"
|
| 9 |
+
|
| 10 |
+
# name is the name of the extension for printing
|
| 11 |
+
name = "Reference Generator"
|
| 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 .ReferenceGenerator import ReferenceGenerator
|
| 19 |
+
return ReferenceGenerator
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
# This is for generic training (LoRA, Dreambooth, FineTuning)
|
| 23 |
+
class PureLoraGenerator(Extension):
|
| 24 |
+
# uid must be unique, it is how the extension is identified
|
| 25 |
+
uid = "pure_lora_generator"
|
| 26 |
+
|
| 27 |
+
# name is the name of the extension for printing
|
| 28 |
+
name = "Pure LoRA Generator"
|
| 29 |
+
|
| 30 |
+
# This is where your process class is loaded
|
| 31 |
+
# keep your imports in here so they don't slow down the rest of the program
|
| 32 |
+
@classmethod
|
| 33 |
+
def get_process(cls):
|
| 34 |
+
# import your process class here so it is only loaded when needed and return it
|
| 35 |
+
from .PureLoraGenerator import PureLoraGenerator
|
| 36 |
+
return PureLoraGenerator
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
# This is for generic training (LoRA, Dreambooth, FineTuning)
|
| 40 |
+
class Img2ImgGeneratorExtension(Extension):
|
| 41 |
+
# uid must be unique, it is how the extension is identified
|
| 42 |
+
uid = "batch_img2img"
|
| 43 |
+
|
| 44 |
+
# name is the name of the extension for printing
|
| 45 |
+
name = "Img2ImgGeneratorExtension"
|
| 46 |
+
|
| 47 |
+
# This is where your process class is loaded
|
| 48 |
+
# keep your imports in here so they don't slow down the rest of the program
|
| 49 |
+
@classmethod
|
| 50 |
+
def get_process(cls):
|
| 51 |
+
# import your process class here so it is only loaded when needed and return it
|
| 52 |
+
from .Img2ImgGenerator import Img2ImgGenerator
|
| 53 |
+
return Img2ImgGenerator
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
AI_TOOLKIT_EXTENSIONS = [
|
| 57 |
+
# you can put a list of extensions here
|
| 58 |
+
AdvancedReferenceGeneratorExtension, PureLoraGenerator, Img2ImgGeneratorExtension
|
| 59 |
+
]
|