MCPcopy Create free account
hub / github.com/Francis-Rings/StableAnimator / load_images_from_folder

Function load_images_from_folder

train_single.py:159–169  ·  view source on GitHub ↗
(folder)

Source from the content-addressed store, hash-verified

157# return images
158
159def load_images_from_folder(folder):
160 images = []
161
162 files = os.listdir(folder)
163 png_files = [f for f in files if f.endswith('.png')]
164 png_files.sort(key=lambda x: int(x.split('_')[1].split('.')[0]))
165 for filename in png_files:
166 img = Image.open(os.path.join(folder, filename)).convert('RGB')
167 images.append(img)
168
169 return images
170
171
172# copy from https://github.com/crowsonkb/k-diffusion.git

Callers 1

log_validationFunction · 0.70

Calls 1

splitMethod · 0.80

Tested by

no test coverage detected