MCPcopy Create free account
hub / github.com/ace-step/ACE-Step / sample

Method sample

acestep/data_sampler.py:20–30  ·  view source on GitHub ↗
(self, lora_name_or_path=None)

Source from the content-addressed store, hash-verified

18 return json.load(f)
19
20 def sample(self, lora_name_or_path=None):
21 if lora_name_or_path is None or lora_name_or_path == "none":
22 json_path = random.choice(self.input_params_files)
23 json_data = self.load_json(json_path)
24 else:
25 json_path = random.choice(self.zh_rap_lora_input_params_files)
26 json_data = self.load_json(json_path)
27 # Update the lora_name in the json_data
28 json_data["lora_name_or_path"] = lora_name_or_path
29
30 return json_data

Callers 1

mainFunction · 0.95

Calls 1

load_jsonMethod · 0.95

Tested by

no test coverage detected