mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-01 22:09:55 +00:00
Ignore missing dialog (#743)
* Do not report missing nodes/models warning repeatedly * Add playwright tests * cast finalOptions, add comments to interface * Use old menu in tests to not break top left click methods * Assert no dialog on undo and on redo separately * nit * nit --------- Co-authored-by: christian-byrne <abolkonsky.rem@gmail.com>
This commit is contained in:
@@ -2206,7 +2206,8 @@ export class ComfyApp {
|
||||
graphData?: ComfyWorkflowJSON,
|
||||
clean: boolean = true,
|
||||
restore_view: boolean = true,
|
||||
workflow: string | null | ComfyWorkflow = null
|
||||
workflow: string | null | ComfyWorkflow = null,
|
||||
{ showMissingNodesDialog = true, showMissingModelsDialog = true } = {}
|
||||
) {
|
||||
if (clean !== false) {
|
||||
this.clean()
|
||||
@@ -2398,10 +2399,10 @@ export class ComfyApp {
|
||||
}
|
||||
|
||||
// TODO: Properly handle if both nodes and models are missing (sequential dialogs?)
|
||||
if (missingNodeTypes.length) {
|
||||
if (missingNodeTypes.length && showMissingNodesDialog) {
|
||||
this.showMissingNodesError(missingNodeTypes)
|
||||
}
|
||||
if (missingModels.length) {
|
||||
if (missingModels.length && showMissingModelsDialog) {
|
||||
this.showMissingModelsError(missingModels)
|
||||
}
|
||||
await this.#invokeExtensionsAsync('afterConfigureGraph', missingNodeTypes)
|
||||
|
||||
@@ -72,7 +72,10 @@ export class ChangeTracker {
|
||||
if (prevState) {
|
||||
target.push(this.activeState)
|
||||
this.isOurLoad = true
|
||||
await this.app.loadGraphData(prevState, false, false, this.workflow)
|
||||
await this.app.loadGraphData(prevState, false, false, this.workflow, {
|
||||
showMissingModelsDialog: false,
|
||||
showMissingNodesDialog: false
|
||||
})
|
||||
this.activeState = prevState
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,7 +305,11 @@ export class ComfyWorkflow {
|
||||
this.changeTracker.activeState,
|
||||
true,
|
||||
true,
|
||||
this
|
||||
this,
|
||||
{
|
||||
showMissingModelsDialog: false,
|
||||
showMissingNodesDialog: false
|
||||
}
|
||||
)
|
||||
} else {
|
||||
const data = await this.getWorkflowData()
|
||||
|
||||
Reference in New Issue
Block a user