Added anchors to regulate the lora

This commit is contained in:
Jaret Burkett
2023-07-24 14:59:16 -06:00
parent 390192c6a1
commit 61dd818608
5 changed files with 180 additions and 31 deletions

View File

@@ -71,9 +71,19 @@ class SliderTargetConfig:
self.weight: float = kwargs.get('weight', 1.0)
class SliderConfigAnchors:
def __init__(self, **kwargs):
self.prompt = kwargs.get('prompt', '')
self.neg_prompt = kwargs.get('neg_prompt', '')
self.multiplier = kwargs.get('multiplier', 1.0)
class SliderConfig:
def __init__(self, **kwargs):
targets = kwargs.get('targets', [])
targets = [SliderTargetConfig(**target) for target in targets]
self.targets: List[SliderTargetConfig] = targets
anchors = kwargs.get('anchors', [])
anchors = [SliderConfigAnchors(**anchor) for anchor in anchors]
self.anchors: List[SliderConfigAnchors] = anchors
self.resolutions: List[List[int]] = kwargs.get('resolutions', [[512, 512]])