* Bump version.
* PromptPostProcessorSelectVariableComfyUINode: exceptions on invalid values.
This commit is contained in:
+8
-8
@@ -1,3 +1,6 @@
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit("This script must be run from ComfyUI")
|
||||
|
||||
import logging
|
||||
import os
|
||||
from pathlib import Path
|
||||
@@ -14,9 +17,6 @@ from ppp_utils import escape_single_quotes
|
||||
from ppp_wildcards import PPPWildcards
|
||||
from ppp_enmappings import PPPExtraNetworkMappings
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit("This script must be run from ComfyUI")
|
||||
|
||||
|
||||
def _resolve_wildcards_folders(override: str = "") -> list[Path]:
|
||||
"""Return the resolved list of wildcard folder paths."""
|
||||
@@ -849,13 +849,13 @@ class PromptPostProcessorSelectVariableComfyUINode:
|
||||
variables: dict[str, Any],
|
||||
name: str,
|
||||
):
|
||||
value = ""
|
||||
if variables:
|
||||
if name == "":
|
||||
value = "\n".join(f"{k}: {v}" for k, v in variables.items())
|
||||
elif name in variables:
|
||||
value = variables[name]
|
||||
return (value,)
|
||||
return ("\n".join(f"{k}: {v}" for k, v in variables.items()),)
|
||||
if name in variables:
|
||||
return (variables[name],)
|
||||
raise ValueError(f"Variable '{name}' not found in the input variables")
|
||||
raise ValueError("No variables provided to select from")
|
||||
|
||||
|
||||
class PromptPostProcessorWildcardConcatComfyUINode:
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "sd-webui-prompt-postprocessor"
|
||||
description = "Stable Diffusion WebUI & ComfyUI extension to post-process the prompt. Features include: wildcards, sending content from the prompt to the negative prompt, variables, model detection, extranetwork mapping, cleanup."
|
||||
version = "3.1.0"
|
||||
version = "3.2.0"
|
||||
license = { file = "LICENSE.txt" }
|
||||
dependencies = ["lark", "numpy", "pyyaml", "pydantic"]
|
||||
requires-python = ">=3.10"
|
||||
|
||||
@@ -15,6 +15,7 @@ from modules.processing import StableDiffusionProcessing # type: ignore
|
||||
from modules.shared import opts # type: ignore
|
||||
from modules.paths import models_path # type: ignore
|
||||
import gradio as gr # type: ignore
|
||||
|
||||
from ppp import PromptPostProcessor
|
||||
from ppp_classes import IFWILDCARDS_CHOICES, ONWARNING_CHOICES, SUPPORTED_APPS, SUPPORTED_APPS_NAMES, PPPStateOptions
|
||||
from ppp_logging import DEBUG_LEVEL, PromptPostProcessorLogFactory, log
|
||||
|
||||
Reference in New Issue
Block a user