Fix placeholder paths and model name parsing

1. Changed placeholder paths to relative './' instead of absolute
2. Enhanced model name parsing to use model_info['name'] when available
3. Fallback to model_id parsing for better display names
4. Should show 'wan2.2-Remix' instead of 'Unknown Model' when possible
This commit is contained in:
huchukato
2026-02-21 03:07:14 +01:00
parent 5c131eecd9
commit dd961386c7
5 changed files with 9 additions and 6 deletions
+5 -2
View File
@@ -129,8 +129,11 @@ async def route_download_model(request):
download_id = download_manager.add_to_queue(download_info)
# Extract model name from model_id for better display
model_display_name = target_model_id.split('/')[-1] if target_model_id else "Unknown Model"
# Extract model name from model_info if available, otherwise from model_id
if model_info and isinstance(model_info, dict) and model_info.get('name'):
model_display_name = model_info['name']
else:
model_display_name = target_model_id.split('/')[-1] if target_model_id else "Unknown Model"
response_data = {
"download_id": download_id,
+1 -1
View File
@@ -7,7 +7,7 @@ console.log("Loading HuggingFace UI...");
// --- Configuration ---
const EXTENSION_NAME = "HuggingFace";
const CSS_URL = `../huggingfaceDownloader.css`;
const PLACEHOLDER_IMAGE_URL = `/custom_nodes/ComfyUI-HuggingFace/images/placeholder.jpg`;
const PLACEHOLDER_IMAGE_URL = `./images/placeholder.jpg`;
// Add Menu Button to ComfyUI
function addMenuButton() {
+1 -1
View File
@@ -1,6 +1,6 @@
// Renders the download preview panel
const PLACEHOLDER_IMAGE_URL = `/custom_nodes/ComfyUI-HuggingFace/web/images/placeholder.jpg`;
const PLACEHOLDER_IMAGE_URL = `./web/images/placeholder.jpg`;
export function renderDownloadPreview(ui, data) {
if (!ui.downloadPreviewArea) return;
+1 -1
View File
@@ -1,7 +1,7 @@
// Rendering of search results list
// Usage: renderSearchResults(uiInstance, itemsArray)
const PLACEHOLDER_IMAGE_URL = `/custom_nodes/ComfyUI-HuggingFace/images/placeholder.jpg`;
const PLACEHOLDER_IMAGE_URL = `./images/placeholder.jpg`;
export function renderSearchResults(ui, items) {
ui.feedback?.ensureFontAwesome();
+1 -1
View File
@@ -1,6 +1,6 @@
// Renders active/queued/history download lists
const PLACEHOLDER_IMAGE_URL = `/custom_nodes/ComfyUI-HuggingFace/images/placeholder.jpg`;
const PLACEHOLDER_IMAGE_URL = `./images/placeholder.jpg`;
export function renderDownloadList(ui, items, container, emptyMessage) {
if (!items || items.length === 0) {