Stable Diffusion Error
I ran into this issue after the disk on which I was running stable diffusion AI image generator ran out of disk space. 0 bytes free. Somehow the headings row of txt2img_logs.csv was removed, and the script wouldn't run.
Traceback (most recent call last):
File "optimizedSD/optimized_txt2img.py", line 188, in <module>
logger(vars(opt), log_csv = "logs/txt2img_logs.csv")
File "E:\Projects\stable-diffusion\optimizedSD\optimUtils.py", line 57, in logger
df = pd.read_csv(log_csv)
File "C:\Users\User\.conda\envs\ldm\lib\site-packages\pandas\util\_decorators.py", line 211, in wrapper
return func(*args, **kwargs)
File "C:\Users\User\.conda\envs\ldm\lib\site-packages\pandas\util\_decorators.py", line 317, in wrapper
return func(*args, **kwargs)
File "C:\Users\User\.conda\envs\ldm\lib\site-packages\pandas\io\parsers\readers.py", line 950, in read_csv
return _read(filepath_or_buffer, kwds)
File "C:\Users\User\.conda\envs\ldm\lib\site-packages\pandas\io\parsers\readers.py", line 605, in _read
parser = TextFileReader(filepath_or_buffer, **kwds)
File "C:\Users\User\.conda\envs\ldm\lib\site-packages\pandas\io\parsers\readers.py", line 1442, in __init__
self._engine = self._make_engine(f, self.engine)
File "C:\Users\User\.conda\envs\ldm\lib\site-packages\pandas\io\parsers\readers.py", line 1747, in _make_engine
return mapping[engine](f, **self.options)
File "C:\Users\User\.conda\envs\ldm\lib\site-packages\pandas\io\parsers\c_parser_wrapper.py", line 92, in __init__
self._reader = parsers.TextReader(src, **kwds)
File "pandas\_libs\parsers.pyx", line 554, in pandas._libs.parsers.TextReader.__cinit__
pandas.errors.EmptyDataError: No columns to parse from file
The solution was to simply remove the log file which allowed the script to re-create it.
The headings are the following in case you need to recreate it for some reason:
prompt, outdir, skip_grid, skip_save, ddim_steps, fixed_code, ddim_eta, n_iter, H, W, C, f, n_samples, n_rows, scale, device, from_file, seed, unet_bs, turbo, precision, format, sampler, ckpt
It's worth noting that I'm actually running OptimizedSD as it works well (albeit slower) with less video ram. There's some chance the log format is changed.