MCPcopy Create free account
hub / github.com/TencentARC/AnimeGamer / read_from_file

Function read_from_file

inference_Decoder.py:81–88  ·  view source on GitHub ↗
(p, rank=0, world_size=1)

Source from the content-addressed store, hash-verified

79
80
81def read_from_file(p, rank=0, world_size=1):
82 with open(p, "r") as fin:
83 cnt = -1
84 for l in fin:
85 cnt += 1
86 if cnt % world_size != rank:
87 continue
88 yield l.strip(), cnt
89
90
91def get_unique_embedder_keys_from_conditioner(conditioner):

Callers 1

sampling_mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected