Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ✨ live update outputs sidebar #229

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

christian-byrne
Copy link
Contributor

Hi Mel, what do you think of something like this? This makes the grid live-update while in output mode.

The code in this PR adds a listener for the 'status' event. In the callback, it fetches the most recent history item and prepends any new outputs to the grid. This is the same implementation as ComfyUI_frontend queue except less demanding since we only need to process 1 history item (most recent) at a time.

mtb-grid-live-update.mp4

The types were converted from apiTypes.ts by ChatGPT.

@melMass melMass added the WTD using this tag requests an AI Summary of the PR label Jan 14, 2025
Copy link

what-the-diff bot commented Jan 14, 2025

PR Summary

  • New Data Structures for Task related data:

    • We've added a set of new 'typedef' structures to model different types of data related to tasks and their outputs, such as ResultItem, Outputs, TaskOutput, TaskPrompt, HistoryTaskItem, ExecInfo, and StatusWsMessageStatus.
    • Adding these structures helps to organize and handle the data more effectively.
  • Improvements to the Sidebar Input/Output section:

    • Our sidebar where users can see input and output data has been updated to use these new structures.
    • New features include functions to convert task results into web links and process data from past tasks.
    • We've also improved how we handle the display of different types of data like audio, images, and animation, including ensuring that we don't duplicate previous prompts by accident.
    • We've added a new function called updateOutputsGrid which fetches and displays new image-based outputs based on past activity.
    • When loading images from web links, the getImgsFromUrls function, has more flexibility, allowing it to adjust how it adds images based on certain options.
    • Lastly, a new feature enables periodic updating of the output grid in response to changes in status, providing users with real-time updates.

@christian-byrne
Copy link
Contributor Author

PR Summary

  • New Data Structures for Task related data:

    • We've added a set of new 'typedef' structures to model different types of data related to tasks and their outputs, such as ResultItem, Outputs, TaskOutput, TaskPrompt, HistoryTaskItem, ExecInfo, and StatusWsMessageStatus.

This bot is awesome 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WTD using this tag requests an AI Summary of the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants