Skip to content

[Bug]: Errors when opening a concept that is on huggingface #1194

@dxqb

Description

@dxqb

What happened?

The following errors appear, when the concept path is a huggingface dataset path - even when the dataset is already downloaded

What did you expect would happen?

Relevant log output

Unable to get statistics for invalid concept path: dxqbYD/woman
Exception in thread Thread-8 (__auto_update_concept_stats):
Traceback (most recent call last):
  File ".../OneTrainer/modules/ui/ConceptWindow.py", line 914, in __auto_update_concept_stats
    self.__update_concept_stats()      #load stats from config if available, else raises KeyError
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../OneTrainer/modules/ui/ConceptWindow.py", line 749, in __update_concept_stats
    self.file_size_preview.configure(text=str(int(self.concept.concept_stats["file_size"]/1048576)) + " MB")
                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'file_size'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.12/threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
  File ".../OneTrainer/modules/ui/ConceptWindow.py", line 921, in __auto_update_concept_stats
    if self.concept.concept_stats["processing_time"] < 0.1:
       ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
KeyError: 'processing_time'

Generate and upload debug_report.log

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions