@@ -2,7 +2,7 @@ import { api } from "../../scripts/api.js";
22import { app } from "../../scripts/app.js" ;
33import { $el } from "../../scripts/ui.js" ;
44
5- const VERSION = "1.7.0 " ;
5+ const VERSION = "1.7.1 " ;
66
77// Common model directories in ComfyUI
88const MODEL_DIRECTORIES = [
@@ -641,6 +641,115 @@ const styles = `
641641.wmd-info-tooltip-value a:hover {
642642 text-decoration: underline;
643643}
644+
645+ .wmd-help-btn {
646+ background: none;
647+ border: none;
648+ color: #888;
649+ font-size: 18px;
650+ cursor: pointer;
651+ padding: 4px 8px;
652+ margin-right: 6px;
653+ width: 28px;
654+ height: 28px;
655+ border-radius: 50%;
656+ display: flex;
657+ align-items: center;
658+ justify-content: center;
659+ }
660+
661+ .wmd-help-btn:hover {
662+ color: #fff;
663+ background-color: #2196F3;
664+ }
665+
666+ .wmd-help-panel {
667+ background-color: #252525;
668+ border: 1px solid #444;
669+ border-radius: 8px;
670+ padding: 20px;
671+ margin-bottom: 20px;
672+ }
673+
674+ .wmd-help-title {
675+ font-size: 16px;
676+ font-weight: bold;
677+ color: #fff;
678+ margin-bottom: 16px;
679+ display: flex;
680+ align-items: center;
681+ gap: 8px;
682+ }
683+
684+ .wmd-help-section {
685+ margin-bottom: 20px;
686+ }
687+
688+ .wmd-help-section:last-child {
689+ margin-bottom: 0;
690+ }
691+
692+ .wmd-help-section-title {
693+ font-size: 14px;
694+ font-weight: bold;
695+ color: #4CAF50;
696+ margin-bottom: 8px;
697+ display: flex;
698+ align-items: center;
699+ gap: 6px;
700+ }
701+
702+ .wmd-help-section-content {
703+ font-size: 13px;
704+ color: #ccc;
705+ line-height: 1.6;
706+ padding-left: 20px;
707+ }
708+
709+ .wmd-help-section-content ol {
710+ margin: 8px 0;
711+ padding-left: 20px;
712+ }
713+
714+ .wmd-help-section-content li {
715+ margin-bottom: 6px;
716+ }
717+
718+ .wmd-help-section-content code {
719+ background-color: #333;
720+ padding: 2px 6px;
721+ border-radius: 4px;
722+ font-family: monospace;
723+ font-size: 12px;
724+ color: #ff9800;
725+ }
726+
727+ .wmd-help-link {
728+ color: #5599ff;
729+ text-decoration: none;
730+ }
731+
732+ .wmd-help-link:hover {
733+ text-decoration: underline;
734+ }
735+
736+ .wmd-help-note {
737+ background-color: #1a3a4a;
738+ border-left: 3px solid #2196F3;
739+ padding: 10px 14px;
740+ margin: 10px 0;
741+ font-size: 12px;
742+ color: #aaa;
743+ }
744+
745+ .wmd-help-warning {
746+ background-color: #4a3a1a;
747+ border-left: 3px solid #ff9800;
748+ padding: 10px 14px;
749+ margin: 10px 0;
750+ font-size: 12px;
751+ color: #ffcc80;
752+ }
644753` ;
645754
646755// Add styles to document
@@ -656,6 +765,7 @@ class WorkflowModelsDownloader {
656765 this . downloads = { } ;
657766 this . progressInterval = null ;
658767 this . showSettings = false ;
768+ this . showHelp = false ;
659769 this . settings = null ;
660770 this . currentFilter = "all" ; // all, existing, ready, unknown
661771 }
@@ -759,6 +869,10 @@ class WorkflowModelsDownloader {
759869 $el ( "option" , { value : "ready" } , [ "Ready For Download" ] ) ,
760870 $el ( "option" , { value : "unknown" } , [ "Missing URLs / Unknown" ] )
761871 ] ) ,
872+ $el ( "button.wmd-help-btn" , {
873+ onclick : ( ) => this . toggleHelp ( ) ,
874+ title : "Help & FAQ"
875+ } , [ "?" ] ) ,
762876 $el ( "button.wmd-settings-btn" , {
763877 onclick : ( ) => this . toggleSettings ( ) ,
764878 title : "Settings"
@@ -1875,6 +1989,12 @@ class WorkflowModelsDownloader {
18751989 const body = document . getElementById ( "wmd-body" ) ;
18761990
18771991 if ( this . showSettings ) {
1992+ // Close help panel if open
1993+ if ( this . showHelp ) {
1994+ this . showHelp = false ;
1995+ const helpPanel = document . getElementById ( "wmd-help-panel" ) ;
1996+ if ( helpPanel ) helpPanel . remove ( ) ;
1997+ }
18781998 // Load current settings
18791999 await this . loadSettings ( ) ;
18802000 // Insert settings panel at the top
@@ -1887,6 +2007,153 @@ class WorkflowModelsDownloader {
18872007 }
18882008 }
18892009
2010+ toggleHelp ( ) {
2011+ this . showHelp = ! this . showHelp ;
2012+ const body = document . getElementById ( "wmd-body" ) ;
2013+
2014+ if ( this . showHelp ) {
2015+ // Close settings panel if open
2016+ if ( this . showSettings ) {
2017+ this . showSettings = false ;
2018+ const settingsPanel = document . getElementById ( "wmd-settings-panel" ) ;
2019+ if ( settingsPanel ) settingsPanel . remove ( ) ;
2020+ }
2021+ // Insert help panel at the top
2022+ const helpPanel = this . createHelpPanel ( ) ;
2023+ body . insertBefore ( helpPanel , body . firstChild ) ;
2024+ } else {
2025+ // Remove help panel
2026+ const panel = document . getElementById ( "wmd-help-panel" ) ;
2027+ if ( panel ) panel . remove ( ) ;
2028+ }
2029+ }
2030+
2031+ createHelpPanel ( ) {
2032+ const panel = document . createElement ( 'div' ) ;
2033+ panel . id = 'wmd-help-panel' ;
2034+ panel . className = 'wmd-help-panel' ;
2035+
2036+ panel . innerHTML = `
2037+ <div class="wmd-help-title">
2038+ <span style="color: #2196F3;">?</span> Help & FAQ
2039+ </div>
2040+
2041+ <div class="wmd-help-section">
2042+ <div class="wmd-help-section-title">
2043+ <span>🔑</span> How to Get a HuggingFace Token
2044+ </div>
2045+ <div class="wmd-help-section-content">
2046+ <ol>
2047+ <li>Go to <a href="https://huggingface.co/settings/tokens" target="_blank" class="wmd-help-link">huggingface.co/settings/tokens</a></li>
2048+ <li>Click "New token" or "Create new token"</li>
2049+ <li>Give it a name (e.g., "ComfyUI") and select "Read" access</li>
2050+ <li>Copy the token and paste it in Settings (gear icon above)</li>
2051+ </ol>
2052+ <div class="wmd-help-note">
2053+ <strong>Note:</strong> HuggingFace tokens are required for gated models like Flux, SD3, etc.
2054+ You must also accept the model's license on its HuggingFace page before downloading.
2055+ </div>
2056+ </div>
2057+ </div>
2058+
2059+ <div class="wmd-help-section">
2060+ <div class="wmd-help-section-title">
2061+ <span>🎨</span> How to Get a CivitAI API Key
2062+ </div>
2063+ <div class="wmd-help-section-content">
2064+ <ol>
2065+ <li>Go to <a href="https://civitai.com/user/account" target="_blank" class="wmd-help-link">civitai.com/user/account</a></li>
2066+ <li>Scroll down to "API Keys" section</li>
2067+ <li>Click "Add API Key" and give it a name</li>
2068+ <li>Copy the key and paste it in Settings (gear icon above)</li>
2069+ </ol>
2070+ <div class="wmd-help-note">
2071+ <strong>Note:</strong> CivitAI API keys are required for downloading models from CivitAI,
2072+ including early access models.
2073+ </div>
2074+ </div>
2075+ </div>
2076+
2077+ <div class="wmd-help-section">
2078+ <div class="wmd-help-section-title">
2079+ <span>⚠️</span> "Security Error" When Installing from Registry
2080+ </div>
2081+ <div class="wmd-help-section-content">
2082+ If you see <strong>"only custom nodes from default channel"</strong> error when installing:
2083+ <ol>
2084+ <li>This is a <strong>ComfyUI Manager</strong> security setting, not an issue with this extension</li>
2085+ <li>Open ComfyUI Manager (click "Manager" button in ComfyUI)</li>
2086+ <li>Go to <strong>Manager Settings</strong> (gear icon)</li>
2087+ <li>Find "Security Level" and change it from "Strong" to "Normal" or "Weak"</li>
2088+ <li>Restart ComfyUI and try installing again</li>
2089+ </ol>
2090+ <div class="wmd-help-warning">
2091+ <strong>Alternative:</strong> You can also install manually by cloning the repository:<br>
2092+ <code>git clone https://github.com/slahiri/ComfyUI-Workflow-Models-Downloader</code><br>
2093+ into your <code>ComfyUI/custom_nodes/</code> folder.
2094+ </div>
2095+ </div>
2096+ </div>
2097+
2098+ <div class="wmd-help-section">
2099+ <div class="wmd-help-section-title">
2100+ <span>📁</span> Custom Model Directories (extra_model_paths.yaml)
2101+ </div>
2102+ <div class="wmd-help-section-content">
2103+ If you store models in custom directories outside the default <code>models/</code> folder:
2104+ <ol>
2105+ <li>This extension now supports <code>extra_model_paths.yaml</code></li>
2106+ <li>Your custom paths configured in ComfyUI will be searched automatically</li>
2107+ <li>Edit <code>ComfyUI/extra_model_paths.yaml</code> to add custom paths</li>
2108+ </ol>
2109+ <div class="wmd-help-note">
2110+ <strong>Example extra_model_paths.yaml:</strong><br>
2111+ <code>
2112+ mymodels:<br>
2113+ base_path: D:/AI/Models<br>
2114+ checkpoints: checkpoints<br>
2115+ loras: loras
2116+ </code>
2117+ </div>
2118+ </div>
2119+ </div>
2120+
2121+ <div class="wmd-help-section">
2122+ <div class="wmd-help-section-title">
2123+ <span>🔍</span> Model Not Found / Unknown URLs
2124+ </div>
2125+ <div class="wmd-help-section-content">
2126+ If a model shows "Missing URLs / Unknown":
2127+ <ol>
2128+ <li><strong>Search URL:</strong> Click to search HuggingFace and CivitAI APIs</li>
2129+ <li><strong>Lookup Hash:</strong> If you have the file, calculates SHA256 and searches CivitAI</li>
2130+ <li><strong>Advanced Search:</strong> Uses AI-powered web search (requires Tavily API key)</li>
2131+ <li><strong>Manual URL:</strong> Paste a direct download URL in the input field</li>
2132+ </ol>
2133+ <div class="wmd-help-note">
2134+ <strong>Tip:</strong> For renamed models, try searching by the original filename or model type.
2135+ </div>
2136+ </div>
2137+ </div>
2138+
2139+ <div class="wmd-help-section">
2140+ <div class="wmd-help-section-title">
2141+ <span>🚀</span> Quick Tips
2142+ </div>
2143+ <div class="wmd-help-section-content">
2144+ <ul style="list-style-type: disc; padding-left: 20px;">
2145+ <li><strong>Downloads continue in background</strong> - You can close this dialog and downloads will keep running</li>
2146+ <li><strong>Change directories</strong> - Use the dropdown to change where a model will be saved</li>
2147+ <li><strong>Filter models</strong> - Use the dropdown in header to show only missing, existing, etc.</li>
2148+ <li><strong>Settings persist</strong> - API keys are saved and remembered across sessions</li>
2149+ </ul>
2150+ </div>
2151+ </div>
2152+ ` ;
2153+
2154+ return panel ;
2155+ }
2156+
18902157 async loadSettings ( ) {
18912158 try {
18922159 const response = await api . fetchApi ( "/workflow-models/settings" ) ;
0 commit comments