Merge branch 'master' of github.com:comfyanonymous/ComfyUI

This commit is contained in:
doctorpangloss
2025-09-03 12:04:32 -07:00
34 changed files with 2336 additions and 865 deletions
+2
View File
@@ -24,6 +24,8 @@ os.environ["BITSANDBYTES_NOWELCOME"] = "1"
os.environ["NO_ALBUMENTATIONS_UPDATE"] = "1"
os.environ['HF_HUB_DISABLE_TELEMETRY'] = '1'
os.environ['DO_NOT_TRACK'] = '1'
if os.name == "nt":
os.environ['MIMALLOC_PURGE_DELAY'] = '0'
this_logger = logging.getLogger(__name__)
+28 -1
View File
@@ -769,7 +769,34 @@ class PromptServer(ExecutorToClientProgress):
@routes.post("/interrupt")
async def post_interrupt(request):
interruption.interrupt_current_processing()
try:
json_data = await request.json()
except json.JSONDecodeError:
json_data = {}
# Check if a specific prompt_id was provided for targeted interruption
prompt_id = json_data.get('prompt_id')
if prompt_id:
currently_running, _ = self.prompt_queue.get_current_queue()
# Check if the prompt_id matches any currently running prompt
should_interrupt = False
for item in currently_running:
# item structure: (number, prompt_id, prompt, extra_data, outputs_to_execute)
if item[1] == prompt_id:
logger.debug(f"Interrupting prompt {prompt_id}")
should_interrupt = True
break
if should_interrupt:
interruption.interrupt_current_processing()
else:
logger.debug(f"Prompt {prompt_id} is not currently running, skipping interrupt")
else:
# No prompt_id provided, do a global interrupt
logger.debug("Global interrupt (no prompt_id specified)")
interruption.interrupt_current_processing()
return web.Response(status=200)
@routes.post("/free")