nixified-ai/flake

out of date projects

fnordpig opened this issue · 2 comments

Hi! The projects for both KoboldAI and InvokeAI are running out of date. The currently InvokeAI rev is covered here, but 3.0.0 pre is staging and a cadence for updates would be useful (#40 ). KoboldAI seems to have forked with this fork being the most active: henk717/KoboldAI. Happy to help, but I'm a bit of a Nix newbie and am not quite sure how the pixnixify step is managed.

I can't seem to install and use Stable Diffusion XL for this reason... the error message is pretty obscure but googling it seems to indicate that "diffusers" is out of date. The model downloaded and installed fine (I added it to the YAML) but then loading it produced this error:

** model stable-diffusion-xl-base-1.0 could not be loaded: 'UNet2DConditionModel' object has no attribute 'add_embedding'██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 10.3G/10.3G [14:25<00:00, 15.3MB/s]
Traceback (most recent call last):;: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.78G/2.78G [14:27<00:00, 14.6MB/s]
  File "/nix/store/h4035a8gz1kqyvza3lpqw77qmrny9hzs-python3.10-InvokeAI-2.3.1.post2/lib/python3.10/site-packages/ldm/generate.py", line 956, in set_model                                                                                          | 1.03G/10.3G [04:17<18:38, 8.26MB/s]
    model_data = cache.get_model(model_name)██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▉            | 9.66G/10.3G [14:23<00:44, 13.7MB/s]
  File "/nix/store/h4035a8gz1kqyvza3lpqw77qmrny9hzs-python3.10-InvokeAI-2.3.1.post2/lib/python3.10/site-packages/ldm/invoke/model_manager.py", line 119, in get_model██████████████████████████████████████████████████████████████████            | 9.67G/10.3G [14:24<00:46, 12.9MB/s]
    requested_model, width, height, hash = self._load_model(model_name)████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 10.3G/10.3G [14:50<00:00, 22.6MB/s]
  File "/nix/store/h4035a8gz1kqyvza3lpqw77qmrny9hzs-python3.10-InvokeAI-2.3.1.post2/lib/python3.10/site-packages/ldm/invoke/model_manager.py", line 355, in _load_model
    model, width, height, model_hash = self._load_diffusers_model(mconfig)
  File "/nix/store/h4035a8gz1kqyvza3lpqw77qmrny9hzs-python3.10-InvokeAI-2.3.1.post2/lib/python3.10/site-packages/ldm/invoke/model_manager.py", line 523, in _load_diffusers_model
    pipeline = StableDiffusionGeneratorPipeline.from_pretrained(
  File "/nix/store/znwn5m13gh87v74wbvl2gfmyr2hykwqw-python3.10-diffusers-0.14.0/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py", line 944, in from_pretrained
    loaded_sub_model = load_method(os.path.join(cached_folder, name), **loading_kwargs)
  File "/nix/store/znwn5m13gh87v74wbvl2gfmyr2hykwqw-python3.10-diffusers-0.14.0/lib/python3.10/site-packages/diffusers/models/modeling_utils.py", line 583, in from_pretrained
    set_module_tensor_to_device(model, param_name, param_device, value=param)
  File "/nix/store/qkfgscjdvhz28shhvbz657g8k55j2rnz-python3.10-accelerate-0.13.1/lib/python3.10/site-packages/accelerate/utils/modeling.py", line 106, in set_module_tensor_to_device
    new_module = getattr(module, split)
  File "/nix/store/k7f999ns4h0v0zb3yjnpka3935pydw2w-python3.10-torch-1.13.1/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1269, in __getattr__
    raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'UNet2DConditionModel' object has no attribute 'add_embedding'