Spaces:
Running
Running
File size: 672 Bytes
613c9ab |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
class MotionLoraInfo:
def __init__(self, name: str, strength: float = 1.0, hash: str=""):
self.name = name
self.strength = strength
self.hash = ""
def set_hash(self, hash: str):
self.hash = hash
def clone(self):
return MotionLoraInfo(self.name, self.strength, self.hash)
class MotionLoraList:
def __init__(self):
self.loras: list[MotionLoraInfo] = []
def add_lora(self, lora: MotionLoraInfo):
self.loras.append(lora)
def clone(self):
new_list = MotionLoraList()
for lora in self.loras:
new_list.add_lora(lora.clone())
return new_list
|