mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-04 05:27:04 +08:00
Make safety = 2 and input image is optional.
This commit is contained in:
parent
e14314f97f
commit
2102896165
@ -114,8 +114,8 @@ class BFLFluxKontextProGenerateRequest(BaseModel):
|
|||||||
seed: Optional[int] = Field(None, description='The seed value for reproducibility.')
|
seed: Optional[int] = Field(None, description='The seed value for reproducibility.')
|
||||||
guidance: confloat(ge=0.1, le=99.0) = Field(..., description='Guidance strength for the image generation process')
|
guidance: confloat(ge=0.1, le=99.0) = Field(..., description='Guidance strength for the image generation process')
|
||||||
steps: conint(ge=1, le=150) = Field(..., description='Number of steps for the image generation process')
|
steps: conint(ge=1, le=150) = Field(..., description='Number of steps for the image generation process')
|
||||||
safety_tolerance: Optional[conint(ge=0, le=6)] = Field(
|
safety_tolerance: Optional[conint(ge=0, le=2)] = Field(
|
||||||
6, description='Tolerance level for input and output moderation. Between 0 and 6, 0 being most strict, 6 being least strict. Defaults to 2.'
|
2, description='Tolerance level for input and output moderation. Between 0 and 2, 0 being most strict, 6 being least strict. Defaults to 2.'
|
||||||
)
|
)
|
||||||
output_format: Optional[BFLOutputFormat] = Field(
|
output_format: Optional[BFLOutputFormat] = Field(
|
||||||
BFLOutputFormat.png, description="Output format for the generated image. Can be 'jpeg' or 'png'.", examples=['png']
|
BFLOutputFormat.png, description="Output format for the generated image. Can be 'jpeg' or 'png'.", examples=['png']
|
||||||
|
|||||||
@ -284,7 +284,6 @@ class FluxKontextProImageNode(ComfyNodeABC):
|
|||||||
def INPUT_TYPES(s):
|
def INPUT_TYPES(s):
|
||||||
return {
|
return {
|
||||||
"required": {
|
"required": {
|
||||||
"input_image": (IO.IMAGE,),
|
|
||||||
"prompt": (
|
"prompt": (
|
||||||
IO.STRING,
|
IO.STRING,
|
||||||
{
|
{
|
||||||
@ -329,15 +328,6 @@ class FluxKontextProImageNode(ComfyNodeABC):
|
|||||||
"tooltip": "The random seed used for creating the noise.",
|
"tooltip": "The random seed used for creating the noise.",
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
"safety_tolerance": (
|
|
||||||
IO.INT,
|
|
||||||
{
|
|
||||||
"default": 2,
|
|
||||||
"min": 0,
|
|
||||||
"max": 2,
|
|
||||||
"tooltip": "Safety tolerance for the image generation process",
|
|
||||||
},
|
|
||||||
),
|
|
||||||
"prompt_upsampling": (
|
"prompt_upsampling": (
|
||||||
IO.BOOLEAN,
|
IO.BOOLEAN,
|
||||||
{
|
{
|
||||||
@ -347,6 +337,7 @@ class FluxKontextProImageNode(ComfyNodeABC):
|
|||||||
),
|
),
|
||||||
},
|
},
|
||||||
"optional": {
|
"optional": {
|
||||||
|
"input_image": (IO.IMAGE,),
|
||||||
},
|
},
|
||||||
"hidden": {
|
"hidden": {
|
||||||
"auth_token": "AUTH_TOKEN_COMFY_ORG",
|
"auth_token": "AUTH_TOKEN_COMFY_ORG",
|
||||||
@ -384,7 +375,6 @@ class FluxKontextProImageNode(ComfyNodeABC):
|
|||||||
input_image: torch.Tensor=None,
|
input_image: torch.Tensor=None,
|
||||||
seed=0,
|
seed=0,
|
||||||
prompt_upsampling=False,
|
prompt_upsampling=False,
|
||||||
safety_tolerance=2,
|
|
||||||
unique_id: Union[str, None] = None,
|
unique_id: Union[str, None] = None,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
):
|
):
|
||||||
@ -414,8 +404,7 @@ class FluxKontextProImageNode(ComfyNodeABC):
|
|||||||
input_image
|
input_image
|
||||||
if input_image is None
|
if input_image is None
|
||||||
else convert_image_to_base64(input_image)
|
else convert_image_to_base64(input_image)
|
||||||
),
|
)
|
||||||
safety_tolerance=safety_tolerance,
|
|
||||||
),
|
),
|
||||||
auth_kwargs=kwargs,
|
auth_kwargs=kwargs,
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user