Add tutorial workflow function for new desktop users (#2315)

Co-authored-by: huchenlei <huchenlei@proton.me>
This commit is contained in:
bymyself
2025-01-25 10:23:27 -07:00
committed by GitHub
parent e971ba31e0
commit e992bd6571
5 changed files with 44 additions and 2 deletions

View File

@@ -1061,7 +1061,18 @@ export class ComfyApp {
// We failed to restore a workflow so load the default
if (!restored) {
await this.loadGraphData()
const settingStore = useSettingStore()
// If tutorial is not completed, load the tutorial workflow
if (!settingStore.get('Comfy.TutorialCompleted')) {
await settingStore.set('Comfy.TutorialCompleted', true)
// Load model folders to ensure the missing models' corresponding folders
// can be correctly identified.
await useModelStore().loadModelFolders()
await useWorkflowService().loadTutorialWorkflow()
} else {
await this.loadGraphData()
}
}
this.#addDrawNodeHandler()