Overview CPU Version
⚠️ UPDATE: New Version 1.4 Available!
=========================================================
This v1.4 update is a major stability release. It refines the multi-resolution engine and introduces the Quick Analyzer, making it the most complete and stable portable tool for LoRA dataset preparation.
📌 NEW IN VERSION 1.4:
* Quick Analyzer Tab: Instantly caption single images to test styles before bulk processing.
* Web Drag & Drop: Drag images directly from Civitai into the tool for instant analysis.
* Full English UI: The entire interface is now in English for global accessibility.
* Stability Fix: Improved GUI engine with "Groove" relief to prevent startup crashes.
* Smart Selection: Click the analyzer area to browse files or use Ctrl+C to copy generated prompts.
👉 Download LoRA Data Tool v1.4 here
⚠️ UPDATE: New Version 1.3 Available!
A significantly improved version of this tool has been released. Version 1.3 - Multi-Resolution Edition is now the recommended version.
Key Improvements in v1.3:
Resolution Selector: Choose between 512px, 768px, or 1024px
Smart Scaling: Automatic proportional scaling (no more forced crops)
Improved Stability: Windows-native environment with new Startup and Repair batch files
👉 Download LoRA Data Tool v1.3 here
LORA Data Tool - Windows Universal Edition (v1.2 CPU-Only)
Developed by jazara930, based on Sarcastic TOFU's original script
This new Universal CPU Edition is a major update specifically optimized for Windows users. While the previous GPU version works great for many, we recognized that the Windows ecosystem presents too many variables—different GPU architectures, conflicting CUDA versions, and varying driver updates—that often lead to instability.
Why a CPU-Only version? Developing a stable GPU tool for everyone would require separate optimizations for every single combination of NVIDIA drivers and hardware. To solve this, we created this CPU version: it eliminates the white screen crashes, WinError 126 (DLL issues), and VRAM limitations. By using your system's processor, we ensure the tool runs successfully on any PC or laptop.
Key Features of this Build:
Standalone & Portable: No need to install Python or Git.
Pre-Downloaded Model: Florence-2 AI is already included.
Maximum Stability: Rebuilt from scratch with Python 3.11.9.
How to get started:
Extract the entire folder from the ZIP file to your Desktop.
Open the folder and run: Avvio_Lora_Tool_v1.2_CPU_version.bat.
Test it: Select the Dataset/Sample_Images folder and click Start Processing.
Overview GPU Version
This is a Portable Windows version of the Florence-2 LORA Data Builder, specifically optimized for NVIDIA RTX GPUs (tested on RTX 3090). It allows you to generate high-quality captions for your LORA datasets using the Florence-2 model without any complex installation.
Credits
The original script and core logic were created by sarcastictofu.
All credit for the core development goes to them.
This version is a community-driven port designed to make the tool stable and ready-to-use for Windows users.
Main Features & Fixes:
CUDA Compatibility Fix: Pre-configured with Torch 2.5.1 + CUDA 12.1 to ensure full hardware acceleration on modern NVIDIA cards.
Florence-2 Model Recognition: Fixed the issues where the model was not correctly detected or loaded in Windows environments.
No-Install Required: Includes a full standalone Python environment. No need to install anything on your PC.
Portable & Dynamic: Use the provided .bat launcher to run the tool from any drive thanks to dynamic path handling.
Clean Environment: Removed unnecessary bloatware to keep the package focused on AI performance.
How to start:
1. Download and extract the ZIP.
2. Run 00 - Avvio Lora Tool v1.2.bat.
3. The GUI will appear, and you can start processing your images immediately.
Description
[IMPORTANT UPDATE] v1.2 Universal CPU Edition is coming!
I've finalized a new version specifically designed to solve the blank screen and model loading errors experienced by some users.
What's included in v1.2: * New Launcher: AVVIA_Lora_Data_Builder_CPU.bat to bypass all GPU/driver conflicts. * Universal Compatibility: The tool will run on your CPU with maximum stability.
High Performance: No need to worry about speed! Even on CPU, the processing remains very fast and efficient.
Self-Repair Tool: Added an emergency script to restore the Python environment with one click.
Upload Status: Since it's New Year's Eve, the actual file upload will happen between tomorrow and the day after. Stay tuned and Happy New Year!
First release of the Portable version. Fixed CUDA initialization and Florence-2 model loading for Windows NVIDIA users.
FAQ
Comments (20)
Welcome everyone!
I created this portable version to make Florence-2 immediately usable on Windows, specifically solving common CUDA and model loading issues. Everything you need is included in the package: just unzip and run the .bat file.
Huge thanks to the original author for the core code. If you have any questions or need help, feel free to leave a comment here!
Looks great, however, captioning does not work on a RTX 5090. error: ❌ Error captioning 019.jpg: Captioning failed: CUDA error: no kernel image is available for execution on the device CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1 Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.
Is there a simple solution for this?
Hi! Thank you for the feedback. This is a compatibility issue with the new Blackwell architecture (RTX 50 series).
To be honest, I personally own an RTX 3090, so I could only test the tool on Ampere architecture, where it works perfectly with the current CUDA 12.1 setup.
Since the portable version has been stripped of pip to remain lightweight, you cannot run update commands directly.
I am looking into a way to provide a v1.1 update with Torch 2.6 and CUDA 12.4/12.6 support specifically for the 50 series. If you manage to manually update the site-packages in the python folder, please let me know!
Hi! As I mentioned, I personally own an RTX 3090, so I cannot personally test or verify fixes for the new Blackwell (50 series) architecture.
However, if you want to try a manual fix at your own risk, you would need to:
Restore pip in the portable python folder (it was removed to save space).
Force an update to Torch 2.6 with CUDA 12.4/12.6 support, which contains the kernels for the 5090.
Since I cannot test this myself, I'm looking into creating a safer v1.1 update soon. If you are an advanced user and manage to fix it manually, please let us know!
@jazara930 Thanks for your quick reply. Grok also told me that de Cuda version was not compatible with my 5090 setup. In comfyUI I am using pytorch version: 2.9.1+cu128, which is newer. Unfortunately I am NOT advanced at all and I do not want to risk my current set-up which took a lot of effort to get it working on the 5090, hope you understand. If you would provide an updated version in future, I am happy to perform a test run on my 5090. Thanks again!
@FreakyMhee Thank you so much for the technical details! It's very helpful to know that PyTorch 2.9.1+cu128 is the way to go for the 5090. I completely understand your choice to not risk your current setup; stability is key. I'll definitely reach out to you when the v1.1 update is ready so you can test it if you'd like. Thanks for being so helpful!
@jazara930 More than happy to test. My working ComfyUI version looks like this at startup:
pytorch version: 2.9.1+cu128
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 5090 : cudaMallocAsync
Using async weight offloading with 2 streams
Enabled pinned memory 29156.0
Using pytorch attention
Python version: 3.12.8 (tags/v3.12.8:2dc476b, Dec 3 2024, 19:30:04) [MSC v.1942 64 bit (AMD64)]
ComfyUI version: 0.3.77
ComfyUI frontend version: 1.32.10
Hope this helps.
@FreakyMhee Wow, thank you for the detailed startup logs! This is exactly the information I needed. Knowing that Python 3.12.8 and Torch 2.9.1+cu128 are the "magic numbers" for the RTX 5090 will make building the v1.1 update much easier.
I'll save these specs and use them as a reference. I'll let you know as soon as I have a test build ready for you. Thanks again for your time and for being such a great contributor to the community!
happy new year!
@FreakyMhee Hey! I've just released the v1.2 Universal CPU Edition to fix the white screen and DLL errors you experienced. It bypasses GPU issues entirely. Please try the new version and let me know if it works for you!
@jazara930 Did a quick test and everything works on my machine. With my CPU I9 it does re-scaling and long captioning in approx 4 to 4.5 seconds per image which is great. This is a very helpful tool for LoRA training preparation. Thanks a lot for providing this tool! Great stuff!
Just one question: Is there a way to scale to other sizes than 1024? 512 and 768 would be very helpful for older image sets. This might be something for a future update.
Thanks again for bringing this CPU update!
@FreakyMhee Hi FreakyMhee! Thank you so much for the feedback! I am really glad to hear that the i9 is performing so well with the CPU version; 4 seconds per image is a great result.
Regarding your question: you are absolutely right. Adding 512px and 768px options is a logical next step to make the tool even more versatile for different LoRA training needs. I will definitely look into adding a resolution selector in a future update.
Thanks for the suggestion and for testing the tool!
@FreakyMhee Hi! Just an update: the tool is ready and I'm finishing the final checks right now. I want to make sure the multi-resolution feature is rock solid before release. It will be published very soon on a new dedicated post. Stay tuned!
@jazara930 Great!
I just get a blank screen when I use this with sage attention activated.
Hi! The blank screen issue is likely a conflict between your GPU drivers and the model's attention mechanism. While I work on a more permanent fix for the v1.1 update, you can try this quick workaround to run the tool on your CPU. It’s still very fast and should bypass the GPU conflict.
Please follow these steps exactly:
Open lora_data_builder.py with a text editor (like Notepad++).
Find the following line about "line 68" (it's inside the load_model function): device = "cuda" if torch.cuda.is_available() else "cpu"
Replace it with this exact line: device = "cpu"
⚠️ IMPORTANT: Python is very strict about spaces at the beginning of the line (indentation). Make sure you keep the exact same number of spaces before device = "cpu" as the original line had. Do not add or remove any spaces at the start.
Save the file and restart the tool.
This should fix the blank screen and let you use the tool right away. Please let me know if it works and what GPU model you are using!
Update: I have officially finalized the v1.2 (Universal CPU Edition) which solves this issue by bypassing GPU conflicts.
Since it's New Year's Eve, I will perform the actual upload of the new package as soon as possible in the next few days. This version includes a dedicated launcher called AVVIA_Lora_Data_Builder_CPU.bat and an emergency repair script to ensure maximum stability on any PC.
Happy New Year and stay tuned for the link!
Hey! I've just released the v1.2 Universal CPU Edition to fix the white screen and DLL errors you experienced. It bypasses GPU issues entirely. Please try the new version and let me know if it works for you!
v1.2 Universal CPU Edition is now LIVE - Fixing crashes and errors.
I'm happy to announce that the LORA Data Tool has been updated to v1.2!
This version is a Universal CPU Port designed to eliminate:
White screen/freezing at startup.
WinError 126 and DLL missing issues.
GPU/CUDA version conflicts.
If you had trouble running the previous GPU version, this update is for you. It's portable, stable, and works on any Windows PC or laptop. Check the new instructions in the Overview for details!
Looks good, I might also wanna update my original python script to include multiple resolution image conversions ( both 512 Pixels & 1024 Pixels ) for all platforms and for Linux a single install script to give 3 options for CPU only setup, Nvidia setup & AMD Radeon setup. I am planning to get a more beefier Nvidia GPU to replace my current AMD Radeon GPU..
@sarcastictofu That sounds like an amazing plan! I'm glad to see the project evolving further. Adding a unified install script for CPU, Nvidia, and AMD on Linux will definitely make the tool much more accessible to everyone.
Feel free to use any of the logic or ideas I implemented in my Windows port, especially the multi-resolution scaling. It has been a game-changer for Windows users who needed more flexibility.




