Closed theProgrammingBox closed 1 year ago
I experienced a similar issue but fixed it by downgrading diffusers to diffusers==0.3.0.
Thanks! For those reading, I just put !pip install transformers -q !pip install diffusers==0.3.0 -q not sure what -q does but it works
The code has been updated for diffusers==0.4.1
. Any new errors/bugs can be discussed in a new issue.
Everything runs but I am getting an error when running stablediffusion("A fantasy landscape with a pine forest, trending on artstation", seed=2483964025, width=768)
The error says
AttributeError Traceback (most recent call last) in
1 prompt_token("A fantasy landscape with a pine forest, trending on artstation", 7)
----> 2 stablediffusion("A fantasy landscape with a pine forest, trending on artstation", seed=2483964025, width=768)
3 stablediffusion("A fantasy landscape with a pine forest, trending on artstation", prompt_edit_token_weights=[(2, -3)], seed=2483964025, width=768)
4 stablediffusion("A fantasy landscape with a pine forest, trending on artstation", prompt_edit_token_weights=[(2, -8)], seed=2483964025, width=768)
5 stablediffusion("A fantasy landscape with a pine forest, trending on artstation", "A fantasy landscape with a pine forest, trending on artstation", prompt_edit_token_weights=[(2, 2), (7, 5)], seed=2483964025, width=768)
2 frames /usr/local/lib/python3.7/dist-packages/diffusers/schedulers/scheduling_lms_discrete.py in add_noise(self, original_samples, noise, timesteps) 260 sigmas = self.sigmas.to(original_samples.device) 261 schedule_timesteps = self.timesteps.to(original_samples.device) --> 262 timesteps = timesteps.to(original_samples.device) 263 if isinstance(timesteps, torch.IntTensor) or isinstance(timesteps, torch.LongTensor): 264 deprecate(
AttributeError: 'int' object has no attribute 'to'