Delete Manual directory

This commit is contained in:
Iván Eduardo Chavez Ayub
2025-10-06 23:00:46 -06:00
committed by GitHub
parent a75a73f041
commit 44d9ffc9ad
4 changed files with 0 additions and 1167 deletions
-585
View File
@@ -1,585 +0,0 @@
% =======================================================================================
% WARLOCK-STUDIO 4.0.1 - USER MANUAL & TECHNICAL DOCUMENTATION
% =======================================================================================
% Manual Version: 8.0 (Updated Edition)
% Author: Iván Eduardo Chavez Ayub (Reviewed and Improved by AI)
%
% This document is a robust and professional LaTeX template designed for
% technical manuals. It includes a clear structure, custom styles, and a
% configuration optimized for readability and aesthetics.
% =======================================================================================
% ---------------------------------------------------------------------------------------
% DOCUMENT SETUP
% ---------------------------------------------------------------------------------------
% \documentclass defines the document type and base options.
% - 11pt: Base font size. A good balance between density and readability.
% - a4paper: Defines the standard international paper size.
\documentclass[11pt, a4paper]{article}
% %%% --- PACKAGE IMPORTS --- %%%
% Packages add new functionalities to LaTeX.
% --- Essential Packages ---
\usepackage[utf8]{inputenc} % Allows writing UTF-8 characters (like accents) directly.
\usepackage[T1]{fontenc} % Modern font encoding for correct display and copying from PDF.
\usepackage[english]{babel} % Support for the English language (hyphenation, etc.).
% --- Page Layout and Design ---
\usepackage{geometry} % For configuring margins and page layout.
\usepackage{graphicx} % For including images (\includegraphics).
\usepackage{fancyhdr} % For customizing headers and footers.
\usepackage{xcolor} % To use colors by name or code (HTML, RGB, etc.).
\usepackage{float} % Provides the [H] specifier to "float exactly here".
% --- Typography and Text Style ---
% \usepackage{firasans} % EXAMPLE: Modern Sans-Serif font (keep commented if not installed).
\usepackage{textcomp} % Provides additional symbols like the copyright symbol.
\usepackage{fontawesome5} % Allows using Font Awesome icons (e.g., \faInfoCircle).
% --- Tables, Lists, and Boxes ---
\usepackage{booktabs} % For creating professional-looking tables (\toprule, \midrule, \bottomrule).
\usepackage{longtable} % For tables that can span multiple pages.
\usepackage{tabularx} % For tables with flexible-width columns that occupy the full text width.
\usepackage{array} % Advanced tools for table columns.
\usepackage{enumitem} % For advanced control over the format of lists (itemize, enumerate).
\usepackage{tcolorbox} % For creating colored and customizable text boxes.
\usepackage{titlesec} % For customizing the format of section titles (\section, \subsection).
\usepackage{titletoc} % Control over the table of contents.
% --- Utilities and Links ---
\usepackage{hyperref} % To create hyperlinks within the document and to external URLs.
% It's good practice to load it last.
% %%% --- PAGE GEOMETRY SETUP --- %%%
% Defines the margins and spaces for the header/footer.
\geometry{
a4paper, % Paper size
margin=2.5cm, % Uniform margin for all sides
headheight=15pt, % Height reserved for the header
footskip=30pt % Distance from the bottom of the text to the footer
}
% %%% --- CUSTOM COLOR PALETTE --- %%%
% A corporate color palette is defined to maintain visual consistency.
% The HTML model is used for easy selection from design tools.
\definecolor{WarlockRed}{HTML}{C11919}
\definecolor{WarlockGold}{HTML}{ECD125}
\definecolor{WarlockDark}{HTML}{212325}
\definecolor{WarlockGray}{HTML}{333333}
\definecolor{WarlockLightGray}{HTML}{F5F5F5}
\definecolor{WarlockBlue}{HTML}{005A9B}
\definecolor{InfoBlue}{HTML}{E7F3FE}
\definecolor{WarnYellow}{HTML}{FFFBE6}
\definecolor{WarnBorder}{HTML}{FFBE0B}
% Sets the default text color for the entire document.
\color{WarlockGray}
% %%% --- HYPERLINK CONFIGURATION --- %%%
% Customizes the appearance of links generated by 'hyperref'.
\hypersetup{
colorlinks=true, % Links will be colored instead of boxed.
linkcolor=WarlockRed, % Color for internal links (to sections, figures, etc.).
filecolor=WarlockRed, % Color for links to local files.
urlcolor=WarlockRed, % Color for links to external URLs.
pdftitle={Warlock-Studio 4.0.1 User Manual & Technical Documentation}, % PDF metadata.
pdfauthor={Iván Eduardo Chavez Ayub (Reviewed by AI)} % PDF metadata.
}
% %%% --- SECTION TITLE STYLE --- %%%
% 'titlesec' is used to define a custom style for sections.
% \titleformat{<command>}[<shape>]{<format>}{<label>}{<sep>}{<before-code>}
\titleformat{\section}
{\normalfont\Large\bfseries\color{WarlockRed}} % Title format: Normal font, Large, bold, red color.
{\thesection.} % Label: The section number followed by a period.
{1em} % Horizontal separation between the label and the title.
{} % Code to execute before the title (none in this case).
\titleformat{\subsection}
{\normalfont\large\bfseries\color{WarlockRed!70!black}} % Similar to \section, but with a darker color.
{\thesubsection.}
{1em}
{}
% \titlespacing*{<command>}{<left-space>}{<before-space>}{<after-space>}
\titlespacing*{\section}
{0pt} % Space to the left of the title.
{3.5ex plus 1ex minus .2ex} % Vertical space BEFORE the title (with flexibility).
{2.3ex plus .2ex} % Vertical space AFTER the title (with flexibility).
% %%% --- CUSTOM TEXT BOX DEFINITIONS --- %%%
% 'tcolorbox' is used to create "box" environments for information and warnings.
\tcbuselibrary{skins, breakable} % Additional libraries are loaded for more styles.
% 'breakable' allows boxes to split across pages.
% Box for general information.
\newtcolorbox{infobox}{
colback=InfoBlue, % Background color of the box.
colframe=WarlockBlue, % Border color.
fonttitle=\bfseries, % Font for the box title (bold).
coltitle=WarlockBlue, % Color of the title text.
title=\faInfoCircle\hspace{0.5em} Information, % Title content (icon + text).
breakable, % Allows the box to split across pages.
pad at break=2mm, % Internal padding when the box breaks.
enhanced, % Activates advanced rendering modes.
% drop shadow={WarlockGray!50!white} % Shadow effects removed due to library compatibility
}
% Box for important warnings.
\newtcolorbox{warnbox}{
colback=WarnYellow,
colframe=WarnBorder,
fonttitle=\bfseries,
coltitle=WarnBorder!80!black,
title=\faExclamationTriangle\hspace{0.5em} Warning,
breakable,
pad at break=2mm,
enhanced,
% drop shadow={WarnBorder!50!white} % Shadow effects removed due to library compatibility
}
% Custom command to format inline code.
% \newcommand{<name>}[<args>]{<definition>}
\newcommand{\inlinecode}[1]{\colorbox{WarlockLightGray}{\small\texttt{#1}}}
% %%% --- HEADER AND FOOTER SETUP --- %%%
% 'fancyhdr' is used to control the content of headers and footers.
\pagestyle{fancy}
\fancyhf{} % Clears all header and footer fields.
% \fancyhead[L/C/R]{...} defines the header content (Left, Center, Right).
\fancyhead[L]{\textit{Warlock-Studio 4.0.1}}
\fancyhead[R]{\leftmark} % \leftmark displays the current section name.
% \fancyfoot[L/C/R]{...} defines the footer content.
\fancyfoot[L]{\includegraphics[height=0.8cm]{logo.png}} % Assumes 'logo.png' is in the same folder.
\fancyfoot[C]{\thepage} % Displays the current page number.
\fancyfoot[R]{\textcopyright~2025 Warlock-Studio}
% Defines the thickness of the separator lines.
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
% Redefines how the section mark is generated to include the number.
\renewcommand{\sectionmark}[1]{\markboth{\thesection. #1}{}}
% =======================================================================================
% BEGIN DOCUMENT BODY
% =======================================================================================
\begin{document}
% %%% --- TITLE PAGE --- %%%
% A striking and professional cover page is created using a full-page 'tcolorbox'.
\begin{titlepage}
\begin{tcolorbox}[
%--- Box Style ---
colback=WarlockDark, % Dark background.
colframe=WarlockGold, % Gold border.
sharp corners, % Straight corners instead of rounded.
boxrule=1.5pt, % Border thickness.
%--- Alignment and Size ---
halign=center, % Horizontal content alignment.
valign=center, % Vertical content alignment.
height=\dimexpr\textheight-1cm\relax % Box height (full text height minus 1cm).
]
%--- Cover Page Content ---
\centering % Centers the internal elements.
\includegraphics[width=0.5\textwidth]{logo.png}\par % Logo.
\vfill % Flexible space to push content.
\color{white} % Changes text color to white for contrast.
{\Huge\bfseries Warlock-Studio\par}
\vspace{0.7cm} % Fixed vertical space.
{\Large -- User Manual \& Technical Documentation --\par}
\vspace{0.2cm}
{\Large Version 4.0.1\par}
\vfill % Another flexible space.
{\large Iván Eduardo Chavez Ayub\par}
\href{https://github.com/Ivan-Ayub97}{\texttt{\color{WarlockGold}@Ivan-Ayub97 on GitHub}}\par % Styled link.
\vspace{1.5cm}
{\large \today\par} % Displays the compilation date.
\end{tcolorbox}
\thispagestyle{empty} % Hides header and footer on the cover page.
\end{titlepage}
% %%% --- ABSTRACT AND TABLE OF CONTENTS --- %%%
\pagestyle{fancy} % Restores the 'fancy' page style after the cover page.
% The 'abstract' environment creates a summary of the document.
\begin{abstract}
\noindent % Prevents indentation on the first line.
\textbf{Warlock-Studio 4.0.1 Technical Documentation}
\textbf{Target Audience:} Technical users, system administrators, content creators, and AI enthusiasts seeking in-depth understanding of AI-powered media enhancement workflows.
\textbf{Coverage:} Installation procedures, system architecture, AI model specifications, performance optimization, error resolution, and advanced use cases.
\end{abstract}
\newpage % Page break before the table of contents.
\tableofcontents % Generates the table of contents automatically.
\newpage % Page break after the table of contents.
% %%% --- MAIN BODY OF THE MANUAL --- %%%
% --- Section 1: Introduction ---
\section{Introduction}
Warlock-Studio is an AI-powered media enhancement and upscaling suite, designed to deliver high-quality results through an accessible user interface. Version 4.0.1 introduces a revolutionary smart AI model distribution system that automatically downloads required components on first launch, reducing installer size from 1.4GB to just 150MB. Additionally, it includes key enhancements in GPU management, error handling, and performance efficiency, solidifying its position as a powerful tool for professional content creators.
\subsection{What's New in Version 4.0.1}
The latest version brings the following key enhancements:
% 'itemize' is used for bulleted lists. [leftmargin=*] aligns the list with the paragraph margin.
\begin{itemize}[leftmargin=*]
\item \textbf{Smart AI Model Distribution:} Revolutionary lightweight installer (150MB vs 1.4GB) with automatic AI model download system that fetches models (327MB) on first launch.
\item \textbf{Enhanced AI Architecture:} Implemented robust `AI\_model\_base` class with comprehensive error handling and GPU acceleration support.
\item \textbf{Code Quality Improvements:} Fixed critical import errors, consolidated duplicate code sections, and improved type annotations for better maintainability.
\item \textbf{Improved Error Handling:} Added graceful degradation mechanisms that prevent crashes and provide meaningful error messages.
\item \textbf{Model Optimization:} Streamlined AI model collection for improved stability and compatibility across different hardware configurations.
\end{itemize}
\subsection{Main Features}
\begin{itemize}[leftmargin=*]
\item \textbf{AI Upscaling:} Uses state-of-the-art models like Real-ESRGAN, BSRGAN, and SRVGGNetCompact.
\item \textbf{Frame Interpolation:} Increases FPS or creates smooth slow-motion effects using RIFE models.
\item \textbf{Noise Reduction:} Includes dedicated IRCNN models for cleaning images and videos.
\item \textbf{Face Restoration:} GFPGAN model for enhancing and restoring faces in photos.
\item \textbf{Hardware Acceleration:} Uses the ONNX Runtime engine with the DirectML provider (\texttt{DmlExecutionProvider}) for GPU acceleration compatible with DirectX 12.
\item \textbf{Advanced Video Encoding:} Supports hardware-accelerated encoders from NVIDIA (NVENC), AMD (AMF), and Intel (QSV).
\item \textbf{Smart Model Distribution:} Automatic AI model download system (327MB) on first launch, reducing installer size from 1.4GB to 150MB.
\end{itemize}
% --- Section 2: Installation ---
\section{Installation and Program Architecture}
\subsection{Smart AI Model Distribution System}
\begin{infobox}
Warlock-Studio 4.0 introduces a revolutionary AI model distribution system that automatically downloads required components during the application's first launch.
\end{infobox}
\subsubsection{Advantages of the New System}
\begin{itemize}[leftmargin=*]
\item \textbf{Lightweight Installer:} 78\% size reduction (from 1.4GB to ~150MB)
\item \textbf{Smart Download:} AI models (327MB) are automatically downloaded on first use
\item \textbf{Multiple Sources:} Redundant URLs (GitHub, SourceForge) ensure availability
\item \textbf{Progress Tracking:} Visual indicators show download speed and completion percentage
\item \textbf{Error Recovery:} Automatic retry mechanisms and clear error messages
\item \textbf{Resume Support:} Interrupted downloads can be resumed seamlessly
\end{itemize}
\subsubsection{Automatic Download Process}
When starting Warlock-Studio for the first time, the system will perform the following operations:
\begin{enumerate}[leftmargin=*]
\item \textbf{Model Verification:} Checks if AI models are present
\item \textbf{Confirmation Dialog:} Requests permission to download 327MB of AI models
\item \textbf{Progressive Download:} Shows real-time progress with visual indicators
\item \textbf{Integrity Validation:} Verifies that downloaded files are complete
\item \textbf{Automatic Extraction:} Decompresses and organizes models in the correct structure
\end{enumerate}
\subsubsection{Offline Setup and Manual Configuration}
For users with limited connectivity or specific preferences:
\begin{description}[leftmargin=*, style=nextline]
\item[Offline Installation:] Models can be downloaded separately and manually placed in the \texttt{AI-onnx} folder
\item[Manual Location:] Download \texttt{AI-onnx-models.zip} from GitHub Releases and extract to the installation directory
\item[File Verification:] The application will automatically verify the presence of all required models
\end{description}
\subsection{System Requirements}
% 'table' is used for tables that don't split across pages. [H] forces its position.
\begin{table}[H]
\centering % Centers the table on the page.
% 'tabular' is the environment that draws the table. {ll} defines two left-aligned columns.
\begin{tabular}{ll}
\toprule % Top line of the table (from booktabs).
\textbf{Component} & \textbf{Requirement} \\
\midrule % Middle line of the table (from booktabs).
Operating System & Windows 10 (64-bit) or later \\
RAM & 8 GB (Minimum), 16 GB (Recommended) \\
Graphics Card (GPU) & \textbf{DirectX 12} compatible. \textbf{Recommended: 4+ GB VRAM}. \\
Storage & 2 GB of free space. An SSD is recommended for better performance. \\
\bottomrule % Bottom line of the table (from booktabs).
\end{tabular}
\caption{Hardware and software requirements for Warlock-Studio 4.0.}
\end{table}
\subsection{File Structure and Dependencies}
\begin{infobox}
Warlock-Studio is a self-contained application. The following components are included in the installation and require no action from the user.
\end{infobox}
\begin{itemize}[leftmargin=*]
\item \inlinecode{ffmpeg.exe:} Located in the \texttt{Assets} folder, it is the engine for all video manipulation, encoding, and decoding.
\item \inlinecode{exiftool.exe:} Also in \texttt{Assets}, it is used to read and write metadata (EXIF, XMP), ensuring that the original file information is preserved.
\item \textbf{AI Models:} The models in \texttt{.onnx} format are located in the \texttt{AI-onnx} folder.
\item \textbf{User Preferences:} A file named \texttt{Warlock-Studio\_4.0\_UserPreference.json} is saved in the user's \textbf{Documents} folder.
\item \textbf{Logs:} Log files are stored in \texttt{Documents\textbackslash Warlock-Studio\_4.0\_Logs}.
\end{itemize}
% --- Section 3: Model Guide ---
\section{Detailed Guide to AI Models}
The choice of AI model is the most important factor for quality and processing time.
\subsection{Model Comparison Table}
The following table details the relative VRAM usage of each model.
% 'longtable' with adjusted column widths to fit page margins
% Using tabularx for better column control and text wrapping
\begin{longtable}{p{2.8cm} p{1.8cm} p{1.2cm} p{1.5cm} p{7.2cm}}
\toprule
\textbf{Model} & \textbf{Function} & \textbf{Scale} & \textbf{VRAM (GB)} & \textbf{Recommended Use Case \& Details} \\
\midrule
\endhead % \endhead defines the header that will be repeated on each page.
\multicolumn{5}{c}{\textit{\textbf{Denoising Models}}} \\
\midrule
\texttt{IRCNN\_Mx1} & Denoise & x1 & 4.0 & Moderate noise reduction. Good for cleaning old photos with medium artifact levels. \\
\texttt{IRCNN\_Lx1} & Denoise & x1 & 4.0 & Intense noise reduction. Best for heavily degraded images with severe artifacts. \\
\midrule
\multicolumn{5}{c}{\textit{\textbf{High-Quality Upscaling Models (Slower Processing)}}} \\
\midrule
\texttt{BSRGANx4} & Upscale & x4 & 0.6 & Realistic photos with excellent fine detail preservation. Best for portraits and natural scenes. \\
\texttt{BSRGANx2} & Upscale & x2 & 0.7 & Similar quality to x4 variant but for moderate upscaling needs. Faster processing. \\
\texttt{RealESRGANx4} & Upscale & x4 & 0.6 & General purpose model. Excellent for textures and mixed content types. \\
\texttt{RealESRNetx4} & Upscale & x4 & 2.2 & Alternative to RealESRGAN. May offer better speed-quality balance on some systems. \\
\midrule
\multicolumn{5}{c}{\textit{\textbf{High-Speed Upscaling Models (Lightweight)}}} \\
\midrule
\texttt{RealESR\_Gx4} & Upscale & x4 & 2.2 & Fast processing ideal for videos. Good balance of speed and quality. \\
\texttt{RealESR\_Animex4} & Upscale & x4 & 2.2 & Specialized for anime, cartoons, and illustrated content. Preserves artistic style. \\
\midrule
\multicolumn{5}{c}{\textit{\textbf{Face Restoration Models}}} \\
\midrule
\texttt{GFPGAN} & Restore & x1 & 1.8 & AI-powered face enhancement and restoration. Repairs damaged faces in old photos. \\
\midrule
\multicolumn{5}{c}{\textit{\textbf{Frame Interpolation Models (Video Only)}}} \\
\midrule
\texttt{RIFE} & Interpolate & N/A & N/A & Maximum interpolation quality. Creates smooth motion between frames for high FPS. \\
\texttt{RIFE\_Lite} & Interpolate & N/A & N/A & Optimized version for GPUs with limited VRAM (< 4 GB). Faster processing. \\
\midrule
\bottomrule
\caption{Comprehensive guide to AI model selection and VRAM requirements.}
\label{tab:modelos}
\end{longtable}
% --- Section 4: Optimization ---
\section{Configuration and Performance Optimization}
\subsection{Critical Performance Parameters}
\begin{itemize}[leftmargin=*]
\item \textbf{Input Resolution \%:} The most effective adjustment for speed. It reduces the resolution before processing it with AI. A value between \textbf{50\% and 75\%} is usually ideal.
\item \textbf{GPU VRAM Limiter (GB):} Define your GPU's VRAM. It is used to calculate the size of the processing \textit{tiles} and prevent memory errors.
\item \textbf{AI Multithreading:} For videos only. It processes multiple frames in parallel, speeding up the process but consuming more VRAM and CPU.
\item \textbf{AI Blending:} Blends the original image with the processed image. Useful for reducing artifacts when using a low \textit{Input Resolution}.
\item \textbf{Frame Generation:} For RIFE models, allows creating interpolated frames for higher FPS or slow-motion effects.
\end{itemize}
\subsection{The User Preferences File}
The Warlock-Studio4.0 UserPreference.json file saves your settings.
% 'tabularx' is used for the table to automatically occupy 100% of the text width.
% The 'X' column is a flexible column that expands to fill the available space.
\begin{table}[H]
\centering
\small % Reduces the font size inside the table.
\begin{tabularx}{\textwidth}{l X}
\toprule
\textbf{JSON Key} & \textbf{Description} \\
\midrule
\texttt{default\_AI\_model} & The last selected AI model. \\
\texttt{default\_AI\_multithreading} & The number of processing threads for video. \\
\texttt{default\_gpu} & The last selected GPU (Auto, GPU 1, etc.). \\
\texttt{default\_keep\_frames} & Whether to keep the video frames ("ON" or "OFF"). \\
\texttt{default\_image\_extension} & Default image extension (\texttt{.png}, \texttt{.jpg}, etc.). \\
\texttt{default\_video\_extension} & Default video extension (\texttt{.mp4}, \texttt{.mkv}, etc.). \\
\texttt{default\_video\_codec} & The default video encoder (x264, hevc\_nvenc, etc.). \\
\texttt{default\_blending} & The selected blending level (Low, Medium, High). \\
\texttt{default\_output\_path} & The last selected output path. \\
\texttt{default\_input\_resize\_factor} & The input resolution percentage value. \\
\texttt{default\_output\_resize\_factor} & The output resolution percentage value. \\
\texttt{default\_VRAM\_limiter} & The GPU VRAM limiter value. \\
\bottomrule
\end{tabularx}
\caption{Keys saved in the user preferences file.}
\end{table}
% --- Section 5: Troubleshooting ---
\section{Advanced Troubleshooting Guide}
\begin{warnbox}
The \textbf{Number 1} cause of errors is \textbf{special characters} in file paths and names. Avoid using: \texttt{', ", @, \#, \$, \%, \&, *, [, ], ?, etc.}.
\end{warnbox}
% 'description' is for definition lists.
% [style=nextline] places the text on the line following the term.
\begin{description}[leftmargin=*, style=nextline, itemsep=0.8em]
\item[\faBan\ Error: "FFmpeg encoding failed: Invalid argument"]
\textbf{Cause:} Invalid file name or path.
\textbf{Solution:} Rename the file and/or its containing folder, removing any special characters.
\item[\faMemory\ Error: "out of memory" or unexpected crash]
\textbf{Cause:} The GPU ran out of video memory (VRAM).
\textbf{Solution:}
% 'enumerate' is for numbered lists. 'nosep' reduces space between items.
\begin{enumerate}[nosep, leftmargin=*]
\item Lower the \textbf{VRAM Limiter} to a value equal to or less than your GPU's actual VRAM.
\item Lower the \textbf{Input Resolution \%} to 75\% or less.
\item For videos, decrease the \textbf{AI Multithreading} threads or turn it "OFF".
\item The application will try to recover from this error automatically.
\end{enumerate}
\item[\faTachometerAlt\ Error: "cannot convert float NaN to integer"]
\textbf{Cause:} GPU driver timeout, often due to overload or overheating.
\textbf{Solution:} Restart the process \textbf{without deleting the generated frames folder}. The application will read the existing frames and resume work from where it failed.
\item[\faVolumeMute\ Issue: Output video has no audio]
\textbf{Cause:} The original video had no audio track, a \textit{Slowmotion} mode was used, or the audio codec was incompatible.
\textbf{Solution:} The program first tries to copy the audio stream directly. If that fails, it tries to re-encode to AAC. If all fails, it saves the video without audio. Using the \inlinecode{.mkv} container for the output may help.
\item[\faQuestionCircle\ Issue: Application won't open or closes on startup]
\textbf{Cause:} Corrupt settings, lack of permissions, or an environment error.
\textbf{Solution:}
\begin{enumerate}[nosep, leftmargin=*]
\item Go to your \textbf{Documents} folder and delete the \inlinecode{Warlock-Studio_4.0_UserPreference.json} file.
\item Check the log files in \texttt{Documents\textbackslash Warlock-Studio_4.0_Logs} for detailed error messages.
\item Ensure your GPU drivers are up to date.
\end{enumerate}
\item[\faExclamationTriangle\ Issue: Frame interpolation not working]
\textbf{Cause:} RIFE models are not selected or incompatible video format.
\textbf{Solution:} Ensure you have selected a RIFE model (RIFE or RIFE\_Lite) and that the frame generation option is properly configured.
\end{description}
% --- Section 6: Architecture ---
\section{Advanced Architecture and Processes}
\subsection{Inference Engine and Hardware Acceleration}
Warlock-Studio uses \textbf{ONNX Runtime} with the \textbf{DirectML} provider (\inlinecode{DmlExecutionProvider}). This translates AI operations into \textbf{DirectX 12} calls, ensuring broad compatibility with NVIDIA, AMD, and Intel GPUs.
\subsection{Tiling System and Memory Management}
To handle high-resolution files, the application splits each frame into fragments (\textit{tiles}). The size of these tiles is dynamically calculated using the \textbf{VRAM Limiter}. Additionally, Python's garbage collector (\inlinecode{gc.collect()}) is invoked to force memory release and ensure stability.
\subsection{Resume and Checkpoint Functionality}
If a video process is interrupted, the processed frames are saved. When restarting the task, the \inlinecode{check\_video\_upscaling\_resume} function detects these files and resumes work from where it left off, saving time.
\subsection{Asynchronous Frame Writing}
During video upscaling, the frames processed by the GPU are sent to a separate writer thread. This allows the GPU to immediately start processing the next batch without waiting for the (slower) disk writing operation to finish, thus maximizing performance.
\subsection{Frame Interpolation Pipeline}
The RIFE models use a specialized interpolation pipeline that analyzes motion between frames to generate smooth intermediate frames. This enables higher frame rates or slow-motion effects with minimal artifacts.
\subsection{Logging System and Diagnostics}
Warlock-Studio implements a comprehensive logging system that includes:
\begin{itemize}[leftmargin=*]
\item \textbf{Process Logs:} Record every stage of AI processing
\item \textbf{Error Logs:} Capture detailed errors with stack traces
\item \textbf{Performance Logs:} Measure processing times and resource usage
\item \textbf{Debug Logs:} Detailed information for troubleshooting
\end{itemize}
\subsection{Version 4.0.1 Update Notice}
\begin{warnbox}
The SuperResolution-10 model has been removed in version 4.0.1 due to compatibility conflicts with certain hardware configurations. Users requiring extreme upscaling should use BSRGANx4 or RealESRGANx4 models in combination with multiple processing passes for similar results.
\end{warnbox}
\subsection{Performance Monitoring and Metrics}
The application provides detailed performance metrics:
\begin{description}[leftmargin=*, style=nextline]
\item[Processing Speed:] Frames per second (FPS) and images per minute metrics
\item[Memory Usage:] Real-time VRAM and system RAM monitoring
\item[GPU Utilization:] DirectML provider performance statistics
\item[Disk I/O:] Read/write speeds for temporary frame storage
\end{description}
\section{Advanced Error Resolution and System Diagnostics}
\subsection{GPU Memory Management and VRAM Optimization}
Warlock-Studio implements sophisticated GPU memory management:
\begin{description}[leftmargin=*, style=nextline]
\item[Dynamic Tile Sizing:] Automatically calculates optimal tile sizes based on available VRAM
\item[Memory Pool Management:] Pre-allocates and reuses memory buffers to reduce allocation overhead
\item[Garbage Collection Integration:] Forces Python garbage collection at strategic points to free unused memory
\item[VRAM Monitoring:] Real-time monitoring of GPU memory usage with automatic fallback to smaller tiles
\end{description}
\subsection{Model Loading and Initialization Troubleshooting}
\begin{warnbox}
Model loading failures are often caused by corrupted ONNX files, insufficient system permissions, or DirectML provider initialization errors.
\end{warnbox}
\begin{description}[leftmargin=*, style=nextline]
\item[Model File Corruption:] Verify model file integrity by checking file sizes against expected values
\item[Provider Initialization Failures:] Check DirectML compatibility and ensure DirectX 12 is properly installed
\item[Permission Issues:] Run application as administrator if model loading fails consistently
\end{description}
\subsection{Video Processing Pipeline Diagnostics}
The video processing pipeline consists of several stages that can be individually diagnosed:
\begin{enumerate}[leftmargin=*]
\item \textbf{Frame Extraction:} Verify FFmpeg can read the input video format
\item \textbf{AI Processing:} Monitor VRAM usage and processing times per frame
\item \textbf{Frame Assembly:} Check for missing or corrupted intermediate frames
\item \textbf{Video Encoding:} Validate codec compatibility and hardware encoder availability
\end{enumerate}
\subsection{Performance Optimization Guidelines}
\begin{table}[H]
\centering
\small
\begin{tabularx}{\textwidth}{l X}
\toprule
\textbf{Scenario} & \textbf{Recommended Settings} \\
\midrule
Low VRAM (< 4GB) & Input Resolution: 50\%, Multithreading: OFF, Use RIFE\_Lite \\
Medium VRAM (4-8GB) & Input Resolution: 75\%, Multithreading: 2-4 threads, Standard models \\
High VRAM (> 8GB) & Input Resolution: 100\%, Multithreading: 6-8 threads, High-quality models \\
SSD Storage & Keep frames: ON for faster resume, Use higher multithreading \\
HDD Storage & Keep frames: OFF to save space, Lower multithreading to reduce I/O \\
\bottomrule
\end{tabularx}
\caption{Optimization settings based on system configuration.}
\end{table}
\subsection{Log File Analysis and Debugging}
Warlock-Studio generates comprehensive logs in the Documents folder:
\begin{description}[leftmargin=*, style=nextline]
\item[warlock\_studio.log:] General application events, model loading, and processing status
\item[error\_log.txt:] Detailed error messages with Python stack traces
\item[performance\_log.txt:] Processing times, memory usage, and performance metrics
\end{description}
\subsection{Common Error Patterns and Solutions}
\begin{longtable}{p{4cm} p{5cm} p{6cm}}
\toprule
\textbf{Error Pattern} & \textbf{Typical Cause} & \textbf{Solution Strategy} \\
\midrule
\endhead
"DirectML device not found" & GPU drivers outdated or DirectX 12 not supported & Update GPU drivers, verify DirectX 12 compatibility \\
"ONNX Runtime initialization failed" & Corrupted model files or insufficient permissions & Re-download models, run as administrator \\
"FFmpeg process terminated" & Unsupported codec or corrupted input file & Convert input to supported format (MP4, H.264) \\
"Tile processing timeout" & GPU overheating or driver instability & Reduce tile size, check GPU temperature, update drivers \\
"Memory allocation failed" & System RAM exhausted & Close other applications, reduce multithreading \\
\bottomrule
\caption{Common error patterns and resolution strategies.}
\end{longtable}
% =======================================================================================
% END OF DOCUMENT
% =======================================================================================
\end{document}
-582
View File
@@ -1,582 +0,0 @@
% ---------------------------------------------------------------------------------------
% CONFIGURACIÓN DEL DOCUMENTO
% ---------------------------------------------------------------------------------------
% \documentclass define el tipo de documento y las opciones base.
% - 11pt: Tamaño de fuente base. Un buen equilibrio entre densidad y legibilidad.
% - a4paper: Define el tamaño del papel estándar internacional.
\documentclass[11pt, a4paper]{article}
% %%% --- IMPORTACIÓN DE PAQUETES --- %%%
% Los paquetes añaden nuevas funcionalidades a LaTeX.
% --- Paquetes Esenciales ---
\usepackage[utf8]{inputenc} % Permite escribir caracteres UTF-8 (acentos, ñ) directamente.
\usepackage[T1]{fontenc} % Codificación de fuentes moderna para una correcta visualización y copiado de PDF.
\usepackage[spanish,es-noshorthands]{babel} % Soporte para el idioma español. La opción 'es-noshorthands' es
% CRÍTICA para evitar conflictos con otros paquetes.
% --- Configuración de Página y Diseño ---
\usepackage{geometry} % Para configurar los márgenes y el diseño de la página.
\usepackage{graphicx} % Para incluir imágenes (\includegraphics).
\usepackage{fancyhdr} % Para personalizar encabezados y pies de página.
\usepackage{xcolor} % Para usar colores por nombre o código (HTML, RGB, etc.).
\usepackage{float} % Proporciona el especificador [H] para "flotar aquí exactamente".
% --- Tipografía y Estilo de Texto ---
% \usepackage{firasans} % EJEMPLO: Fuente Sans-Serif moderna (mantener comentada si no está instalada).
\usepackage{textcomp} % Provee símbolos adicionales como el de copyright.
\usepackage{fontawesome5} % Permite usar iconos de Font Awesome (ej: \faInfoCircle).
% --- Tablas, Listas y Cajas ---
\usepackage{booktabs} % Para crear tablas de aspecto profesional (\toprule, \midrule, \bottomrule).
\usepackage{longtable} % Para tablas que pueden ocupar varias páginas.
\usepackage{tabularx} % Para tablas con columnas de ancho flexible que ocupan todo el ancho del texto.
\usepackage{array} % Herramientas avanzadas para columnas en tablas.
\usepackage{enumitem} % Para un control avanzado sobre el formato de las listas (itemize, enumerate).
\usepackage{tcolorbox} % Para crear cajas de texto coloreadas y personalizables.
\usepackage{titlesec} % Para personalizar el formato de los títulos de sección (\section, \subsection).
\usepackage{titletoc} % Control sobre la tabla de contenidos.
% --- Utilidades y Enlaces ---
\usepackage{hyperref} % Para crear hipervínculos dentro del documento y a URLs externas.
% Es una buena práctica cargarlo al final.
% %%% --- CONFIGURACIÓN DE GEOMETRÍA DE LA PÁGINA --- %%%
% Se definen los márgenes y espacios para el encabezado/pie de página.
\geometry{
a4paper, % Tamaño de papel
margin=2.5cm, % Margen uniforme para todos los lados
headheight=15pt, % Altura reservada para el encabezado
footskip=30pt % Distancia desde el final del texto hasta el pie de página
}
% %%% --- PALETA DE COLORES PERSONALIZADA --- %%%
% Se define una paleta de colores corporativa para mantener la consistencia visual.
% Se usa el modelo HTML para una fácil selección desde herramientas de diseño.
\definecolor{WarlockRed}{HTML}{C11919}
\definecolor{WarlockGold}{HTML}{ECD125}
\definecolor{WarlockDark}{HTML}{212325}
\definecolor{WarlockGray}{HTML}{333333}
\definecolor{WarlockLightGray}{HTML}{F5F5F5}
\definecolor{WarlockBlue}{HTML}{005A9B}
\definecolor{InfoBlue}{HTML}{E7F3FE}
\definecolor{WarnYellow}{HTML}{FFFBE6}
\definecolor{WarnBorder}{HTML}{FFBE0B}
% Se establece el color de texto por defecto para todo el documento.
\color{WarlockGray}
% %%% --- CONFIGURACIÓN DE HIPERVÍNCULOS --- %%%
% Se personaliza la apariencia de los enlaces generados por 'hyperref'.
\hypersetup{
colorlinks=true, % Los enlaces serán coloreados en lugar de encajonados.
linkcolor=WarlockRed, % Color para enlaces internos (a secciones, figuras, etc.).
filecolor=WarlockRed, % Color para enlaces a archivos locales.
urlcolor=WarlockRed, % Color para enlaces a URLs externas.
pdftitle={Warlock-Studio 4.0.1 Guía de Usuario \& Documentación Técnica}, % Metadatos del PDF.
pdfauthor={Iván Eduardo Chavez Ayub (Revisado por IA)} % Metadatos del PDF.
}
% %%% --- ESTILO DE TÍTULOS DE SECCIÓN --- %%%
% Se usa 'titlesec' para definir un estilo personalizado para las secciones.
% \titleformat{command}[forma]{formato}{etiqueta}{separación}{código-antes}
\titleformat{\section}
{\normalfont\Large\bfseries\color{WarlockRed}} % Formato del título: Fuente normal, grande, negrita, color rojo.
{\thesection.} % Etiqueta: El número de la sección seguido de un punto.
{1em} % Separación horizontal entre la etiqueta y el título.
{} % Código a ejecutar antes del título (en este caso, ninguno).
\titleformat{\subsection}
{\normalfont\large\bfseries\color{WarlockRed!70!black}} % Similar a \section, pero con un color más oscuro.
{\thesubsection.}
{1em}
{}
% \titlespacing*{command}{espacio-izq}{espacio-arriba}{espacio-abajo}
\titlespacing*{\section}
{0pt} % Espaciado a la izquierda del título.
{3.5ex plus 1ex minus .2ex} % Espaciado vertical ANTES del título (con flexibilidad).
{2.3ex plus .2ex} % Espaciado vertical DESPUÉS del título (con flexibilidad).
% %%% --- DEFINICIÓN DE CAJAS DE TEXTO PERSONALIZADAS --- %%%
% Se usa 'tcolorbox' para crear entornos de "cajas" para información y advertencias.
\tcbuselibrary{skins, breakable} % Se cargan bibliotecas adicionales para más estilos.
% 'breakable' permite que las cajas se dividan entre páginas.
% Caja para información general.
\newtcolorbox{infobox}{
colback=InfoBlue, % Color de fondo de la caja.
colframe=WarlockBlue, % Color del borde.
fonttitle=\bfseries, % Fuente del título de la caja (negrita).
coltitle=WarlockBlue, % Color del texto del título.
title=\faInfoCircle\hspace{0.5em} Información, % Contenido del título (icono + texto).
breakable, % Permite que la caja se parta entre páginas.
pad at break=2mm, % Espaciado interno cuando la caja se rompe.
enhanced, % Activa modos de renderizado avanzados.
% drop shadow={WarlockGray!50!white} % Efectos de sombra removidos por compatibilidad
}
% Caja para advertencias importantes.
\newtcolorbox{warnbox}{
colback=WarnYellow,
colframe=WarnBorder,
fonttitle=\bfseries,
coltitle=WarnBorder!80!black,
title=\faExclamationTriangle\hspace{0.5em} Advertencia,
breakable,
pad at break=2mm,
enhanced,
% drop shadow={WarnBorder!50!white} % Efectos de sombra removidos por compatibilidad
}
% Comando personalizado para formatear código en línea.
% \newcommand{nombre}[argumentos]{definición}
\newcommand{\inlinecode}[1]{\colorbox{WarlockLightGray}{\small\texttt{#1}}}
% %%% --- CONFIGURACIÓN DE ENCABEZADO Y PIE DE PÁGINA --- %%%
% Se usa 'fancyhdr' para controlar el contenido de encabezados y pies.
\pagestyle{fancy}
\fancyhf{} % Limpia todos los campos del encabezado y pie de página.
% \fancyhead[L/C/R]{...} define el contenido de la cabecera (Izquierda, Centro, Derecha).
\fancyhead[L]{\textit{Warlock-Studio 4.0.1}}
\fancyhead[R]{\leftmark} % \leftmark muestra el nombre de la sección actual.
% \fancyfoot[L/C/R]{...} define el contenido del pie de página.
\fancyfoot[L]{\includegraphics[height=0.8cm]{logo.png}} % Asume que 'logo.png' está en la misma carpeta.
\fancyfoot[C]{\thepage} % Muestra el número de página actual.
\fancyfoot[R]{\textcopyright~2025 Warlock-Studio}
% Se definen los grosores de las líneas de separación.
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
% Se redefine cómo se genera la marca de sección para que incluya el número.
\renewcommand{\sectionmark}[1]{\markboth{\thesection. #1}{}}
% =======================================================================================
% INICIO DEL CUERPO DEL DOCUMENTO
% =======================================================================================
\begin{document}
% %%% --- PÁGINA DE TÍTULO --- %%%
% Se crea una portada impactante y profesional usando un 'tcolorbox' a toda página.
\begin{titlepage}
\begin{tcolorbox}[
%--- Estilo de la caja ---
colback=WarlockDark, % Fondo oscuro.
colframe=WarlockGold, % Borde dorado.
sharp corners, % Esquinas rectas en lugar de redondeadas.
boxrule=1.5pt, % Grosor del borde.
%--- Alineación y Tamaño ---
halign=center, % Alineación horizontal del contenido.
valign=center, % Alineación vertical del contenido.
height=\dimexpr\textheight-1cm\relax % Altura de la caja (toda la altura del texto menos 1cm).
]
%--- Contenido de la Portada ---
\centering % Centra los elementos internos.
\includegraphics[width=0.5\textwidth]{logo.png}\par % Logo.
\vfill % Espacio flexible para empujar el contenido.
\color{white} % Cambia el color del texto a blanco para contraste.
{\Huge\bfseries Warlock-Studio\par}
\vspace{0.7cm} % Espacio vertical fijo.
{\Large -- Manual Técnico del Usuario y Documentación --\par}
\vspace{0.2cm}
{\Large Versión 4.0.1\par}
\vfill % Otro espacio flexible.
{\large Iván Eduardo Chavez Ayub\par}
\href{https://github.com/Ivan-Ayub97}{\texttt{\color{WarlockGold}@Ivan-Ayub97 en GitHub}}\par % Enlace con estilo.
\vspace{1.5cm}
{\large \today\par} % Muestra la fecha de compilación.
\end{tcolorbox}
\thispagestyle{empty} % Oculta el encabezado y pie de página en la portada.
\end{titlepage}
% %%% --- RESUMEN Y TABLA DE CONTENIDOS --- %%%
\pagestyle{fancy} % Restaura el estilo de página 'fancy' después de la portada.
% El entorno 'abstract' crea un resumen del documento.
\begin{abstract}
\noindent % Evita la sangría en la primera línea.
Este documento es una guía técnica exhaustiva para Warlock-Studio 4.0.1. La información ha sido validada y enriquecida con un análisis profundo del código fuente para proporcionar detalles precisos sobre su nueva arquitectura de IA, una guía de optimización mejorada y un manual de solución de problemas robusto.
\end{abstract}
\newpage % Salto de página antes de la tabla de contenidos.
\tableofcontents % Genera la tabla de contenidos automáticamente.
\newpage % Salto de página después de la tabla de contenidos.
% %%% --- CUERPO PRINCIPAL DEL MANUAL --- %%%
% --- Sección 1: Introducción ---
\section{Introducción}
Warlock-Studio es una aplicación avanzada para la mejora y optimización de contenidos audiovisuales, que utiliza modelos IA de vanguardia para proporcionar resultados excepcionales. Su interfaz es intuitiva y accesible, adecuada tanto para principiantes como para usuarios avanzados.
La versión 4.0.1, introduce un sistema innovador de distribución de modelos IA que descarga automáticamente los componentes necesarios al iniciar, permitiendo una instalación más liviana con solo 300MB, en comparación con los previos 1.4GB. Esta versión mejora significativamente la arquitectura de IA y la estabilidad del software, fortaleciendo su presencia como una herramienta esencial para profesionales de la creación de contenido.
\textbf{Actualización v4.0.1:} El modelo SuperResolution-10 ha sido eliminado de esta versión debido a conflictos de compatibilidad. Se recomienda usar BSRGANx4 o RealESRGANx4 para necesidades de escalado extremo.
\subsection{Novedades en la Versión 4.0.1}
La última versión aporta las siguientes mejoras clave:
% Se usa 'itemize' para listas con viñetas. [leftmargin=*] alinea la lista con el margen del párrafo.
\begin{itemize}[leftmargin=*]
\item \textbf{Soporte mejorado de modelos IA:} Nuevos modelos de última generación como Real-ESRGAN, RIFE y GFPGAN se han integrado para un superior escalado e interpolación.
\item \textbf{Gestión avanzada de GPU:} Mejora en el manejo de errores para optimizar el rendimiento incluso en configuraciones de VRAM más bajas.
\item \textbf{Gestión optimizada de memoria:} Incluye técnicas proactivas de optimización de memoria y mejor soporte de hilos para un procesamiento fluido.
\item \textbf{Mejora en GUI y preferencias de usuario:} Una interfaz más amigable con opciones de configuración mejoradas y actualizaciones dinámicas en tiempo real.
\item \textbf{Codificación de video mejorada:} Soporta múltiples codificadores acelerados por hardware de NVIDIA, AMD e Intel para un rendimiento óptimo.
\item \textbf{Versión 4.0.1:} Se eliminó el modelo SuperResolution-10 debido a conflictos de compatibilidad. Los usuarios deben utilizar BSRGANx4 o RealESRGANx4 para escalado extremo.
\end{itemize}
\subsection{Características Principales}
\begin{itemize}[leftmargin=*]
\item \textbf{Escalado por IA:} Utiliza modelos de última generación como Real-ESRGAN, BSRGAN y SRVGGNetCompact.
\item \textbf{Interpolación de Fotogramas:} Aumenta los FPS o crea efectos de cámara lenta fluidos usando modelos RIFE.
\item \textbf{Reducción de Ruido:} Incluye modelos IRCNN dedicados a la limpieza de imágenes y videos.
\item \textbf{Restauración de Rostros:} Modelo GFPGAN para mejorar y restaurar rostros en fotos.
\item \textbf{Aceleración por Hardware:} Usa el motor ONNX Runtime con el proveedor DirectML (\texttt{DmlExecutionProvider}) para una aceleración por GPU compatible con DirectX 12.
\item \textbf{Codificación de Video Avanzada:} Soporte para codificadores acelerados por hardware de NVIDIA (NVENC), AMD (AMF) e Intel (QSV).
\item \textbf{Sistema de Descarga Inteligente:} Descarga automática de modelos IA (327MB) al primer inicio, reduciendo el tamaño del instalador de 1.4GB a 300MB.
\end{itemize}
% --- Sección 2: Instalación ---
\section{Instalación y Arquitectura del Programa}
\subsection{Sistema de Distribución Inteligente de Modelos IA}
\begin{infobox}
Warlock-Studio 4.0.1 introduce un sistema revolucionario de distribución de modelos IA que descarga automáticamente los componentes necesarios durante el primer inicio de la aplicación.
\end{infobox}
\subsubsection{Ventajas del Nuevo Sistema}
\begin{itemize}[leftmargin=*]
\item \textbf{Instalador Ligero:} Tamaño reducido del 78\% (de 1.4GB a ~300MB)
\item \textbf{Descarga Inteligente:} Los modelos IA (327MB) se descargan automáticamente al primer uso
\item \textbf{Múltiples Fuentes:} URLs redundantes (GitHub, SourceForge) garantizan disponibilidad
\item \textbf{Seguimiento de Progreso:} Indicadores visuales muestran velocidad de descarga y porcentaje de completado
\item \textbf{Recuperación de Errores:} Mecanismos automáticos de reintento y mensajes de error claros
\item \textbf{Soporte de Reanudación:} Las descargas interrumpidas pueden reanudarse sin problemas
\end{itemize}
\subsubsection{Proceso de Descarga Automática}
Al iniciar Warlock-Studio por primera vez, el sistema realizará las siguientes operaciones:
\begin{enumerate}[leftmargin=*]
\item \textbf{Verificación de Modelos:} Comprueba si los modelos IA están presentes
\item \textbf{Diálogo de Confirmación:} Solicita permiso para descargar 327MB de modelos IA
\item \textbf{Descarga Progresiva:} Muestra progreso en tiempo real con indicadores visuales
\item \textbf{Validación de Integridad:} Verifica que los archivos descargados estén completos
\item \textbf{Extracción Automática:} Descomprime y organiza los modelos en la estructura correcta
\end{enumerate}
\subsubsection{Configuración Offline y Manual}
Para usuarios con conectividad limitada o preferencias específicas:
\begin{description}[leftmargin=*, style=nextline]
\item[Instalación Offline:] Los modelos pueden descargarse por separado y colocarse manualmente en la carpeta \texttt{AI-onnx}
\item[Ubicación Manual:] Descargar \texttt{AI-onnx-models.zip} desde GitHub Releases y extraer en el directorio de instalación
\item[Verificación de Archivos:] La aplicación verificará automáticamente la presencia de todos los modelos requeridos
\end{description}
\subsection{Requisitos del Sistema}
% Se usa 'table' para tablas que no se dividen entre páginas. [H] fuerza su posición.
\begin{table}[H]
\centering % Centra la tabla en la página.
% 'tabular' es el entorno que dibuja la tabla. {ll} define dos columnas alineadas a la izquierda.
\begin{tabular}{ll}
\toprule % Línea superior de la tabla (de booktabs).
\textbf{Componente} 6 \textbf{Requisito} \\
\midrule % Línea media de la tabla (de booktabs).
Sistema Operativo 6 Windows 10 (64-bit) o posterior \\
Memoria RAM 6 8 GB (Mínimo), 16 GB (Recomendado) \\
Tarjeta Gráfica (GPU) 6 Compatible con \textbf{DirectX 12}. \textbf{Recomendado: 4+ GB VRAM}. \\
Almacenamiento 6 2 GB de espacio libre. Se recomienda un SSD para un mejor rendimiento. \\
\bottomrule % Línea inferior de la tabla (de booktabs).
\end{tabular}
\caption{Requisitos de hardware y software para Warlock-Studio 4.0.1.}
\end{table}
\subsection{Estructura de Archivos y Dependencias}
\begin{infobox}
Warlock-Studio es una aplicación autocontenida. Los siguientes componentes se incluyen en la instalación y no requieren acción por parte del usuario.
\end{infobox}
\begin{itemize}[leftmargin=*]
\item \inlinecode{ffmpeg.exe:} Ubicado en la carpeta \texttt{Assets}, es el motor para toda la manipulación, codificación y decodificación de video.
\item \inlinecode{exiftool.exe:} También en \texttt{Assets}, se utiliza para leer y escribir metadatos (EXIF, XMP), asegurando que la información original del archivo se preserve.
\item \textbf{Modelos IA:} Los modelos en formato \texttt{.onnx} se encuentran en la carpeta \texttt{AI-onnx}.
\item \textbf{Preferencias de Usuario:} Se guarda un archivo \inlinecode{Warlock-Studio_4.0_UserPreference.json} en la carpeta de \textbf{Documentos} del usuario.
\item \textbf{Registros (Logs):} Los archivos de registro se almacenan en \texttt{Documentos\textbackslash Warlock-Studio_4.0_Logs}.
\end{itemize}
% --- Sección 3: Guía de Modelos ---
\section{Guía Detallada de Modelos de IA}
La elección del modelo de IA es el factor más importante para la calidad y el tiempo de procesamiento.
\subsection{Guía Avanzada de Comparación de Modelos}
La tabla siguiente ofrece un análisis detallado del consumo de VRAM, funcionalidades y casos de uso de cada modelo IA implementado en Warlock-Studio.
% Tabla con columnas ajustadas para encajar en los márgenes de la página
% Uso de anchos fijos para mejor control de columnas y ajuste de texto
\begin{longtable}{p{2.8cm} p{1.8cm} p{1.2cm} p{1.5cm} p{7.2cm}}
\toprule
\textbf{Modelo} & \textbf{Función} & \textbf{Escala} & \textbf{VRAM (GB)} & \textbf{Caso de Uso Recomendado \& Detalles Técnicos} \\
\midrule
\endhead % \endhead define el encabezado que se repetirá en cada página.
\multicolumn{5}{c}{\textit{\textbf{Modelos de Reducción de Ruido (Denoising)}}} \\
\midrule
\texttt{IRCNN\_Mx1} & Denoise & x1 & 4.0 & Reducción de ruido moderado. Excelente para limpiar fotos antiguas con niveles medios de artefactos. \\
\texttt{IRCNN\_Lx1} & Denoise & x1 & 4.0 & Reducción de ruido intenso. Óptimo para imágenes muy degradadas con artefactos severos. \\
\midrule
\multicolumn{5}{c}{\textit{\textbf{Modelos de Escalado - Alta Calidad (Procesamiento Lento)}}} \\
\midrule
\texttt{BSRGANx4} & Upscale & x4 & 0.6 & Fotografías realistas con excelente preservación de detalles finos. Ideal para retratos y escenas naturales. \\
\texttt{BSRGANx2} & Upscale & x2 & 0.7 & Calidad similar a la variante x4 pero para necesidades de escalado moderado. Procesamiento más rápido. \\
\texttt{RealESRGANx4} & Upscale & x4 & 0.6 & Modelo de propósito general. Excelente para texturas y tipos de contenido mixto. \\
\texttt{RealESRNetx4} & Upscale & x4 & 2.2 & Alternativa a RealESRGAN. Puede ofrecer mejor equilibrio velocidad-calidad en algunos sistemas. \\
\midrule
\multicolumn{5}{c}{\textit{\textbf{Modelos de Escalado - Alta Velocidad (Ligeros)}}} \\
\midrule
\texttt{RealESR\_Gx4} & Upscale & x4 & 2.2 & Procesamiento rápido ideal para videos. Buen equilibrio entre velocidad y calidad. \\
\texttt{RealESR\_Animex4} & Upscale & x4 & 2.2 & Especializado para anime, dibujos animados y contenido ilustrado. Preserva el estilo artístico. \\
\midrule
\multicolumn{5}{c}{\textit{\textbf{Modelos de Restauración de Rostros}}} \\
\midrule
\texttt{GFPGAN} & Restaurar & x1 & 1.8 & Mejora y restauración de rostros impulsada por IA. Repara rostros dañados en fotos antiguas. \\
\midrule
\multicolumn{5}{c}{\textit{\textbf{Modelos de Interpolación de Fotogramas (Solo Video)}}} \\
\midrule
\texttt{RIFE} & Interpolar & N/A & N/A & Máxima calidad de interpolación. Crea movimiento suave entre frames para altos FPS. \\
\texttt{RIFE\_Lite} & Interpolar & N/A & N/A & Versión optimizada para GPUs con VRAM limitada (< 4 GB). Procesamiento más rápido. \\
\midrule
\multicolumn{5}{c}{\textit{\textbf{Nota de Versión 4.0.1}}} \\
\midrule
\multicolumn{5}{p{14cm}}{\textbf{ELIMINADO:} El modelo SuperResolution-10 ha sido removido en la versión 4.0.1 debido a conflictos de compatibilidad. Para escalado extremo, se recomienda utilizar BSRGANx4 o RealESRGANx4 aplicados múltiples veces o en combinación con otros modelos.} \\
\bottomrule
\caption{Guía integral de selección de modelos de IA y requisitos de VRAM.}
\label{tab:modelos}
\end{longtable}
% --- Sección 4: Optimización ---
\section{Configuración y Optimización del Rendimiento}
\subsection{Parámetros Críticos de Rendimiento}
\begin{itemize}[leftmargin=*]
\item \textbf{Input Resolution \%:} El ajuste más efectivo para la velocidad. Reduce la resolución antes de procesarla con IA. Un valor entre \textbf{50\% y 75\%} suele ser ideal.
\item \textbf{GPU VRAM Limiter (GB):} Defina la VRAM de su GPU. Se usa para calcular el tamaño de los \textit{tiles} de procesamiento y evitar errores de memoria.
\item \textbf{AI Multithreading:} Solo para videos. Procesa varios fotogramas en paralelo. Acelera el proceso pero consume más VRAM y CPU.
\item \textbf{AI Blending:} Combina la imagen original con la procesada. Útil para reducir artefactos cuando se usa un \textit{Input Resolution} bajo.
\item \textbf{Generación de fotogramas:} Para modelos RIFE, permite crear fotogramas interpolados para mayor FPS o efectos de cámara lenta.
\end{itemize}
\subsection{El Fichero de Preferencias de Usuario}
El archivo Warlock-Studio4.0UserPreference.json guarda su configuración.
% Se usa 'tabularx' para que la tabla ocupe automáticamente el 100% del ancho del texto.
% La columna 'X' es una columna flexible que se expande para llenar el espacio disponible.
\begin{table}[H]
\centering
\small % Reduce el tamaño de la fuente dentro de la tabla.
\begin{tabularx}{\textwidth}{l X}
\toprule
\textbf{Clave JSON} 6 \textbf{Descripción} \\
\midrule
\texttt{default\_AI\_model} 6 El último modelo de IA seleccionado. \\
\texttt{default\_AI\_multithreading} 6 El número de hilos de procesamiento para video. \\
\texttt{default\_gpu} 6 La última GPU seleccionada (Auto, GPU 1, etc.). \\
\texttt{default\_keep\_frames} 6 Si se deben conservar los fotogramas de video ("ON" o "OFF"). \\
\texttt{default\_image\_extension} 6 Extensión de imagen por defecto (\texttt{.png}, \texttt{.jpg}, etc.). \\
\texttt{default\_video\_extension} 6 Extensión de video por defecto (\texttt{.mp4}, \texttt{.mkv}, etc.). \\
\texttt{default\_video\_codec} 6 El codificador de video por defecto (x264, hevc\_nvenc, etc.). \\
\texttt{default\_blending} 6 El nivel de mezcla seleccionado (Low, Medium, High). \\
\texttt{default\_output\_path} 6 La última ruta de salida seleccionada. \\
\texttt{default\_input\_resize\_factor} 6 El valor del porcentaje de resolución de entrada. \\
\texttt{default\_output\_resize\_factor} 6 El valor del porcentaje de resolución de salida. \\
\texttt{default\_VRAM\_limiter} 6 El valor del limitador de VRAM de la GPU. \\
\bottomrule
\end{tabularx}
\caption{Claves guardadas en el archivo de preferencias del usuario.}
\end{table}
% --- Sección 5: Solución de Problemas ---
\section{Guía Avanzada de Solución de Problemas}
\begin{warnbox}
La causa \textbf{Número 1} de errores son los \textbf{caracteres especiales} en rutas y nombres de archivo. Evite usar: \texttt{', ", @, \#, \$, \%, \&amp;, *, [, ], ?, etc.}.
\end{warnbox}
% 'description' es para listas de definiciones.
% [style=nextline] coloca el texto en la línea siguiente al término.
\begin{description}[leftmargin=*, style=nextline, itemsep=0.8em]
\item[\faBan\ Error: "FFmpeg encoding failed: Invalid argument"]
\textbf{Causa:} Nombre de archivo o ruta no válida.
\textbf{Solución:} Renombre el archivo y/o la carpeta eliminando caracteres especiales.
\item[\faMemory\ Error: "out of memory" o cierre inesperado]
\textbf{Causa:} La GPU se quedó sin memoria de video (VRAM).
\textbf{Solución:}
% 'enumerate' es para listas numeradas. 'nosep' reduce el espacio entre ítems.
\begin{enumerate}[nosep, leftmargin=*]
\item Reduzca el \textbf{VRAM Limiter} a un valor igual o inferior al de su GPU.
\item Baje el \textbf{Input Resolution \%} a 75\% o menos.
\item Para videos, disminuya los hilos de \textbf{AI Multithreading} o apáguelo.
\item La aplicación intentará recuperarse de este error automáticamente.
\end{enumerate}
\item[\faTachometerAlt\ Error: "cannot convert float NaN to integer"]
\textbf{Causa:} Timeout del driver de la GPU, a menudo por sobrecarga o sobrecalentamiento.
\textbf{Solución:} Reinicie el proceso \textbf{sin borrar la carpeta de fotogramas}. El programa reanudará el trabajo donde se quedó.
\item[\faVolumeMute\ Problema: Video de salida sin audio]
\textbf{Causa:} El video original no tenía audio, se usó un modo \textit{Slowmotion} o el códec de audio era incompatible.
\textbf{Solución:} El programa intenta copiar el audio, si falla, lo re-codifica a AAC. Si todo falla, guarda el video sin audio. Usar \inlinecode{.mkv} en la salida puede ayudar.
\item[\faQuestionCircle\ Problema: La aplicación no se abre]
\textbf{Causa:} Configuración corrupta, falta de permisos o error del entorno.
\textbf{Solución:}
\begin{enumerate}[nosep, leftmargin=*]
\item Elimine el archivo \inlinecode{Warlock-Studio_4.0_UserPreference.json} en su carpeta de \textbf{Documentos}.
\item Revise los archivos de registro en \texttt{Documentos\textbackslash Warlock-Studio_4.0_Logs}.
\item Asegúrese de que sus controladores de GPU estén actualizados.
\end{enumerate}
\item[\faExclamationTriangle\ Problema: La interpolación de fotogramas no funciona]
\textbf{Causa:} Modelos RIFE no seleccionados o formato de video incompatible.
\textbf{Solución:} Asegúrese de haber seleccionado un modelo RIFE (RIFE o RIFE\_Lite) y que la opción de generación de fotogramas esté correctamente configurada.
\end{description}
% --- Sección 6: Arquitectura ---
\section{Arquitectura y Procesos Avanzados}
\subsection{Motor de Inferencia y Aceleración por Hardware}
Warlock-Studio utiliza \textbf{ONNX Runtime} con el proveedor \textbf{DirectML} (\inlinecode{DmlExecutionProvider}). Este traduce las operaciones de IA a llamadas de \textbf{DirectX 12}, garantizando una amplia compatibilidad con GPUs de NVIDIA, AMD e Intel.
\subsection{Sistema de Tiles y Gestión de Memoria}
Para manejar archivos de alta resolución, la aplicación divide cada fotograma en fragmentos (\textit{tiles}). El tamaño de estos se calcula dinámicamente usando el \textbf{VRAM Limiter}. Además, se invoca al recolector de basura de Python (\inlinecode{gc.collect()}) para forzar la liberación de memoria y garantizar estabilidad.
\subsection{Funcionalidad de Reanudación y Checkpoints}
Si un proceso de video se interrumpe, los fotogramas procesados se guardan. Al reiniciar la tarea, la función \inlinecode{check\_video\_upscaling\_resume} detecta estos archivos y continúa el trabajo desde donde falló, ahorrando tiempo.
\subsection{Escritura Asíncrona de Fotogramas}
Durante el escalado de video, los fotogramas procesados se envían a un hilo de escritura separado. Esto permite a la GPU procesar el siguiente lote sin esperar a que la escritura en disco (más lenta) termine, maximizando el rendimiento.
\subsection{Pipeline de Interpolación de Fotogramas}
Los modelos RIFE utilizan un pipeline de interpolación especializado que analiza el movimiento entre fotogramas para generar fotogramas intermedios suaves. Esto permite mayores tasas de cuadros o efectos de cámara lenta con artefactos mínimos.
\subsection{Sistema de Logs y Diagnóstico}
Warlock-Studio implementa un sistema completo de registro que incluye:
\begin{itemize}[leftmargin=*]
\item \textbf{Logs de Proceso:} Registran cada etapa del procesamiento de IA
\item \textbf{Logs de Error:} Capturan errores detallados con stack traces
\item \textbf{Logs de Rendimiento:} Miden tiempos de procesamiento y uso de recursos
\end{itemize}
\subsection{Modelos Removidos en Versión 4.0.1}
\begin{warnbox}
El modelo SuperResolution-10 ha sido eliminado de la versión 4.0.1 debido a conflictos de compatibilidad y estabilidad. Para necesidades de escalado extremo, se recomienda:
\begin{itemize}[leftmargin=*]
\item \textbf{BSRGANx4:} Aplicar múltiples veces para escalado gradual
\item \textbf{RealESRGANx4:} Excelente calidad para escalado de propósito general
\item \textbf{Combinación de modelos:} Usar IRCNN para limpieza previa seguido de BSRGAN
\end{itemize}
\end{warnbox}
\section{Resolución Avanzada de Errores y Diagnósticos del Sistema}
\subsection{Gestión de Memoria GPU y Optimización de VRAM}
Warlock-Studio implementa gestión sofisticada de memoria GPU:
\begin{description}[leftmargin=*, style=nextline]
\item[Dimensionamiento Dinámico de Tiles:] Calcula automáticamente tamaños óptimos de tiles basado en VRAM disponible
\item[Gestión de Pool de Memoria:] Pre-asigna y reutiliza buffers de memoria para reducir overhead de asignación
\item[Integración de Recolector de Basura:] Fuerza la recolección de basura de Python en puntos estratégicos para liberar memoria no utilizada
\item[Monitoreo de VRAM:] Monitoreo en tiempo real del uso de memoria GPU con fallback automático a tiles más pequeños
\end{description}
\subsection{Solución de Problemas en Carga e Inicialización de Modelos}
\begin{warnbox}
Las fallas en la carga de modelos a menudo son causadas por archivos ONNX corruptos, permisos de sistema insuficientes, o errores de inicialización del proveedor DirectML.
\end{warnbox}
\begin{description}[leftmargin=*, style=nextline]
\item[Corrupción de Archivo de Modelo:] Verificar integridad del archivo de modelo comparando tamaños con valores esperados
\item[Fallas de Inicialización de Proveedor:] Verificar compatibilidad DirectML y asegurar que DirectX 12 esté correctamente instalado
\item[Problemas de Permisos:] Ejecutar aplicación como administrador si la carga de modelos falla consistentemente
\end{description}
\subsection{Diagnósticos del Pipeline de Procesamiento de Video}
El pipeline de procesamiento de video consiste en varias etapas que pueden ser diagnosticadas individualmente:
\begin{enumerate}[leftmargin=*]
\item \textbf{Extracción de Frames:} Verificar que FFmpeg pueda leer el formato de video de entrada
\item \textbf{Procesamiento IA:} Monitorear uso de VRAM y tiempos de procesamiento por frame
\item \textbf{Ensamblaje de Frames:} Verificar frames intermedios faltantes o corruptos
\item \textbf{Codificación de Video:} Validar compatibilidad de codec y disponibilidad de codificador hardware
\end{enumerate}
\subsection{Guías de Optimización de Rendimiento}
\begin{table}[H]
\centering
\small
\begin{tabularx}{\textwidth}{l X}
\toprule
\textbf{Escenario} & \textbf{Configuraciones Recomendadas} \\
\midrule
VRAM Baja (< 4GB) & Resolución de Entrada: 50\%, Multithreading: OFF, Usar RIFE\_Lite \\
VRAM Media (4-8GB) & Resolución de Entrada: 75\%, Multithreading: 2-4 hilos, Modelos estándar \\
VRAM Alta (> 8GB) & Resolución de Entrada: 100\%, Multithreading: 6-8 hilos, Modelos alta calidad \\
Almacenamiento SSD & Mantener frames: ON para reanudación rápida, Usar multithreading alto \\
Almacenamiento HDD & Mantener frames: OFF para ahorrar espacio, Multithreading bajo para reducir I/O \\
\bottomrule
\end{tabularx}
\caption{Configuraciones de optimización basadas en configuración del sistema.}
\end{table}
\subsection{Análisis de Archivos de Log y Depuración}
Warlock-Studio genera logs comprensivos en la carpeta Documentos:
\begin{description}[leftmargin=*, style=nextline]
\item[warlock\_studio.log:] Eventos generales de aplicación, carga de modelos, y estado de procesamiento
\item[error\_log.txt:] Mensajes de error detallados con stack traces de Python
\item[performance\_log.txt:] Tiempos de procesamiento, uso de memoria, y métricas de rendimiento
\end{description}
\subsection{Patrones Comunes de Error y Soluciones}
\begin{longtable}{p{4cm} p{5cm} p{6cm}}
\toprule
\textbf{Patrón de Error} & \textbf{Causa Típica} & \textbf{Estrategia de Solución} \\
\midrule
\endhead
"DirectML device not found" & Drivers de GPU desactualizados o DirectX 12 no soportado & Actualizar drivers de GPU, verificar compatibilidad DirectX 12 \\
"ONNX Runtime initialization failed" & Archivos de modelo corruptos o permisos insuficientes & Re-descargar modelos, ejecutar como administrador \\
"FFmpeg process terminated" & Codec no soportado o archivo de entrada corrupto & Convertir entrada a formato soportado (MP4, H.264) \\
"Tile processing timeout" & GPU sobrecalentada o inestabilidad de driver & Reducir tamaño de tile, verificar temperatura GPU, actualizar drivers \\
"Memory allocation failed" & RAM del sistema agotada & Cerrar otras aplicaciones, reducir multithreading \\
\bottomrule
\caption{Patrones comunes de error y estrategias de resolución.}
\end{longtable}
\subsection{Métricas de Rendimiento y Monitoreo}
La aplicación proporciona métricas detalladas de rendimiento:
\begin{description}[leftmargin=*, style=nextline]
\item[Velocidad de Procesamiento:] Métricas de frames por segundo (FPS) e imágenes por minuto
\item[Uso de Memoria:] Monitoreo en tiempo real de VRAM y RAM del sistema
\item[Utilización de GPU:] Estadísticas de rendimiento del proveedor DirectML
\item[E/S de Disco:] Velocidades de lectura/escritura para almacenamiento temporal de frames
\end{description}
% =======================================================================================
% FIN DEL MANUAL
% =======================================================================================
\end{document}
Binary file not shown.
Binary file not shown.