diff --git a/__init__.py b/__init__.py index 2d3183f..a6a7237 100644 --- a/__init__.py +++ b/__init__.py @@ -45,7 +45,7 @@ from .nodes.masks import * # Import API endpoints to register routes from . import api -from .utility.rgthree_api import routes_model_info +from .utility.wanvid_api import routes_model_info from .nodes import trigger_ref_refresh # Register PrepareRefs backend trigger endpoint NODE_CONFIG = {} diff --git a/api.py b/api.py index 1dd15b4..c709b83 100644 --- a/api.py +++ b/api.py @@ -447,11 +447,24 @@ async def rename_lora(request) -> web.Response: if os.path.exists(preview_folder): renamed_files.extend(_rename_preview_files(old_base_name, new_name, preview_folder)) + # Compute the ComfyUI-relative name (e.g. "subdir/name.safetensors") for + # UI use - widgets store partial paths, not full filesystem paths. + new_relative_path = new_lora_path + for folder in folders_to_check: + try: + rel = os.path.relpath(new_lora_path, folder) + if not rel.startswith('..'): + new_relative_path = rel.replace(os.sep, '/') + break + except ValueError: + # Different drive letters on Windows, skip this folder + continue + return web.json_response({ "success": True, "message": f"Successfully renamed LoRA and {len(renamed_files)-1} associated files", - "new_high_path": new_lora_path, - "new_low_path": new_lora_path, # For high variant, low path is the same + "new_high_path": new_relative_path, + "new_low_path": new_relative_path, # For high variant, low path is the same "renamed_files": renamed_files }) diff --git a/nodes/lora_change.py b/nodes/lora_change.py index e12608a..a1ff1c9 100644 --- a/nodes/lora_change.py +++ b/nodes/lora_change.py @@ -27,7 +27,7 @@ class LoraReduceRank: EXPERIMENTAL = True DESCRIPTION = "Resize a LoRA model by reducing it's rank. Based on kohya's sd-scripts." - CATEGORY = "KJNodes/lora" + CATEGORY = "QQ/lora" def save(self, lora_name, new_rank, output_dtype, dynamic_method, dynamic_param, verbose): @@ -110,7 +110,7 @@ class LoraRemapStrength: RETURN_TYPES = () FUNCTION = "save" OUTPUT_NODE = True - CATEGORY = "KJNodes/lora" + CATEGORY = "QQ/lora" def save(self, lora_name, reference_strength, target_strength, create_missing_alpha, output_dtype): print(f"[LoraRemapStrength DEBUG] Starting with inputs:") diff --git a/nodes/lora_combine.py b/nodes/lora_combine.py index 4c0c34a..0edfdf0 100644 --- a/nodes/lora_combine.py +++ b/nodes/lora_combine.py @@ -271,7 +271,7 @@ class LoraSmartCombine: RETURN_TYPES = () FUNCTION = "combine" OUTPUT_NODE = True - CATEGORY = "KJNodes/lora" + CATEGORY = "QQ/lora" DESCRIPTION = "Smartly combine multiple LoRAs with rank extension using SVD decomposition" def combine(self, lora_1_name, lora_2_name, lora_3_name, lora_4_name, diff --git a/nodes/lora_extract_v2.py b/nodes/lora_extract_v2.py index 3445ff4..c3b6de1 100644 --- a/nodes/lora_extract_v2.py +++ b/nodes/lora_extract_v2.py @@ -379,7 +379,7 @@ class LoraExtractKJv2: RETURN_TYPES = () FUNCTION = "save" OUTPUT_NODE = True - CATEGORY = "KJNodes/lora" + CATEGORY = "QQ/lora" def save(self, finetuned_model, original_model, filename_prefix, rank, lora_type, algorithm, lowrank_iters, output_dtype, bias_diff, adaptive_param, clamp_quantile, diff --git a/nodes/lora_merge_ltx.py b/nodes/lora_merge_ltx.py index ec7b8b6..b62ce16 100644 --- a/nodes/lora_merge_ltx.py +++ b/nodes/lora_merge_ltx.py @@ -46,7 +46,7 @@ class LoadModelMeta: RETURN_TYPES = ("MODEL",) FUNCTION = "load_checkpoint" - CATEGORY = "KJNodes/ltxv" + CATEGORY = "QQ/ltxv" def load_checkpoint(self, checkpoint_name): """ @@ -156,7 +156,7 @@ class LTX2LoRASelect: RETURN_TYPES = ("MODEL",) FUNCTION = "apply_lora" - CATEGORY = "KJNodes/ltxv" + CATEGORY = "QQ/ltxv" def apply_lora( self, @@ -357,7 +357,7 @@ class LoraMergeLTX: RETURN_TYPES = ("STRING",) RETURN_NAMES = ("merged_lora_path",) FUNCTION = "merge_loras" - CATEGORY = "KJNodes/ltxv" + CATEGORY = "QQ/ltxv" OUTPUT_NODE = True def merge_loras(self, model_with_loras, output_prefix, rank, output_dir, merge_on_model): @@ -622,7 +622,7 @@ class LoraApplyOnLTX: RETURN_TYPES = ("STRING",) RETURN_NAMES = ("saved_checkpoint_path",) FUNCTION = "apply_lora_to_model" - CATEGORY = "KJNodes/ltxv" + CATEGORY = "QQ/ltxv" OUTPUT_NODE = True def apply_lora_to_model(self, model_with_loras, output_prefix, output_dir): diff --git a/nodes/power_compare_video.py b/nodes/power_compare_video.py index 9527edc..1bf3752 100644 --- a/nodes/power_compare_video.py +++ b/nodes/power_compare_video.py @@ -90,7 +90,7 @@ class PowerCompareVideo: """ Playback preview node: receives an IMAGE batch (video frames) and sends them to the client UI for timeline-based playback with a sliding A/B - comparison (rgthree Image Comparer style). + comparison (Image Comparer style). Inputs: images - IMAGE tensor [frame_count, height, width, 3] (e.g. from PowerLoadVideo). diff --git a/nodes/power_loaders.py b/nodes/power_loaders.py index bdd551f..eaa015d 100644 --- a/nodes/power_loaders.py +++ b/nodes/power_loaders.py @@ -59,7 +59,7 @@ any_type = AnyType("*") def get_lora_by_filename_basic(file_path, lora_paths=None, log_node=None): - """Basic implementation of LoRA path resolution based on rgthree-comfy's get_lora_by_filename.""" + """Basic LoRA path resolution helper.""" if lora_paths is None: lora_paths = folder_paths.get_filename_list("loras") @@ -124,7 +124,7 @@ def get_lora_by_filename_basic(file_path, lora_paths=None, log_node=None): class WanVideoPowerLoraLoader: - """A power lora loader for WanVideo that supports unlimited loras with rgthree-style UI.""" + """A power lora loader for WanVideo that supports unlimited loras with a custom-styled UI.""" def __init__(self): self.properties = { @@ -150,7 +150,7 @@ class WanVideoPowerLoraLoader: RETURN_NAMES = ("selected_lora", "low_lora") FUNCTION = "load_loras" CATEGORY = "WanVideoWrapper_QQ/utils" - DESCRIPTION = "A powerful, flexible node to load multiple WanVideo loras with rgthree-style UI" + DESCRIPTION = "A powerful, flexible node to load multiple WanVideo loras with a custom-styled UI" def load_loras(self, prev_lora=None, blocks=None, **kwargs): """Loops over the provided loras in kwargs and applies valid ones.""" @@ -188,13 +188,7 @@ class WanVideoPowerLoraLoader: if not lora_name or lora_name.lower() == "none": continue - # Use the sophisticated LoRA path resolution from rgthree-comfy - try: - from rgthree_comfy.py.power_prompt_utils import get_lora_by_filename - lora_filename = get_lora_by_filename(lora_name, log_node=self.__class__.__name__) - except ImportError: - # Fallback to basic path resolution if rgthree-comfy is not available - lora_filename = get_lora_by_filename_basic(lora_name, log_node=self.__class__.__name__) + lora_filename = get_lora_by_filename_basic(lora_name, log_node=self.__class__.__name__) if lora_filename is None: print(f"[WanVideoPowerLoraLoader] LoRA '{lora_name}' not found, skipping.") @@ -314,13 +308,7 @@ class WanVideoPowerLoraLoader: if low_strength is None: low_strength = 0.0 - # Use the sophisticated LoRA path resolution for low variant - try: - from rgthree_comfy.py.power_prompt_utils import get_lora_by_filename - low_variant_filename = get_lora_by_filename(low_variant_name, log_node=self.__class__.__name__) - except ImportError: - # Fallback to basic path resolution if rgthree-comfy is not available - low_variant_filename = get_lora_by_filename_basic(low_variant_name, log_node=self.__class__.__name__) + low_variant_filename = get_lora_by_filename_basic(low_variant_name, log_node=self.__class__.__name__) if low_variant_filename is None: print(f"[WanVideoPowerLoraLoader] Low variant LoRA '{low_variant_name}' not found, skipping low variant.") @@ -426,13 +414,7 @@ class PowerLoraLoaderV2: if not lora_name or lora_name.lower() == "none": continue - # Use the sophisticated LoRA path resolution from rgthree-comfy - try: - from rgthree_comfy.py.power_prompt_utils import get_lora_by_filename - lora_filename = get_lora_by_filename(lora_name, log_node=self.__class__.__name__) - except ImportError: - # Fallback to basic path resolution if rgthree-comfy is not available - lora_filename = get_lora_by_filename_basic(lora_name, log_node=self.__class__.__name__) + lora_filename = get_lora_by_filename_basic(lora_name, log_node=self.__class__.__name__) if lora_filename is None: # Try to get the full path directly from ComfyUI as a fallback @@ -573,13 +555,7 @@ class PowerLoraLoaderV2: if low_strength is None: low_strength = 0.0 - # Use the sophisticated LoRA path resolution for low variant - try: - from rgthree_comfy.py.power_prompt_utils import get_lora_by_filename - low_variant_filename = get_lora_by_filename(low_variant_name, log_node=self.__class__.__name__) - except ImportError: - # Fallback to basic path resolution if rgthree-comfy is not available - low_variant_filename = get_lora_by_filename_basic(low_variant_name, log_node=self.__class__.__name__) + low_variant_filename = get_lora_by_filename_basic(low_variant_name, log_node=self.__class__.__name__) if low_variant_filename is None: print(f"[PowerLoraLoaderV2] Low variant LoRA '{low_variant_name}' not found, skipping low variant.") @@ -689,13 +665,7 @@ class SimplePowerLoraLoader: if not lora_name or lora_name.lower() == "none": continue - # Use the sophisticated LoRA path resolution from rgthree-comfy - try: - from rgthree_comfy.py.power_prompt_utils import get_lora_by_filename - lora_filename = get_lora_by_filename(lora_name, log_node=self.__class__.__name__) - except ImportError: - # Fallback to basic path resolution if rgthree-comfy is not available - lora_filename = get_lora_by_filename_basic(lora_name, log_node=self.__class__.__name__) + lora_filename = get_lora_by_filename_basic(lora_name, log_node=self.__class__.__name__) if lora_filename is None: # Try to get the full path directly from ComfyUI as a fallback diff --git a/utility/rgthree_api/routes_model_info.py b/utility/wanvid_api/routes_model_info.py similarity index 100% rename from utility/rgthree_api/routes_model_info.py rename to utility/wanvid_api/routes_model_info.py diff --git a/utility/rgthree_api/utils.py b/utility/wanvid_api/utils.py similarity index 100% rename from utility/rgthree_api/utils.py rename to utility/wanvid_api/utils.py diff --git a/utility/rgthree_api/utils_info.py b/utility/wanvid_api/utils_info.py similarity index 99% rename from utility/rgthree_api/utils_info.py rename to utility/wanvid_api/utils_info.py index 8c832f4..5c5ee14 100644 --- a/utility/rgthree_api/utils_info.py +++ b/utility/wanvid_api/utils_info.py @@ -128,7 +128,7 @@ async def get_model_info( should_save = False # basic data basic_data = get_file_info(file, model_type) - # Try to load a rgthree-info.json file next to the file. + # Try to load the model info json file next to the file. info_data = get_model_info_file_data(file, model_type, default={}) for key in ['file', 'path', 'modified', 'imageLocal', 'hasInfoFile']: @@ -196,7 +196,7 @@ async def get_model_info( save_model_info(file, info_data, model_type) # If we're saving, then the UI is likely waiting to see if the refreshed data is coming in. - await PromptServer.instance.send(f"rgthree-refreshed-{model_type}-info", {"data": info_data}) + await PromptServer.instance.send(f"wanvid-refreshed-{model_type}-info", {"data": info_data}) return info_data diff --git a/utility/rgthree_api/utils_server.py b/utility/wanvid_api/utils_server.py similarity index 87% rename from utility/rgthree_api/utils_server.py rename to utility/wanvid_api/utils_server.py index b19d8a8..12b3ca9 100644 --- a/utility/rgthree_api/utils_server.py +++ b/utility/wanvid_api/utils_server.py @@ -25,12 +25,12 @@ def is_param_truthy(request, param): def set_default_page_resources(path, routes): """ Sets up routes for handling static files under a path.""" - @routes.get(f'/rgthree/{path}/{{file}}') + @routes.get(f'/wanvid/{path}/{{file}}') async def get_resource(request): """ Returns a resource file. """ return web.FileResponse(os.path.join(DIR_WEB, path, request.match_info['file'])) - @routes.get(f'/rgthree/{path}/{{subdir}}/{{file}}') + @routes.get(f'/wanvid/{path}/{{subdir}}/{{file}}') async def get_resource_subdir(request): """ Returns a resource file. """ return web.FileResponse( @@ -38,14 +38,14 @@ def set_default_page_resources(path, routes): def set_default_page_routes(path, routes): - """ Sets default path handling for a hosted rgthree page. """ + """ Sets default path handling for a hosted page. """ - @routes.get(f'/rgthree/{path}') + @routes.get(f'/wanvid/{path}') async def get_path_redir(request): """ Redirects to the path adding a trailing slash. """ raise web.HTTPFound(f'{request.path}/') - @routes.get(f'/rgthree/{path}/') + @routes.get(f'/wanvid/{path}/') async def get_path_index(request): """ Handles the page's index loading. """ html = '' diff --git a/utility/rgthree_api/utils_userdata.py b/utility/wanvid_api/utils_userdata.py similarity index 100% rename from utility/rgthree_api/utils_userdata.py rename to utility/wanvid_api/utils_userdata.py diff --git a/web/h3_text_multiline/links.js b/web/h3_text_multiline/links.js index 63c87a1..1a7edc6 100644 --- a/web/h3_text_multiline/links.js +++ b/web/h3_text_multiline/links.js @@ -351,8 +351,7 @@ function getComfyDefaultLinkColor(canvas) { function linkHighlighted(canvas, targetNode, sourceNode) { return Boolean( targetNode?.selected || sourceNode?.selected || - canvas?.selectedItems?.has?.(targetNode) || canvas?.selectedItems?.has?.(sourceNode) || - canvas?.selected_nodes?.[targetNode?.id] || canvas?.selected_nodes?.[sourceNode?.id] + canvas?.selectedItems?.has?.(targetNode) || canvas?.selectedItems?.has?.(sourceNode) ); } diff --git a/web/power_compare_video/compare_row_widget.js b/web/power_compare_video/compare_row_widget.js index adc10df..e56e834 100644 --- a/web/power_compare_video/compare_row_widget.js +++ b/web/power_compare_video/compare_row_widget.js @@ -19,9 +19,9 @@ * the top-left corner of its video's region in the stitched output. */ import { app } from '../../../scripts/app.js'; -import { RgthreeBaseWidget } from '../power_spline_editor/drawing_utils.js'; +import { QQBaseWidget } from '../power_spline_editor/drawing_utils.js'; -export class PowerCompareRowWidget extends RgthreeBaseWidget { +export class PowerCompareRowWidget extends QQBaseWidget { constructor(name = "PowerCompareRow") { super(name); this.type = "custom"; diff --git a/web/power_compare_video/power_compare_video.js b/web/power_compare_video/power_compare_video.js index e57aa75..3ae3c9e 100644 --- a/web/power_compare_video/power_compare_video.js +++ b/web/power_compare_video/power_compare_video.js @@ -7,7 +7,7 @@ * * When a second video is available (previous run's cache, or the images_b * input), the row above the playback area offers three compare modes: - * - slide (default): rgthree-Image-Comparer-style slider on the playback + * - slide (default): Image-Comparer-style slider on the playback * area - the divider follows the mouse, revealing B on the left and * keeping A on the right * - right: B placed on the right side of A @@ -290,7 +290,7 @@ app.registerExtension({ }; // Left-to-right sliding compare: the divider follows the mouse while - // it moves over the playback area (borrowed from rgthree comparer). + // it moves over the playback area (borrowed from qq comparer). // Only active in slide mode with a second video present. const updateSplitFromMouse = (e) => { if ((this.compareMode || 'slide') !== 'slide') return; diff --git a/web/power_crop_image/crop_overlay.js b/web/power_crop_image/crop_overlay.js index 26e4e04..a4f49c6 100644 --- a/web/power_crop_image/crop_overlay.js +++ b/web/power_crop_image/crop_overlay.js @@ -2,9 +2,9 @@ * CropOverlayWidget — draggable/resizable crop box. * Draws the green overlay on the CropCanvas during mouse interaction. */ -import { RgthreeBaseWidget } from '../power_spline_editor/drawing_utils.js'; +import { QQBaseWidget } from '../power_spline_editor/drawing_utils.js'; -export class CropOverlayWidget extends RgthreeBaseWidget { +export class CropOverlayWidget extends QQBaseWidget { constructor(name = "crop_overlay") { super(name); this.type = 'custom'; diff --git a/web/power_crop_image/top_row.js b/web/power_crop_image/top_row.js index de75847..e688b26 100644 --- a/web/power_crop_image/top_row.js +++ b/web/power_crop_image/top_row.js @@ -5,10 +5,10 @@ import { app } from '../../../scripts/app.js'; import { drawWidgetButton, - RgthreeBaseWidget, + QQBaseWidget, } from '../power_spline_editor/drawing_utils.js'; -export class PowerCropTopRowWidget extends RgthreeBaseWidget { +export class PowerCropTopRowWidget extends QQBaseWidget { constructor(name = "PowerCropTopRow") { super(name); this.type = "custom"; diff --git a/web/power_load_video/box_crop_widget.js b/web/power_load_video/box_crop_widget.js index ae5d0e5..dc247be 100644 --- a/web/power_load_video/box_crop_widget.js +++ b/web/power_load_video/box_crop_widget.js @@ -7,9 +7,9 @@ */ import { app } from '../../../scripts/app.js'; -import { RgthreeBaseWidget } from '../power_spline_editor/drawing_utils.js'; +import { QQBaseWidget } from '../power_spline_editor/drawing_utils.js'; -export class BoxCropWidget extends RgthreeBaseWidget { +export class BoxCropWidget extends QQBaseWidget { constructor(name = "box_crop") { super(name); this.type = 'custom'; diff --git a/web/power_load_video/file_selector_widget.js b/web/power_load_video/file_selector_widget.js index a8f58f2..93bc531 100644 --- a/web/power_load_video/file_selector_widget.js +++ b/web/power_load_video/file_selector_widget.js @@ -7,9 +7,9 @@ */ import { api } from '../../../scripts/api.js'; import { app } from '../../../scripts/app.js'; -import { RgthreeBaseWidget, fitString } from '../power_spline_editor/drawing_utils.js'; +import { QQBaseWidget, fitString } from '../power_spline_editor/drawing_utils.js'; -export class PowerLoadVideoFileSelectorWidget extends RgthreeBaseWidget { +export class PowerLoadVideoFileSelectorWidget extends QQBaseWidget { constructor(node) { super("PowerLoadVideoFileSelector"); this.type = "custom"; diff --git a/web/power_load_video/timeline_widget.js b/web/power_load_video/timeline_widget.js index 20782f9..beee736 100644 --- a/web/power_load_video/timeline_widget.js +++ b/web/power_load_video/timeline_widget.js @@ -2,9 +2,9 @@ * Timeline Widget for video playback control * Styled to match Power Spline Editor's timeline aesthetic */ -import { RgthreeBaseWidget } from '../power_spline_editor/drawing_utils.js'; +import { QQBaseWidget } from '../power_spline_editor/drawing_utils.js'; -export class PowerLoadVideoTimelineWidget extends RgthreeBaseWidget { +export class PowerLoadVideoTimelineWidget extends QQBaseWidget { constructor(name = "PowerLoadVideoTimeline") { super(name); this.type = "custom"; @@ -602,7 +602,7 @@ export class PowerLoadVideoTimelineWidget extends RgthreeBaseWidget { /** * Drag to seek along timeline - * Called by base class RgthreeBaseWidget when mouse is dragged over hit area + * Called by base class QQBaseWidget when mouse is dragged over hit area * Uses direct position calculation for smooth real-time scrubbing */ dragSeek(event, pos, node) { diff --git a/web/power_load_video/top_row_widget.js b/web/power_load_video/top_row_widget.js index 6a5e108..d379627 100644 --- a/web/power_load_video/top_row_widget.js +++ b/web/power_load_video/top_row_widget.js @@ -3,9 +3,9 @@ * Similar to Power Spline Editor's top row with Refresh button and text inputs */ import { app } from '../../../scripts/app.js'; -import { RgthreeBaseWidget } from '../power_spline_editor/drawing_utils.js'; +import { QQBaseWidget } from '../power_spline_editor/drawing_utils.js'; -export class PowerLoadVideoTopRowWidget extends RgthreeBaseWidget { +export class PowerLoadVideoTopRowWidget extends QQBaseWidget { constructor(name = "PowerLoadVideoTopRow") { super(name); this.type = "custom"; diff --git a/web/power_lora_loader_js/batch_fetch_service.js b/web/power_lora_loader_js/batch_fetch_service.js index de41446..684ff80 100644 --- a/web/power_lora_loader_js/batch_fetch_service.js +++ b/web/power_lora_loader_js/batch_fetch_service.js @@ -1,6 +1,6 @@ // Import necessary modules import { generatePreviewFromFirstImage } from "./image_utils.js"; -import { rgthreeApi } from "./rgthree_api.js"; +import { vidApi } from "./wanvid_api.js"; /** * Batch Fetch Service - Handles bulk LoRA info fetching and preview generation @@ -160,7 +160,6 @@ export class BatchFetchService { if (isVideo) { hasVideos = true; videoCount++; - console.log(`đŸŽĨ Skipping video preview: ${image.url}`); // Only skip if SKIP_VIDEO_PREVIEWS is enabled if (!BatchFetchService.BATCH_CONFIG.SKIP_VIDEO_PREVIEWS) { @@ -172,7 +171,6 @@ export class BatchFetchService { } if (hasVideos) { - console.log(`â„šī¸ Found ${videoCount} video preview(s), ${BatchFetchService.BATCH_CONFIG.SKIP_VIDEO_PREVIEWS ? 'skipping' : 'including'} them`); } return { @@ -197,7 +195,6 @@ export class BatchFetchService { return response.ok; } catch (error) { - console.log(`Error checking placeholder preview for ${loraName}:`, error); return false; } } @@ -210,7 +207,6 @@ export class BatchFetchService { async createPlaceholderPreview(loraName) { try { const cleanLoraName = loraName.replace(/\.[^/.]+$/, ""); // Remove extension - console.log(`📋 Creating placeholder preview for ${loraName} from no_preview.jpg`); // Fetch the no_preview.jpg placeholder const placeholderResponse = await fetch('/wanvid/api/loras/preview?file=no_preview.jpg'); @@ -237,7 +233,6 @@ export class BatchFetchService { } const result = await saveResponse.json(); - console.log(`✓ Created placeholder preview for ${loraName}:`, result); } catch (error) { console.error(`Failed to create placeholder preview for ${loraName}:`, error); @@ -262,7 +257,6 @@ export class BatchFetchService { updateProgress(overallProgress); updateText(`Processing ${loraName} (${index + 1}/${total})`); - console.log(`[${index + 1}/${total}] Processing ${loraName}`); // Stage 1: Fetch LoRA info with retry logic const loraInfo = await this.fetchLoraInfoWithRetry(loraName, checkCancelled); @@ -279,7 +273,6 @@ export class BatchFetchService { const imageFilter = this.filterVideoImages(loraInfo); if (!imageFilter.hasImages) { - console.log(`â„šī¸ ${loraName}: Only video previews found (${imageFilter.videoCount} videos), skipping to prevent timeouts`); return { success: true, loraName, @@ -299,7 +292,6 @@ export class BatchFetchService { }; updateText(`Generating preview for ${loraName} (${index + 1}/${total})`); - console.log(`[${index + 1}/${total}] Generating preview for ${loraName} (${imageFilter.filteredImages.length} images, skipped ${imageFilter.videoCount} videos)`); previewResult = await this.generatePreviewsWithRetry(filteredLoraInfo, checkCancelled); @@ -308,7 +300,6 @@ export class BatchFetchService { throw new Error('Operation cancelled'); } } else { - console.log(`ℹ No images found for ${loraName}, will create placeholder preview to prevent refetching`); } return { @@ -324,7 +315,6 @@ export class BatchFetchService { } catch (error) { if (error.message === 'Operation cancelled') { - console.log(`[${loraName}] Processing cancelled`); throw error; } @@ -449,7 +439,6 @@ export class BatchFetchService { existing.push(loraName); } else if (hasPlaceholder) { withPlaceholderPreviews.push(loraName); - console.log(`â„šī¸ ${loraName}: Has placeholder preview, already processed`); } else { missing.push(loraName); } @@ -457,7 +446,6 @@ export class BatchFetchService { const processedTotal = existing.length + withPlaceholderPreviews.length; - console.log(`LoRA Preview Status: ${missing.length} missing, ${existing.length} have existing previews, ${withPlaceholderPreviews.length} have placeholder previews`); switch (filterType) { case 'missing': @@ -514,7 +502,6 @@ export class BatchFetchService { for (let attempt = 1; attempt <= maxRetries + 1; attempt++) { try { - console.log(`[${loraName}] Fetching info from Civitai API (attempt ${attempt}/${maxRetries + 1})...`); // Check for cancellation before starting API call if (this.cancelFlag || checkCancelled()) { @@ -525,7 +512,7 @@ export class BatchFetchService { const adaptiveTimeout = baseTimeout * Math.pow(backoffMultiplier, attempt - 1); // Use cancellable promise wrapper with adaptive timeout - const apiPromise = rgthreeApi.refreshSingleLoraInfo(loraName); + const apiPromise = vidApi.refreshSingleLoraInfo(loraName); const result = await this.createCancellablePromise( apiPromise, adaptiveTimeout, @@ -537,13 +524,11 @@ export class BatchFetchService { throw new Error('Operation cancelled'); } - console.log(`[${loraName}] Successfully fetched info from Civitai (attempt ${attempt})`); // Check if we got image data if (result && result.length > 0) { const loraInfo = result[0]; if (loraInfo.images && loraInfo.images.length > 0) { - console.log(`[${loraName}] Found ${loraInfo.images.length} images for preview generation`); } else { console.warn(`[${loraName}] No images found in fetched data for preview generation`); } @@ -558,7 +543,6 @@ export class BatchFetchService { const isCancelled = error.message === 'Operation cancelled' || error.message === 'Operation timeout'; if (isCancelled) { - console.log(`[${loraName}] Fetch cancelled/timeout on attempt ${attempt}`); throw new Error('Operation cancelled'); } @@ -605,7 +589,6 @@ export class BatchFetchService { for (let attempt = 1; attempt <= maxRetries + 1; attempt++) { try { - console.log(`[${loraName}] Generating previews (attempt ${attempt}/${maxRetries + 1}) with params:`, { loraName, loraPath }); // Check for cancellation before starting preview generation if (this.cancelFlag || checkCancelled()) { @@ -628,7 +611,6 @@ export class BatchFetchService { throw new Error('Operation cancelled'); } - console.log(`[${loraName}] Preview generation successful on attempt ${attempt}:`, previewResult); return previewResult; } catch (error) { @@ -636,7 +618,6 @@ export class BatchFetchService { const isCancelled = error.message === 'Operation cancelled' || error.message === 'Operation timeout'; if (isCancelled) { - console.log(`[${loraName}] Preview generation cancelled/timeout on attempt ${attempt}`); throw new Error('Operation cancelled'); } @@ -686,25 +667,14 @@ export class BatchFetchService { const filteredData = await this.filterLorasByPreviewStatus(loras, hasPreviewCallback, filterType); const { loras: lorasToFetch, skipped, stats } = filteredData; - // Log current configuration for performance tuning const config = BatchFetchService.getConfig(); - console.log(`Batch fetch configuration:`, { - batchSize: config.BATCH_SIZE, - interLoraDelay: config.INTER_LORA_DELAY, - interBatchDelay: config.INTER_BATCH_DELAY, - adaptiveDelay: config.ADAPTIVE_DELAY_ENABLED - }); - console.log(`Starting ${stats.type} fetch: ${stats.fetching} LoRAs to fetch, ${stats.skipped} LoRAs skipped`); if (lorasToFetch.length === 0) { - console.log(`No LoRAs to fetch for ${filterType} mode`); return { success: true, message: 'No LoRAs to process', stats }; } try { - console.log(`Starting PARALLEL batch processing of ${lorasToFetch.length} LoRAs`); - console.log(`Configuration: batch_size=${BatchFetchService.BATCH_CONFIG.BATCH_SIZE}, concurrent=${BatchFetchService.BATCH_CONFIG.MAX_CONCURRENT_REQUESTS}`); let completedCount = 0; let previewGeneratedCount = 0; @@ -719,13 +689,11 @@ export class BatchFetchService { for (let i = 0; i < lorasToFetch.length; i += batchSize) { // Check for cancellation before processing each batch if (this.cancelFlag || checkCancelled()) { - console.log('Batch operation cancelled by user'); updateText(`Operation cancelled. Processed ${completedCount}/${totalLoras} LoRAs`); break; } const batch = lorasToFetch.slice(i, i + Math.min(batchSize, totalLoras - i)); - console.log(`Processing batch ${Math.floor(i/batchSize) + 1} with ${batch.length} LoRAs in PARALLEL:`, batch); try { // Process the entire batch in parallel @@ -757,9 +725,7 @@ export class BatchFetchService { batchNoImages++; if (result.skippedVideos > 0) { batchVideosSkipped += result.skippedVideos; - console.log(`â„šī¸ ${result.loraName}: Skipped ${result.skippedVideos} video preview(s) to prevent timeouts`); } else { - console.log(`â„šī¸ ${result.loraName}: Info fetched successfully, but no preview images available`); } // Queue for placeholder preview creation (even if cancelled) @@ -775,18 +741,15 @@ export class BatchFetchService { // Create placeholder previews for LoRAs that need them (even if operation was cancelled) if (placeholderPreviewQueue.length > 0) { - console.log(`Creating placeholder previews for ${placeholderPreviewQueue.length} LoRAs...`); for (const loraName of placeholderPreviewQueue) { try { await this.createPlaceholderPreview(loraName); - console.log(`✓ Created placeholder preview for ${loraName}`); } catch (placeholderError) { console.warn(`⚠ Failed to create placeholder preview for ${loraName}:`, placeholderError); } } } - console.log(`Batch ${Math.floor(i/batchSize) + 1} completed: ${batchInfoFetched} info fetched, ${batchPreviewsGenerated} previews generated, ${batchNoImages} no images, ${batchVideosSkipped} videos skipped, ${batchFailures} failures`); // Accumulate counts videosSkippedCount += batchVideosSkipped; @@ -794,7 +757,6 @@ export class BatchFetchService { } catch (error) { if (error.message === 'Operation cancelled') { - console.log('Batch processing cancelled'); break; } console.error(`Batch ${Math.floor(i/batchSize) + 1} failed:`, error); @@ -803,13 +765,11 @@ export class BatchFetchService { // Check for cancellation between batches if (this.cancelFlag || checkCancelled()) { - console.log('Batch operation cancelled between batches'); break; } // Short delay between batches for API safety (cancellable) if (i + batchSize < lorasToFetch.length) { - console.log(`Batch ${Math.floor(i/batchSize) + 1} completed, short delay before next batch...`); try { await this.createCancellableDelay( BatchFetchService.BATCH_CONFIG.INTER_BATCH_DELAY, @@ -817,7 +777,6 @@ export class BatchFetchService { ); } catch (delayError) { if (delayError.message === 'Operation cancelled') { - console.log('Inter-batch delay cancelled, stopping batch processing'); break; } } @@ -859,7 +818,6 @@ export class BatchFetchService { } updateText(completionMessage); - console.log(`Batch processing ${this.cancelFlag ? 'cancelled' : 'completed'}: ${completionMessage}`); return { success: !this.cancelFlag, @@ -879,7 +837,6 @@ export class BatchFetchService { } catch (error) { if (error.message === 'Operation cancelled') { - console.log('Batch fetch operation cancelled by user'); updateText('Operation cancelled successfully'); return { success: false, @@ -909,7 +866,6 @@ export class BatchFetchService { * Cancel the current batch operation aggressively */ cancel() { - console.log('Cancelling batch operation aggressively...'); this.cancelFlag = true; // Abort any ongoing requests @@ -928,7 +884,6 @@ export class BatchFetchService { ...BatchFetchService.BATCH_CONFIG, ...newConfig }; - console.log('Batch fetch configuration updated:', BatchFetchService.BATCH_CONFIG); } /** @@ -947,7 +902,6 @@ export class BatchFetchService { * @returns {Promise} Comprehensive statistics object */ async gatherComprehensiveStats(hasPreviewCallback, allLoras) { - console.log('📊 Gathering comprehensive LoRA statistics...'); const stats = { totalLoRAs: 0, @@ -1000,7 +954,6 @@ export class BatchFetchService { stats.fileTypes[extension] = (stats.fileTypes[extension] || 0) + 1; } - console.log('✓ LoRA statistics gathered successfully'); return stats; } catch (error) { diff --git a/web/power_lora_loader_js/dialog_info.js b/web/power_lora_loader_js/dialog_info.js index 16670f9..3fd8d7a 100644 --- a/web/power_lora_loader_js/dialog_info.js +++ b/web/power_lora_loader_js/dialog_info.js @@ -3,13 +3,13 @@ import { createElement as $el, empty, appendChildren, getClosestOrSelf, query, q import { logoCivitai, link, pencilColored, diskColored, dotdotdot } from "./svgs.js"; import { LORA_INFO_SERVICE } from "./model_info_service.js"; import { generateId, injectCss } from "./shared_utils.js"; -import { rgthree } from "../rgthree/common/rgthree.js"; +import { qq } from "../qq_lib/common/qq.js"; import { proxyImageUrl } from "./image_utils.js"; class WanInfoDialog extends WanDialog { constructor(file) { const dialogOptions = { - class: "rgthree-info-dialog", + class: "qq-info-dialog", title: `

Loading...

`, content: "
Loading..
", onBeforeClose: () => { @@ -80,28 +80,28 @@ class WanInfoDialog extends WanDialog { } /* Info dialog specific styling - match power lora UI */ - .rgthree-info-dialog { + .qq-info-dialog { width: 90vw; max-width: 960px; } - .rgthree-info-dialog .rgthree-info-area { + .qq-info-dialog .qq-info-area { list-style: none; padding: 0; margin: 0; display: flex; } - .rgthree-info-dialog .rgthree-info-area > li { + .qq-info-dialog .qq-info-area > li { display: inline-flex; margin: 0; vertical-align: top; } - .rgthree-info-dialog .rgthree-info-area > li + li { + .qq-info-dialog .qq-info-area > li + li { margin-left: 4px; } - .rgthree-info-dialog .rgthree-info-area > li:not(.-link) + li.-link { + .qq-info-dialog .qq-info-area > li:not(.-link) + li.-link { margin-left: auto; } - .rgthree-info-dialog .rgthree-info-area > li.rgthree-info-tag > * { + .qq-info-dialog .qq-info-area > li.qq-info-tag > * { min-height: 20px; border-radius: 0px; line-height: 1; @@ -118,71 +118,71 @@ class WanInfoDialog extends WanDialog { align-items: center; border: 1px solid #333; } - .rgthree-info-dialog .rgthree-info-area > li.-type > * { + .qq-info-dialog .qq-info-area > li.-type > * { background: #2a2a2a; color: #89B; } - .rgthree-info-dialog .rgthree-info-area > li.rgthree-info-tag > * > svg { + .qq-info-dialog .qq-info-area > li.qq-info-tag > * > svg { width: 16px; height: 16px; } - .rgthree-info-dialog .rgthree-info-area > li.rgthree-info-tag > *:empty { + .qq-info-dialog .qq-info-area > li.qq-info-tag > *:empty { display: none; } /* Table styling - match power lora UI */ - .rgthree-info-dialog .rgthree-info-table { + .qq-info-dialog .qq-info-table { border-collapse: collapse; margin: 8px 0px; width: 100%; font-size: 11px; } - .rgthree-info-dialog .rgthree-info-table td { + .qq-info-dialog .qq-info-table td { position: relative; border: 1px solid #333; padding: 0; vertical-align: top; background: #1a1a1a; } - .rgthree-info-dialog .rgthree-info-table td:first-child { + .qq-info-dialog .qq-info-table td:first-child { background: #222; width: 10px; } - .rgthree-info-dialog .rgthree-info-table td:first-child > *:first-child { + .qq-info-dialog .qq-info-table td:first-child > *:first-child { white-space: nowrap; padding-right: 24px; } - .rgthree-info-dialog .rgthree-info-table td:first-child small { + .qq-info-dialog .qq-info-table td:first-child small { display: block; margin-top: 2px; opacity: 0.75; } - .rgthree-info-dialog .rgthree-info-table td:first-child small > [data-action] { + .qq-info-dialog .qq-info-table td:first-child small > [data-action] { text-decoration: underline; cursor: pointer; } - .rgthree-info-dialog .rgthree-info-table td:first-child small > [data-action]:hover { + .qq-info-dialog .qq-info-table td:first-child small > [data-action]:hover { text-decoration: none; } - .rgthree-info-dialog .rgthree-info-table td a, - .rgthree-info-dialog .rgthree-info-table td a:hover, - .rgthree-info-dialog .rgthree-info-table td a:visited { + .qq-info-dialog .qq-info-table td a, + .qq-info-dialog .qq-info-table td a:hover, + .qq-info-dialog .qq-info-table td a:visited { color: #89B; } - .rgthree-info-dialog .rgthree-info-table td svg { + .qq-info-dialog .qq-info-table td svg { width: 1.2em; height: 1.2em; vertical-align: -0.2em; } - .rgthree-info-dialog .rgthree-info-table td svg.logo-civitai { + .qq-info-dialog .qq-info-table td svg.logo-civitai { margin-right: 0.2em; } - .rgthree-info-dialog .rgthree-info-table td > *:first-child { + .qq-info-dialog .qq-info-table td > *:first-child { display: block; padding: 4px 8px; } - .rgthree-info-dialog .rgthree-info-table td > input, - .rgthree-info-dialog .rgthree-info-table td > textarea { + .qq-info-dialog .qq-info-table td > input, + .qq-info-dialog .qq-info-table td > textarea { padding: 4px 6px; border: 1px solid #333; box-shadow: none; @@ -194,16 +194,16 @@ class WanInfoDialog extends WanDialog { resize: vertical; width: 100%; } - .rgthree-info-dialog .rgthree-info-table td > input:focus, - .rgthree-info-dialog .rgthree-info-table td > textarea:focus { + .qq-info-dialog .qq-info-table td > input:focus, + .qq-info-dialog .qq-info-table td > textarea:focus { border-color: #555; background: #2a2a2a; outline: none; } - .rgthree-info-dialog .rgthree-info-table tr[data-field-name=userNote] td > span:first-child { + .qq-info-dialog .qq-info-table tr[data-field-name=userNote] td > span:first-child { white-space: pre; } - .rgthree-info-dialog .rgthree-info-table td .-help { + .qq-info-dialog .qq-info-table td .-help { border: 1px solid #555; position: absolute; right: 4px; @@ -219,12 +219,12 @@ class WanInfoDialog extends WanDialog { cursor: help; background: #222; } - .rgthree-info-dialog .rgthree-info-table td .-help::before { + .qq-info-dialog .qq-info-table td .-help::before { content: "?"; } /* Button styling - match power lora UI */ - .rgthree-button { + .qq-button { position: relative; cursor: pointer; border: 1px solid #000; @@ -245,20 +245,20 @@ class WanInfoDialog extends WanDialog { align-items: center; justify-content: center; } - .rgthree-button:hover { + .qq-button:hover { background: #2a2a2a; } - .rgthree-button:active { + .qq-button:active { background: #333; } - .rgthree-info-dialog .rgthree-info-table .rgthree-button[data-action=fetch-civitai] { + .qq-info-dialog .qq-info-table .qq-button[data-action=fetch-civitai] { font-size: inherit; padding: 4px 8px; margin: 2px; } /* Edit button styling */ - .rgthree-button-edit { + .qq-button-edit { background: none; border: none; cursor: pointer; @@ -271,22 +271,22 @@ class WanInfoDialog extends WanDialog { align-items: center; justify-content: center; } - .rgthree-button-edit:hover { + .qq-button-edit:hover { opacity: 1; color: #89B; } - .rgthree-info-dialog .rgthree-info-table tr.editable button svg + svg { + .qq-info-dialog .qq-info-table tr.editable button svg + svg { display: none; } - .rgthree-info-dialog .rgthree-info-table tr.editable.-rgthree-editing button svg { + .qq-info-dialog .qq-info-table tr.editable.-qq-editing button svg { display: none; } - .rgthree-info-dialog .rgthree-info-table tr.editable.-rgthree-editing button svg + svg { + .qq-info-dialog .qq-info-table tr.editable.-qq-editing button svg + svg { display: inline-block; } /* Trained words styling - match power lora UI */ - .rgthree-info-dialog .rgthree-info-table td > ul.rgthree-info-trained-words-list { + .qq-info-dialog .qq-info-table td > ul.qq-info-trained-words-list { list-style: none; padding: 2px 4px; margin: 0; @@ -296,7 +296,7 @@ class WanInfoDialog extends WanDialog { max-height: 15vh; overflow: auto; } - .rgthree-info-dialog .rgthree-info-table td > ul.rgthree-info-trained-words-list > li { + .qq-info-dialog .qq-info-table td > ul.qq-info-trained-words-list > li { display: inline-flex; margin: 1px; vertical-align: top; @@ -317,21 +317,21 @@ class WanInfoDialog extends WanDialog { white-space: nowrap; max-width: 183px; } - .rgthree-info-dialog .rgthree-info-table td > ul.rgthree-info-trained-words-list > li:hover { + .qq-info-dialog .qq-info-table td > ul.qq-info-trained-words-list > li:hover { background: #333; } - .rgthree-info-dialog .rgthree-info-table td > ul.rgthree-info-trained-words-list > li > svg { + .qq-info-dialog .qq-info-table td > ul.qq-info-trained-words-list > li > svg { width: auto; height: 1em; } - .rgthree-info-dialog .rgthree-info-table td > ul.rgthree-info-trained-words-list > li > span { + .qq-info-dialog .qq-info-table td > ul.qq-info-trained-words-list > li > span { padding-left: 0.3em; padding-right: 0.3em; padding-bottom: 0.1em; text-overflow: ellipsis; overflow: hidden; } - .rgthree-info-dialog .rgthree-info-table td > ul.rgthree-info-trained-words-list > li > small { + .qq-info-dialog .qq-info-table td > ul.qq-info-trained-words-list > li > small { align-self: stretch; display: flex; align-items: center; @@ -339,13 +339,13 @@ class WanInfoDialog extends WanDialog { padding: 0 0.3em; background: rgba(0, 0, 0, 0.2); } - .rgthree-info-dialog .rgthree-info-table td > ul.rgthree-info-trained-words-list > li.-rgthree-is-selected { + .qq-info-dialog .qq-info-table td > ul.qq-info-trained-words-list > li.-qq-is-selected { background: #444; color: #89B; } /* Images styling - match power lora UI */ - .rgthree-info-dialog .rgthree-info-images { + .qq-info-dialog .qq-info-images { list-style: none; padding: 0; margin: 0; @@ -354,7 +354,7 @@ class WanInfoDialog extends WanDialog { flex-direction: row; overflow: auto; } - .rgthree-info-dialog .rgthree-info-images > li { + .qq-info-dialog .qq-info-images > li { scroll-snap-align: start; max-width: 90%; flex: 0 0 auto; @@ -369,15 +369,15 @@ class WanInfoDialog extends WanDialog { position: relative; border: 1px solid #333; } - .rgthree-info-dialog .rgthree-info-images > li figure { + .qq-info-dialog .qq-info-images > li figure { margin: 0; position: static; } - .rgthree-info-dialog .rgthree-info-images > li figure video, - .rgthree-info-dialog .rgthree-info-images > li figure img { + .qq-info-dialog .qq-info-images > li figure video, + .qq-info-dialog .qq-info-images > li figure img { max-height: 45vh; } - .rgthree-info-dialog .rgthree-info-images > li figure figcaption { + .qq-info-dialog .qq-info-images > li figure figcaption { position: absolute; left: 0; width: 100%; @@ -389,7 +389,7 @@ class WanInfoDialog extends WanDialog { transform: translateY(50px); transition: all 0.25s ease-in-out; } - .rgthree-info-dialog .rgthree-info-images > li figure figcaption > span { + .qq-info-dialog .qq-info-images > li figure figcaption > span { display: inline-block; padding: 2px 4px; margin: 1px; @@ -397,7 +397,7 @@ class WanInfoDialog extends WanDialog { border: 1px solid #333; word-break: break-word; } - .rgthree-info-dialog .rgthree-info-images > li figure figcaption > span label { + .qq-info-dialog .qq-info-images > li figure figcaption > span label { display: inline; padding: 0; margin: 0; @@ -405,45 +405,45 @@ class WanInfoDialog extends WanDialog { pointer-events: none; user-select: none; } - .rgthree-info-dialog .rgthree-info-images > li figure figcaption > span a { + .qq-info-dialog .qq-info-images > li figure figcaption > span a { color: #89B; text-decoration: underline; } - .rgthree-info-dialog .rgthree-info-images > li figure figcaption > span a:hover { + .qq-info-dialog .qq-info-images > li figure figcaption > span a:hover { text-decoration: none; } - .rgthree-info-dialog .rgthree-info-images > li figure figcaption > span a svg { + .qq-info-dialog .qq-info-images > li figure figcaption > span a svg { height: 10px; margin-left: 4px; fill: currentColor; } - .rgthree-info-dialog .rgthree-info-images > li figure figcaption:empty { + .qq-info-dialog .qq-info-images > li figure figcaption:empty { text-align: center; } - .rgthree-info-dialog .rgthree-info-images > li figure figcaption:empty::before { + .qq-info-dialog .qq-info-images > li figure figcaption:empty::before { content: "No data."; } - .rgthree-info-dialog .rgthree-info-images > li:hover figure figcaption { + .qq-info-dialog .qq-info-images > li:hover figure figcaption { opacity: 1; transform: translateY(0px); } /* Constrain long prompt text (positive/negative) so the caption doesn't grow past the image and clip off the Copy+ button. */ - .rgthree-info-dialog .rgthree-info-images figure figcaption > span.-info-field-long { + .qq-info-dialog .qq-info-images figure figcaption > span.-info-field-long { display: block; max-height: 8.8em; /* ~8 lines at 11px font */ overflow-y: auto; overscroll-behavior: contain; } - .rgthree-info-dialog .rgthree-info-images figure figcaption > span.-info-field-long > label { + .qq-info-dialog .qq-info-images figure figcaption > span.-info-field-long > label { position: sticky; left: 0; } - .rgthree-info-dialog .rgthree-info-images figure figcaption > span.-info-field-long::-webkit-scrollbar { + .qq-info-dialog .qq-info-images figure figcaption > span.-info-field-long::-webkit-scrollbar { width: 6px; } - .rgthree-info-dialog .rgthree-info-images figure figcaption > span.-info-field-long::-webkit-scrollbar-thumb { + .qq-info-dialog .qq-info-images figure figcaption > span.-info-field-long::-webkit-scrollbar-thumb { background: #444; } `; @@ -503,7 +503,7 @@ class WanInfoDialog extends WanDialog { // Add to success message const itemTypeName = itemType === 'checkpoints' ? 'Model' : 'LoRA'; - rgthree.showMessage({ + qq.showMessage({ id: "refresh-info-" + generateId(4), type: "success", message: `${itemTypeName} information refreshed successfully (preview image generated)`, @@ -511,7 +511,7 @@ class WanInfoDialog extends WanDialog { }); } catch (previewError) { // Still show success message for the refresh itself - rgthree.showMessage({ + qq.showMessage({ id: "refresh-info-" + generateId(4), type: "success", message: "LoRA information refreshed successfully", @@ -520,7 +520,7 @@ class WanInfoDialog extends WanDialog { } } else { // Show success message - rgthree.showMessage({ + qq.showMessage({ id: "refresh-info-" + generateId(4), type: "success", message: "LoRA information refreshed successfully", @@ -529,7 +529,7 @@ class WanInfoDialog extends WanDialog { } } catch (error) { // Show error message - rgthree.showMessage({ + qq.showMessage({ id: "refresh-info-error-" + generateId(4), type: "error", message: "Failed to refresh LoRA information", @@ -564,14 +564,14 @@ class WanInfoDialog extends WanDialog { if (positivePrompt) { await navigator.clipboard.writeText(positivePrompt); - rgthree.showMessage({ + qq.showMessage({ id: "copy-positive-" + generateId(4), type: "success", message: "Positive prompt copied to clipboard", timeout: 3000, }); } else { - rgthree.showMessage({ + qq.showMessage({ id: "copy-positive-error-" + generateId(4), type: "error", message: "No positive prompt found to copy", @@ -580,10 +580,10 @@ class WanInfoDialog extends WanDialog { } } else if (action === "copy-trained-words") { - const selected = queryAll(".-rgthree-is-selected", target.closest("tr")); + const selected = queryAll(".-qq-is-selected", target.closest("tr")); const text = selected.map((el) => el.getAttribute("data-word")).join(", "); await navigator.clipboard.writeText(text); - rgthree.showMessage({ + qq.showMessage({ id: "copy-trained-words-" + generateId(4), type: "success", message: `Successfully copied ${selected.length} key word${selected.length === 1 ? "" : "s"}.`, @@ -591,7 +591,7 @@ class WanInfoDialog extends WanDialog { }); } else if (action === "toggle-trained-word") { - target === null || target === void 0 ? void 0 : target.classList.toggle("-rgthree-is-selected"); + target === null || target === void 0 ? void 0 : target.classList.toggle("-qq-is-selected"); const tr = target.closest("tr"); if (tr) { const span = query("td:first-child > *", tr); @@ -599,7 +599,7 @@ class WanInfoDialog extends WanDialog { if (!small) { small = $el("small", { parent: span }); } - const num = queryAll(".-rgthree-is-selected", tr).length; + const num = queryAll(".-qq-is-selected", tr).length; small.innerHTML = num ? `${num} selected | Copy` : ""; @@ -611,7 +611,7 @@ class WanInfoDialog extends WanDialog { const input = td.querySelector("input,textarea"); if (!input) { const fieldName = tr.dataset["fieldName"]; - tr.classList.add("-rgthree-editing"); + tr.classList.add("-qq-editing"); const isTextarea = fieldName === "userNote"; const input = $el(`${isTextarea ? "textarea" : 'input[type="text"]'}`, { value: td.textContent, @@ -647,15 +647,15 @@ class WanInfoDialog extends WanDialog { const info = this.modelInfo || {}; const civitaiLink = (_a = info.links) === null || _a === void 0 ? void 0 : _a.find((i) => i.includes("civitai.com/models")); const html = ` -