-
Notifications
You must be signed in to change notification settings - Fork 107
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
Model downloader dialog #569
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can probably merge this now without fixing those API level limitations such as interrupt the download, as currently we only plan to add model info for example workflows.
BTW currently loading the default workflow does give me a warning for the default SD1.5 checkpoint download which can be annoying. We need to find a good way to let people bypass that.
Also it would be nice to add a setting for users to disable this warning dialog. We got a similar request for disabling missing nodes dialog in #446
@@ -2360,9 +2389,13 @@ export class ComfyApp { | |||
this.#invokeExtensions('loadedGraphNode', node) | |||
} | |||
|
|||
// TODO: Properly handle if both nodes and models are missing (sequential dialogs?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on currently dialog implementation, if both model and nodes are missing, the missing model dialog content will replace the missing node dialog content.
I think we should only fire a single show warning dialog call here and make the dialog content show both missing node warnings and missing model warnings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the main PR description I wrote:
Does not yet handle the case of both models and nodes are missing properly
handling this well might need coordinating with Comfy Manager and/or merging Manager in? Since I imagine manager overrides this whole dialog and all anyway.
I'm hesitant to merge the dialogs right away due to the increased potential conflict, unless you know confidently that the existing dialog can be mucked up without it being an issue
<div class="model-info"> | ||
<div class="model-details"> | ||
<span class="model-type">{{ slotProps.option.label }}</span> | ||
<span v-if="slotProps.option.hint" class="model-hint">{{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the hint URL can be a tooltip instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
applied as a basic title
, not sure if there's a better tooltip component to use
</div> | ||
<div v-if="slotProps.option.error" class="model-error">{{ slotProps.option.error }}</div> | ||
</div> | ||
<div class="model-action"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this model download action button can be its own component.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely clear on what you mean by that
I didn't realize the default workflow had a models value slipped into it already. That explains the tests failing. ... We should really swap that at the very least to a safetensors file btw. It is very silly that it still has a ckpt there |
Just a reminder. All playwright test screenshot expectations will need update if we update the default checkpoint file name 🤣 |
to avoid missing model dialog causing issues. Also because ckpt autodownloading shouldn't be allowed
Added setting by copypasta of your code for the other setting - I note it doesn't seem to be enabled until i toggled it off and back on? something might be wrong there also removed the models entry from the default workflow both (A) to fix that issue for now and (B) because a ckpt file listed there won't be valid at any point in the foreseeable future anyway |
Thanks for pointing that out. I think that is due to how default is handled in the |
ie avoid redundant calcs when setting is disabled anyway
Status
Functional MVP - lot of fundamental work and improvements still-to-do, but all the basic functionality is there.
Could be merged as-is and have followup PRs for further work, or can treat as draft and fix some of the UI-level limitations listed below before merging, let me know what you prefer @huchenlei
About
Adds a "Model Downloader" dialog when you import a workflow json that has models listed, to autodownload models from trusted sources.
Here's a test workflow json with 4 models URLs: valid sd 1.5 safetensors, and 3 unique error cases:
test-models.json
Overview of how it works
models
in theGraphData
of newly imported workflows (atm only added manually, no automatic storage of these values)MissingModelsWarning
(based onLoadWorkflowWarning
)download_progress
ws event from that PR, and the newstatus
data typeUI-level limitations
beforeConfigureGraph
should probably havemissingModels
added in - I'm hesitant to do this offhand without looking into how that code works, as idk if that'll break anything to just shove a new var thereAPI-level limitations