stuff
This commit is contained in:
parent
bcf466c472
commit
ce67604926
@ -222,6 +222,7 @@ create_native_run_endpoint = None
|
|||||||
status_endpoint = None
|
status_endpoint = None
|
||||||
file_upload_endpoint = None
|
file_upload_endpoint = None
|
||||||
|
|
||||||
|
|
||||||
def clear_current_prompt(sid):
|
def clear_current_prompt(sid):
|
||||||
prompt_server = server.PromptServer.instance
|
prompt_server = server.PromptServer.instance
|
||||||
to_delete = list(
|
to_delete = list(
|
||||||
@ -422,7 +423,6 @@ def send_prompt(sid: str, inputs: StreamingPrompt):
|
|||||||
logger.info(f"error: {error_type}, {e}")
|
logger.info(f"error: {error_type}, {e}")
|
||||||
logger.info(f"stack trace: {stack_trace_short}")
|
logger.info(f"stack trace: {stack_trace_short}")
|
||||||
|
|
||||||
|
|
||||||
# # Add custom logic here
|
# # Add custom logic here
|
||||||
# if 'prompt_id' in response:
|
# if 'prompt_id' in response:
|
||||||
# prompt_id = response['prompt_id']
|
# prompt_id = response['prompt_id']
|
||||||
@ -433,8 +433,6 @@ def send_prompt(sid: str, inputs: StreamingPrompt):
|
|||||||
# response['status_endpoint'] = metadata.status_endpoint
|
# response['status_endpoint'] = metadata.status_endpoint
|
||||||
# response['file_upload_endpoint'] = metadata.file_upload_endpoint
|
# response['file_upload_endpoint'] = metadata.file_upload_endpoint
|
||||||
|
|
||||||
return response
|
|
||||||
|
|
||||||
|
|
||||||
@server.PromptServer.instance.routes.post("/comfyui-deploy/run")
|
@server.PromptServer.instance.routes.post("/comfyui-deploy/run")
|
||||||
async def comfy_deploy_run(request):
|
async def comfy_deploy_run(request):
|
||||||
@ -448,10 +446,14 @@ async def comfy_deploy_run(request):
|
|||||||
pprint(data)
|
pprint(data)
|
||||||
# headers = request.headers.copy()
|
# headers = request.headers.copy()
|
||||||
# headers['Content-Type'] = 'application/json'
|
# headers['Content-Type'] = 'application/json'
|
||||||
async with session.post(data.get("native_run_api_endpoint"), json=data, headers={
|
async with session.post(
|
||||||
'Content-Type': 'application/json',
|
data.get("native_run_api_endpoint"),
|
||||||
'Authorization': request.headers.get('Authorization')
|
json=data,
|
||||||
}) as response:
|
headers={
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
"Authorization": request.headers.get("Authorization"),
|
||||||
|
},
|
||||||
|
) as response:
|
||||||
data = await response.json()
|
data = await response.json()
|
||||||
print(data)
|
print(data)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user