Fix the bug in temporal_compression data loader (#754)
This commit is contained in:
parent
7f3309b291
commit
54f4732c9b
|
|
@ -508,9 +508,9 @@ class AiToolkitDataset(LatentCachingMixin, ControlCachingMixin, CLIPCachingMixin
|
|||
|
||||
temporal_compression = 8
|
||||
if self.sd is not None:
|
||||
if hasattr(self.sd.vae.config, 'scale_factor_temporal'):
|
||||
if hasattr(self.sd.vae, 'config') and hasattr(self.sd.vae.config, 'scale_factor_temporal'):
|
||||
temporal_compression = self.sd.vae.config.scale_factor_temporal
|
||||
if hasattr(self.sd.unet.config, 'temporal_compression_ratio'):
|
||||
if hasattr(self.sd.unet, 'config') and hasattr(self.sd.unet.config, 'temporal_compression_ratio'):
|
||||
temporal_compression = self.sd.unet.config.temporal_compression_ratio
|
||||
|
||||
bad_count = 0
|
||||
|
|
|
|||
Loading…
Reference in New Issue