fix:svdLoader error when the positive is empty
This commit is contained in:
@@ -39,6 +39,10 @@ Usage:<br>
|
|||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
|
**2024-02-29**
|
||||||
|
|
||||||
|
- Fixed `easy svdLoader` error when the positive or negative is empty
|
||||||
|
|
||||||
**2024-02-28**
|
**2024-02-28**
|
||||||
|
|
||||||
- Fixed the issue that 'easy preSampling' and other similar node, latent could not be generated based on the batch index after passing in
|
- Fixed the issue that 'easy preSampling' and other similar node, latent could not be generated based on the batch index after passing in
|
||||||
|
|||||||
@@ -43,6 +43,10 @@ stage_c 与 stage_b 可以使用[checkpoints](https://huggingface.co/stabilityai
|
|||||||
|
|
||||||
## 更新日志
|
## 更新日志
|
||||||
|
|
||||||
|
**2024-02-29**
|
||||||
|
|
||||||
|
- 修复 `easy svdLoader` 报错
|
||||||
|
|
||||||
**2024-02-28**
|
**2024-02-28**
|
||||||
|
|
||||||
- 修复`easy preSampling`等 latent传入后无法根据批次索引生成的问题
|
- 修复`easy preSampling`等 latent传入后无法根据批次索引生成的问题
|
||||||
|
|||||||
+2
-2
@@ -1254,13 +1254,13 @@ class svdLoader:
|
|||||||
negative = [[torch.zeros_like(pooled),
|
negative = [[torch.zeros_like(pooled),
|
||||||
{"motion_bucket_id": motion_bucket_id, "fps": fps, "augmentation_level": augmentation_level,
|
{"motion_bucket_id": motion_bucket_id, "fps": fps, "augmentation_level": augmentation_level,
|
||||||
"concat_latent_image": torch.zeros_like(t)}]]
|
"concat_latent_image": torch.zeros_like(t)}]]
|
||||||
if optional_positive is not None:
|
if optional_positive is not None and optional_positive != '':
|
||||||
if clip_name == 'None':
|
if clip_name == 'None':
|
||||||
raise Exception("You need choose a open_clip model when positive is not empty")
|
raise Exception("You need choose a open_clip model when positive is not empty")
|
||||||
clip = easyCache.load_clip(clip_name)
|
clip = easyCache.load_clip(clip_name)
|
||||||
positive_embeddings_final, = CLIPTextEncode().encode(clip, optional_positive)
|
positive_embeddings_final, = CLIPTextEncode().encode(clip, optional_positive)
|
||||||
positive, = ConditioningConcat().concat(positive, positive_embeddings_final)
|
positive, = ConditioningConcat().concat(positive, positive_embeddings_final)
|
||||||
if optional_negative is not None:
|
if optional_negative is not None and optional_negative != '':
|
||||||
if clip_name == 'None':
|
if clip_name == 'None':
|
||||||
raise Exception("You need choose a open_clip model when negative is not empty")
|
raise Exception("You need choose a open_clip model when negative is not empty")
|
||||||
negative_embeddings_final, = CLIPTextEncode().encode(clip, optional_negative)
|
negative_embeddings_final, = CLIPTextEncode().encode(clip, optional_negative)
|
||||||
|
|||||||
+1
-1
@@ -174,7 +174,7 @@ class easyLoader:
|
|||||||
cache_name = ckpt_name + "_" + config_name
|
cache_name = ckpt_name + "_" + config_name
|
||||||
if cache_name in self.loaded_objects["ckpt"]:
|
if cache_name in self.loaded_objects["ckpt"]:
|
||||||
clip_vision = self.loaded_objects["clip_vision"][cache_name][0] if load_vision else None
|
clip_vision = self.loaded_objects["clip_vision"][cache_name][0] if load_vision else None
|
||||||
clip = self.loaded_objects["clip"][cache_name][0]
|
clip = self.loaded_objects["clip"][cache_name][0] if not load_vision else None
|
||||||
return self.loaded_objects["ckpt"][cache_name][0], clip, self.loaded_objects["bvae"][cache_name][0], clip_vision
|
return self.loaded_objects["ckpt"][cache_name][0], clip, self.loaded_objects["bvae"][cache_name][0], clip_vision
|
||||||
|
|
||||||
ckpt_path = folder_paths.get_full_path("checkpoints", ckpt_name)
|
ckpt_path = folder_paths.get_full_path("checkpoints", ckpt_name)
|
||||||
|
|||||||
Reference in New Issue
Block a user