Add files via upload

This commit is contained in:
yunxiang wei
2024-07-17 23:52:13 +08:00
committed by GitHub
parent 234d7dc861
commit 40b7d2bae4
2 changed files with 6 additions and 2 deletions
+3
View File
@@ -63,6 +63,9 @@ class SD3LongCaptioner:
# 解码生成的文本
decoded = self.processor.decode(generation[0], skip_special_tokens=True)
# 移除开头的提示词(如果存在)
decoded = decoded.replace(prompt, "", 1).strip()
return (decoded,)
NODE_CLASS_MAPPINGS = {
+3 -2
View File
@@ -11,8 +11,6 @@ from huggingface_hub import snapshot_download
files_for_sd3_long_captioner_v2 = Path(os.path.join(folder_paths.models_dir, "LLavacheckpoints", "files_for_sd3_long_captioner_v2"))
files_for_sd3_long_captioner_v2.mkdir(parents=True, exist_ok=True)
# ... 其余代码 ...
class SD3LongCaptionerV2:
def __init__(self):
self.model_id = "gokaygokay/sd3-long-captioner-v2"
@@ -65,6 +63,9 @@ class SD3LongCaptionerV2:
# 解码生成的文本
decoded = self.processor.decode(generation[0], skip_special_tokens=True)
# 移除开头的提示词(如果存在)
decoded = decoded.replace(prompt, "", 1).strip()
return (decoded,)
NODE_CLASS_MAPPINGS = {