mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-08-28 04:12:14 +08:00
use auth_kwargs instead of auth_token/comfy_api_key
This commit is contained in:
parent
01812db5b1
commit
5009776980
@ -333,6 +333,10 @@ class IdeogramV1(comfy_io.ComfyNode):
|
|||||||
aspect_ratio = V1_V2_RATIO_MAP.get(aspect_ratio, None)
|
aspect_ratio = V1_V2_RATIO_MAP.get(aspect_ratio, None)
|
||||||
model = "V_1_TURBO" if turbo else "V_1"
|
model = "V_1_TURBO" if turbo else "V_1"
|
||||||
|
|
||||||
|
auth = {
|
||||||
|
"auth_token": cls.hidden.auth_token_comfy_org,
|
||||||
|
"comfy_api_key": cls.hidden.api_key_comfy_org,
|
||||||
|
}
|
||||||
operation = SynchronousOperation(
|
operation = SynchronousOperation(
|
||||||
endpoint=ApiEndpoint(
|
endpoint=ApiEndpoint(
|
||||||
path="/proxy/ideogram/generate",
|
path="/proxy/ideogram/generate",
|
||||||
@ -353,8 +357,7 @@ class IdeogramV1(comfy_io.ComfyNode):
|
|||||||
negative_prompt=negative_prompt if negative_prompt else None,
|
negative_prompt=negative_prompt if negative_prompt else None,
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
auth_token=cls.hidden.auth_token_comfy_org,
|
auth_kwargs=auth,
|
||||||
comfy_api_key=cls.hidden.api_key_comfy_org,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
response = await operation.execute()
|
response = await operation.execute()
|
||||||
@ -495,6 +498,10 @@ class IdeogramV2(comfy_io.ComfyNode):
|
|||||||
else:
|
else:
|
||||||
final_aspect_ratio = aspect_ratio if aspect_ratio != "ASPECT_1_1" else None
|
final_aspect_ratio = aspect_ratio if aspect_ratio != "ASPECT_1_1" else None
|
||||||
|
|
||||||
|
auth = {
|
||||||
|
"auth_token": cls.hidden.auth_token_comfy_org,
|
||||||
|
"comfy_api_key": cls.hidden.api_key_comfy_org,
|
||||||
|
}
|
||||||
operation = SynchronousOperation(
|
operation = SynchronousOperation(
|
||||||
endpoint=ApiEndpoint(
|
endpoint=ApiEndpoint(
|
||||||
path="/proxy/ideogram/generate",
|
path="/proxy/ideogram/generate",
|
||||||
@ -518,8 +525,7 @@ class IdeogramV2(comfy_io.ComfyNode):
|
|||||||
color_palette=color_palette if color_palette else None,
|
color_palette=color_palette if color_palette else None,
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
auth_token=cls.hidden.auth_token_comfy_org,
|
auth_kwargs=auth,
|
||||||
comfy_api_key=cls.hidden.api_key_comfy_org,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
response = await operation.execute()
|
response = await operation.execute()
|
||||||
@ -635,6 +641,10 @@ class IdeogramV3(comfy_io.ComfyNode):
|
|||||||
num_images=1,
|
num_images=1,
|
||||||
rendering_speed="BALANCED",
|
rendering_speed="BALANCED",
|
||||||
):
|
):
|
||||||
|
auth = {
|
||||||
|
"auth_token": cls.hidden.auth_token_comfy_org,
|
||||||
|
"comfy_api_key": cls.hidden.api_key_comfy_org,
|
||||||
|
}
|
||||||
# Check if both image and mask are provided for editing mode
|
# Check if both image and mask are provided for editing mode
|
||||||
if image is not None and mask is not None:
|
if image is not None and mask is not None:
|
||||||
# Edit mode
|
# Edit mode
|
||||||
@ -697,8 +707,7 @@ class IdeogramV3(comfy_io.ComfyNode):
|
|||||||
"mask": mask_binary,
|
"mask": mask_binary,
|
||||||
},
|
},
|
||||||
content_type="multipart/form-data",
|
content_type="multipart/form-data",
|
||||||
auth_token=cls.hidden.auth_token_comfy_org,
|
auth_kwargs=auth,
|
||||||
comfy_api_key=cls.hidden.api_key_comfy_org,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
elif image is not None or mask is not None:
|
elif image is not None or mask is not None:
|
||||||
@ -739,8 +748,7 @@ class IdeogramV3(comfy_io.ComfyNode):
|
|||||||
response_model=IdeogramGenerateResponse,
|
response_model=IdeogramGenerateResponse,
|
||||||
),
|
),
|
||||||
request=gen_request,
|
request=gen_request,
|
||||||
auth_token=cls.hidden.auth_token_comfy_org,
|
auth_kwargs=auth,
|
||||||
comfy_api_key=cls.hidden.api_key_comfy_org,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Execute the operation and process response
|
# Execute the operation and process response
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user