ComfyUIで2回目以降のフォルダを変更後に読み込めない問題を修正した

This commit is contained in:
e
2024-10-06 14:47:34 +09:00
committed by GitHub
parent 66aed3081d
commit c054d89e1c
2 changed files with 6 additions and 4 deletions
+3 -2
View File
@@ -59,8 +59,9 @@ class LoadImageAndPromptsFromDirectory:
return torch.from_numpy(np.array(image).astype(np.float32) / 255.0).unsqueeze(0)
def load_data(self, dir, files_index):
if self.max_len == 0:
self.check_directory(dir)
# 2024/10/06 毎回、フォルダを読み込むように修正する
self.check_directory(dir)
text_name = os.path.splitext(
os.path.basename(self.text_files_path[files_index])
+3 -2
View File
@@ -65,8 +65,9 @@ class LoadImageAndPromptsFromDirectory_Advanced:
return torch.from_numpy(np.array(image).astype(np.float32) / 255.0).unsqueeze(0)
def load_data(self, dir, files_index):
if self.max_len == 0:
self.check_directory(dir)
# 2024/10/06 毎回、読み込むように修正する
self.check_directory(dir)
text_name = os.path.splitext(
os.path.basename(self.text_files_path[files_index])