u/Sta--Ger--2

Training LoRa locally not working

Today I wanted to try training a LoRa locally on my pc. I have never done this before, so I followed the instructions found here and used the OneTrainer package for StabilityMatrix.

The test was for a SDXL LoRa with about 25 images, 50 epoch, very very minimal. Since my device is not particularly impressive, I did not expect to even complete the test... but I did expect some results, enough to have an idea on how much time was needed for a full training session.

And then, after several hours in which my pc supposedly 'worked', I read on the console:

epoch:   0%|          | 0/50 [00:00<?, ?it/s]

A quick check on the OneTrainer window told me that it was 'Starting epoch/caching', further confirming that it did nothing at all while I waited. And I have no idea why.

What (probably very obvious thing) did I miss?

------------------------

The complete text of the console is as follows:

No module named 'triton', continuing without triton
Clearing cache directory workspace-cache/run! You can disable this if you want to continue using the same cache.
No backup found, continuing without backup...
C:\D\AI art\0 - StabilityMatrix-win-x64 - Package manager\Data\Packages\OneTrainer\venv\lib\site-packages\tensorboard\default.py:30: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  import pkg_resources
Fetching 17 files: 100%|██████████| 17/17 [00:00<?, ?it/s]
Loading pipeline components...:  71%|███████▏  | 5/7 [00:01<00:00,  5.38it/s]TensorFlow installation not found - running with reduced feature set.
Serving TensorBoard on localhost; to expose to the network, use a proxy or pass --bind_all
TensorBoard 2.20.0 at http://localhost:6006/ (Press CTRL+C to quit)
Loading pipeline components...: 100%|██████████| 7/7 [00:18<00:00,  2.67s/it]
Selected layers: 722
Deselected layers: 72
Note: Enable Debug mode to see the full list of layer names
C:\D\AI art\0 - StabilityMatrix-win-x64 - Package manager\Data\Packages\OneTrainer\modules\util\CustomGradScaler.py:14: UserWarning: torch.cuda.amp.GradScaler is enabled, but CUDA is not available.  Disabling.
  super().__init__()
epoch:   0%|          | 0/50 [00:00<?, ?it/s]
enumerating sample paths: 100%|██████████| 1/1 [00:00<00:00, 66.71it/s]
reddit.com
u/Sta--Ger--2 — 3 days ago

I have decided that my game will have a minigame. It will work like this: you click on a link, a HiEv sliding panel (renamed in slideOmnitool for lore reasons) goes in front of the passage, and there goes the magic.

After a few weeks I have finally finished the minigame and transferred it from a dedicated twine project to my main game. Then I made a passage that will be used to tell the player what to do with the minigame, the commands, the goals, etc etc. The code is this:

<<link "Click to start playing">>
    <<set $countdownTime to 3000>>
    <<set $combat_targetsHit to 0>>
    <<set $combat_shotsFired to 0>>
    
    <<set _scenario to "CombatScenario_ShootingRange">>
    <<set $dragan to enemy.Dragan>>
    <<run window.refreshAndUpgradeDragan()>>
    
    <<run console.log("just before goto or slideOmnitool");>>
    <<if hasVisited("DD_TW_ShootingRangeFirstTime")>>
        <<run slideOmnitool("Combat")>>   /* The HiEV slide */   
    <<else>>     
        <<goto "DD_TW_ShootingRangeFirstTime">> 
    <</if>>
<</link>> 

Pretty basic: you set all the variable needed by the minigame, then you check if the player has visited the tutorial passage, if yes go straight to the minigame, if no go to the tutorial passage.

It doesn't work. It claims that Engine.play fails to render the passage: it tries to use the toJson() function of the class Enemy (made by me for the minigame), fails, crashes.

At the beginning I thought the problem was something to do with the minigame itself, but then I tried THIS code:

[[Go to passage DD_TW_ShootingRangeFirstTime|DD_TW_ShootingRangeFirstTime]] - <<link "Test slide: Combat">>
    <<set $countdownTime to 3000>>
    <<set $combat_targetsHit to 0>>
    <<set $combat_shotsFired to 0>>
    <<set _scenario to "CombatScenario_ShootingRange">>
    <<set $dragan to enemy.Dragan>>
    <<run window.refreshAndUpgradeDragan()>>
    <<run slideOmnitool("Combat")>>
<</link>>

And it works! So both going to the tutorial passage AND put the slide with the minigame works without a problem.

By exclusion, the problem is (somehow!) with either the <<if>> condition or the <<goto>> command.

But what it is? And how to solve it?

Thanks for any insight you may have!

reddit.com
u/Sta--Ger--2 — 18 days ago