Archived
16 lines
497 B
Python
16 lines
497 B
Python
from server import PromptServer
|
|
from .progress import add_progress_hook
|
|
from .routes import SetupRoutes
|
|
from .workflows import *
|
|
|
|
# Your custom progress callback
|
|
def my_progress_callback(value, total, preview_image, prompt_id, node_id):
|
|
print(f"Progress: {value}/{total}, Prompt: {prompt_id}, Node: {node_id}, Preview: {preview_image}")
|
|
|
|
add_progress_hook(my_progress_callback)
|
|
|
|
# Register API routes
|
|
SetupRoutes(PromptServer.instance)
|
|
|
|
NODE_CLASS_MAPPINGS = {}
|
|
NODE_DISPLAY_NAME_MAPPINGS = {} |