Upload jobs/process/MergeLoconProcess.py with huggingface_hub
Browse files
jobs/process/MergeLoconProcess.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from collections import OrderedDict
|
| 2 |
+
from toolkit.lycoris_utils import extract_diff
|
| 3 |
+
from .BaseExtractProcess import BaseExtractProcess
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
class MergeLoconProcess(BaseExtractProcess):
|
| 7 |
+
def __init__(self, process_id: int, job, config: OrderedDict):
|
| 8 |
+
super().__init__(process_id, job, config)
|
| 9 |
+
|
| 10 |
+
def run(self):
|
| 11 |
+
super().run()
|
| 12 |
+
new_state_dict = {}
|
| 13 |
+
raise NotImplementedError("This is not implemented yet")
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
def get_output_path(self, prefix=None, suffix=None):
|
| 17 |
+
if suffix is None:
|
| 18 |
+
suffix = f"_{self.mode}_{self.linear_param}_{self.conv_param}"
|
| 19 |
+
return super().get_output_path(prefix, suffix)
|
| 20 |
+
|