fix: print out the path where the image encode failed (#107)
This commit is contained in:
@@ -1385,8 +1385,13 @@ class LatentCachingMixin:
|
|||||||
dtype = self.sd.torch_dtype
|
dtype = self.sd.torch_dtype
|
||||||
device = self.sd.device_torch
|
device = self.sd.device_torch
|
||||||
# add batch dimension
|
# add batch dimension
|
||||||
imgs = file_item.tensor.unsqueeze(0).to(device, dtype=dtype)
|
try:
|
||||||
latent = self.sd.encode_images(imgs).squeeze(0)
|
imgs = file_item.tensor.unsqueeze(0).to(device, dtype=dtype)
|
||||||
|
latent = self.sd.encode_images(imgs).squeeze(0)
|
||||||
|
except Exception as e:
|
||||||
|
print(f"Error processing image: {file_item.path}")
|
||||||
|
print(f"Error: {str(e)}")
|
||||||
|
raise e
|
||||||
# save_latent
|
# save_latent
|
||||||
if to_disk:
|
if to_disk:
|
||||||
state_dict = OrderedDict([
|
state_dict = OrderedDict([
|
||||||
|
|||||||
Reference in New Issue
Block a user