mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-11 14:50:49 +08:00
fix history
This commit is contained in:
parent
625134b6a1
commit
497c01fed1
@ -5,6 +5,7 @@ import copy
|
||||
import datetime
|
||||
import heapq
|
||||
import threading
|
||||
import time
|
||||
import traceback
|
||||
import typing
|
||||
from dataclasses import dataclass
|
||||
@ -46,7 +47,7 @@ def get_good_outputs(t: QueueTuple):
|
||||
class HistoryEntry(typing.TypedDict):
|
||||
prompt: QueueTuple
|
||||
outputs: dict
|
||||
timestamp: float
|
||||
timestamp: int
|
||||
|
||||
|
||||
@dataclass
|
||||
@ -780,7 +781,7 @@ class PromptQueue:
|
||||
with self.mutex:
|
||||
queue_item = self.currently_running.pop(item_id)
|
||||
prompt = queue_item.queue_tuple
|
||||
self.history[prompt[1]] = {"prompt": prompt, "outputs": {}, "timestamp": datetime.datetime.timestamp()}
|
||||
self.history[prompt[1]] = {"prompt": prompt, "outputs": {}, "timestamp": time.time()}
|
||||
for o in outputs:
|
||||
self.history[prompt[1]]["outputs"][o] = outputs[o]
|
||||
self.server.queue_updated()
|
||||
|
||||
@ -726,11 +726,14 @@ class PromptServer():
|
||||
site = web.TCPSite(runner, address, port)
|
||||
await site.start()
|
||||
|
||||
if address == '':
|
||||
address_to_print = 'localhost'
|
||||
if address == '' or address == '0.0.0.0':
|
||||
address = '0.0.0.0'
|
||||
else:
|
||||
address_to_print = address
|
||||
if verbose:
|
||||
print("Starting server\n")
|
||||
print("To see the GUI go to: http://{}:{}".format(address, port))
|
||||
print("To see the GUI go to: http://{}:{}".format(address_to_print, port))
|
||||
if call_on_start is not None:
|
||||
call_on_start(address, port)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user