Add a Workflows page that manages ComfyUI workflow JSON files as a first-class library alongside loras/checkpoints/embeddings: - opt-in via the new 'Workflow Management' settings toggle (default off) - dedicated workflow folder roots with sidecar/preview support, separate from ComfyUI's own workflow storage; 'Send to ComfyUI' loads a workflow straight into the graph - workflow scanner parses the graph document (UI/API format sniffing, node classes, model/civitai refs) and persists the analysis in the SQLite model cache - settings UI: workflow folder paths editor in the Library tab and the standalone Model Paths page Fixes from sandbox E2E verification: - include the workflow scanner in startup initialization so the page no longer hangs on 'initializing' when enabled without folders - add the missing workflows entry to the frontend page-state map (page init crashed and the sidebar fell back to the loras tree without it) - project workflow analysis fields through the scanner cache entry and persist them in the model cache (new columns with auto-migration) - keep symlinked paths intact in the directory picker (abspath instead of resolve), so stored library paths match what the user sees on disk Also rebuilds the vue-widgets bundle to sync it with web/comfyui/utils.js.
33 lines
1.3 KiB
JavaScript
33 lines
1.3 KiB
JavaScript
// Controls components index file
|
|
import { PageControls } from './PageControls.js';
|
|
import { LorasControls } from './LorasControls.js';
|
|
import { CheckpointsControls } from './CheckpointsControls.js';
|
|
import { EmbeddingsControls } from './EmbeddingsControls.js';
|
|
import { OtherControls } from './OtherControls.js';
|
|
import { WorkflowControls } from './WorkflowControls.js';
|
|
|
|
// Export the classes
|
|
export { PageControls, LorasControls, CheckpointsControls, EmbeddingsControls, OtherControls, WorkflowControls };
|
|
|
|
/**
|
|
* Factory function to create the appropriate controls based on page type
|
|
* @param {string} pageType - The type of page ('loras', 'checkpoints', 'embeddings', 'other', or 'workflows')
|
|
* @returns {PageControls} - The appropriate controls instance
|
|
*/
|
|
export function createPageControls(pageType) {
|
|
if (pageType === 'loras') {
|
|
return new LorasControls();
|
|
} else if (pageType === 'checkpoints') {
|
|
return new CheckpointsControls();
|
|
} else if (pageType === 'embeddings') {
|
|
return new EmbeddingsControls();
|
|
} else if (pageType === 'other') {
|
|
return new OtherControls();
|
|
} else if (pageType === 'workflows') {
|
|
return new WorkflowControls();
|
|
} else {
|
|
console.error(`Unknown page type: ${pageType}`);
|
|
return null;
|
|
}
|
|
}
|