Zyin055 / Inspect-Embedding-Training

Python script to analyze textual inversion embedding files used with AI image generators
MIT License
102 stars 11 forks source link

KeyError: 'loss' #21

Closed lhovav closed 1 year ago

lhovav commented 1 year ago

Hi, Forgive me if I'm wrong, or missed it in the docs, Initially I got thie error: [ERROR] Could not find file: textual_inversion_loss.csv

So I created the file using excel.

Now I'm getting the KeyError: 'loss'

I'm using A1111 latest version,

Any idea what I'm misiing?

Thank you!

Zyin055 commented 1 year ago

Are you running inspect_embedding_training.py in Stable Diffusion\textual_inversion\<date>\<embed name>? the textual_inversion_loss.csv file should be located in that directory.

lhovav commented 1 year ago

keyloss

I'm running with cmd at the current folder...

Zyin055 commented 1 year ago

The .csv file should be automatically created by A1111. Creating a blank file won't help. It's possible that you didn't set the save interval high enough for whatever amount of steps your embedding was trained for.

Did you set Settings > Training > Save an csv containing the loss to log directory every N steps, 0 to disable to 1?

lhovav commented 1 year ago

it was on 0, changed to 1, now everything is perfect, sorry if I made a silly mistake, thank you for the wonderful script and your help!