mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-07-08 00:07:09 +08:00
don't validate string inputs with VALIDATE_INPUTS (#8508)
This commit is contained in:
parent
baa8c8cdd3
commit
c6529c0d77
@ -346,20 +346,6 @@ class FluxKontextProImageNode(ComfyNodeABC):
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def VALIDATE_INPUTS(cls, aspect_ratio: str):
|
|
||||||
try:
|
|
||||||
validate_aspect_ratio(
|
|
||||||
aspect_ratio,
|
|
||||||
minimum_ratio=cls.MINIMUM_RATIO,
|
|
||||||
maximum_ratio=cls.MAXIMUM_RATIO,
|
|
||||||
minimum_ratio_str=cls.MINIMUM_RATIO_STR,
|
|
||||||
maximum_ratio_str=cls.MAXIMUM_RATIO_STR,
|
|
||||||
)
|
|
||||||
except Exception as e:
|
|
||||||
return str(e)
|
|
||||||
return True
|
|
||||||
|
|
||||||
RETURN_TYPES = (IO.IMAGE,)
|
RETURN_TYPES = (IO.IMAGE,)
|
||||||
DESCRIPTION = cleandoc(__doc__ or "") # Handle potential None value
|
DESCRIPTION = cleandoc(__doc__ or "") # Handle potential None value
|
||||||
FUNCTION = "api_call"
|
FUNCTION = "api_call"
|
||||||
@ -380,6 +366,13 @@ class FluxKontextProImageNode(ComfyNodeABC):
|
|||||||
unique_id: Union[str, None] = None,
|
unique_id: Union[str, None] = None,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
):
|
):
|
||||||
|
aspect_ratio = validate_aspect_ratio(
|
||||||
|
aspect_ratio,
|
||||||
|
minimum_ratio=self.MINIMUM_RATIO,
|
||||||
|
maximum_ratio=self.MAXIMUM_RATIO,
|
||||||
|
minimum_ratio_str=self.MINIMUM_RATIO_STR,
|
||||||
|
maximum_ratio_str=self.MAXIMUM_RATIO_STR,
|
||||||
|
)
|
||||||
if input_image is None:
|
if input_image is None:
|
||||||
validate_string(prompt, strip_whitespace=False)
|
validate_string(prompt, strip_whitespace=False)
|
||||||
operation = SynchronousOperation(
|
operation = SynchronousOperation(
|
||||||
@ -395,13 +388,7 @@ class FluxKontextProImageNode(ComfyNodeABC):
|
|||||||
guidance=round(guidance, 1),
|
guidance=round(guidance, 1),
|
||||||
steps=steps,
|
steps=steps,
|
||||||
seed=seed,
|
seed=seed,
|
||||||
aspect_ratio=validate_aspect_ratio(
|
aspect_ratio=aspect_ratio,
|
||||||
aspect_ratio,
|
|
||||||
minimum_ratio=self.MINIMUM_RATIO,
|
|
||||||
maximum_ratio=self.MAXIMUM_RATIO,
|
|
||||||
minimum_ratio_str=self.MINIMUM_RATIO_STR,
|
|
||||||
maximum_ratio_str=self.MAXIMUM_RATIO_STR,
|
|
||||||
),
|
|
||||||
input_image=(
|
input_image=(
|
||||||
input_image
|
input_image
|
||||||
if input_image is None
|
if input_image is None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user