InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

[bug]: TextualInversionManager refusing to overwrite already-loaded token '<dan-mumford>'

Open visualinventor opened this issue 3 years ago • 4 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

OS

Linux

GPU

cuda

VRAM

12gb 3080ti

What happened?

>> TextualInversionManager refusing to overwrite already-loaded token '<dan-mumford>'
DEBUG: Injecting token <dan-mumford>
Generating:   0%|                                                                                                                                                                        | 0/4 [00:00<?, ?it/s]
'EulerAncestralDiscreteScheduler' object has no attribute 'make_schedule'

Traceback (most recent call last):
  File "/home/tim/Development/StableDiffusion/InvokeAI-2.2.6/backend/invoke_ai_web_server.py", line 1216, in generate_images
    self.generate.prompt2image(
  File "/home/tim/Development/StableDiffusion/InvokeAI-2.2.6/ldm/generate.py", line 498, in prompt2image
    results = generator.generate(
  File "/home/tim/Development/StableDiffusion/InvokeAI-2.2.6/ldm/invoke/ckpt_generator/base.py", line 101, in generate
    image = make_image(x_T)
  File "/home/tim/Development/StableDiffusion/invokeai/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "/home/tim/Development/StableDiffusion/InvokeAI-2.2.6/ldm/invoke/ckpt_generator/txt2img.py", line 40, in make_image
    sampler.make_schedule(ddim_num_steps=steps, ddim_eta=ddim_eta, verbose=False)
AttributeError: 'EulerAncestralDiscreteScheduler' object has no attribute 'make_schedule'

I was zipping along with the new code base 2.3.0 (yay diffusers - nice work all) when I changed the model from SD2.1 to SD1.5 I started getting this error and I can't seem to get it working again. I am using a textual inversion called from https://civitai.com/models/470/dan-mumford. It was working well before I started switching checkpoints. Oddly enough it only failed on the SD1.5 switch it worked on both SD2.1 and another protogen-34.ckpt I was using.

I'm using ZorinOS distro of Ubuntu. Actually this branch fixes a memory bug I was facing so things are working pretty well except for this.

Screenshots

sd-1 5error

Additional context

No response

Contact Details

No response

visualinventor avatar Jan 17 '23 03:01 visualinventor

After a bit more testing it seems like if I try to use the SD1.4 or SD1.5 ckpt it appears to ONLY load 2.1 regardless??

Not sure if it matters, but I am using the max_models =1 since >=2.2.5 has been taxing my 16gb of ram

I hope that sheds some more light on this.

UPDATE: I am upgrading from 2.2.5 to 2.3.0 it looks like it is using my ckpt's for 1.4 and 1.5 since they were on the system already?

visualinventor avatar Jan 17 '23 03:01 visualinventor

I'm now consistently getting this error when trying to load either SD1.4 or SD1.5. All other ckpt's or diffusers are working Also I should mention I have both of these old ckpt files in my ldm folder as was in 2.2.5

'EulerAncestralDiscreteScheduler' object has no attribute 'make_schedule'


Traceback (most recent call last):
  File "/home/tim/Development/StableDiffusion/InvokeAI-2.2.6/backend/invoke_ai_web_server.py", line 1216, in generate_images
    self.generate.prompt2image(
  File "/home/tim/Development/StableDiffusion/InvokeAI-2.2.6/ldm/generate.py", line 498, in prompt2image
    results = generator.generate(
  File "/home/tim/Development/StableDiffusion/InvokeAI-2.2.6/ldm/invoke/ckpt_generator/base.py", line 101, in generate
    image = make_image(x_T)
  File "/home/tim/Development/StableDiffusion/invokeai/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "/home/tim/Development/StableDiffusion/InvokeAI-2.2.6/ldm/invoke/ckpt_generator/txt2img.py", line 40, in make_image
    sampler.make_schedule(ddim_num_steps=steps, ddim_eta=ddim_eta, verbose=False)
AttributeError: 'EulerAncestralDiscreteScheduler' object has no attribute 'make_schedule'

visualinventor avatar Jan 17 '23 04:01 visualinventor

I'm on an M1 Mac and was having the same problem as you after the switch to diffusers but noticed in the config file there was some weirdness going on. The new config after the update had this:

stable-diffusion-1.5:
  description: Stable Diffusion version 1.5 weight file (4.27 GB)
  weights: models/ldm/stable-diffusion-v1/v1-5-pruned-emaonly.ckpt
  config: configs/stable-diffusion/v1-inference.yaml
  width: 512
  height: 512
  vae:
    repo_id: stabilityai/sd-vae-ft-mse
  repo_id: runwayml/stable-diffusion-v1-5
  format: diffusers

And I noticed that the 2.1 stable diffusion's configs were this:

stable-diffusion-2.1-768:
  description: Stable Diffusion version 2.1 diffusers model, trained on 768x768 images
    (5.21 GB)
  repo_id: stabilityai/stable-diffusion-2-1
  format: diffusers
  default: true
stable-diffusion-2.1-base:
  description: Stable Diffusion version 2.1 diffusers base model, trained on 512x512
    images (5.21 GB)
  repo_id: stabilityai/stable-diffusion-2-1-base
  format: diffusers

So i edited the 1.5 to look similar:

stable-diffusion-1.5:
  description: Stable Diffusion version 1.5 weight file (4.27 GB)
  repo_id: runwayml/stable-diffusion-v1-5
  format: diffusers

reloaded everything up and it worked.

UPDATE: the above works for 512x512, however, something like 768x512 yields nonsense

leifrogers avatar Jan 21 '23 01:01 leifrogers

There has been no activity in this issue for 14 days. If this issue is still being experienced, please reply with an updated confirmation that the issue is still being experienced with the latest release.

github-actions[bot] avatar Mar 12 '23 06:03 github-actions[bot]