stable-diffusion-videos icon indicating copy to clipboard operation
stable-diffusion-videos copied to clipboard

'StableDiffusionPipeline' object has no attribute 'tiled'

Open entangledloops opened this issue 2 years ago • 1 comments

The requirements.txt seem to be missing an install for package realesrgan. After installing that, I hit the error:

  File "/home/snd/bin/miniconda3/envs/ldm/lib/python3.8/site-packages/stable_diffusion_videos/image_generation.py", line 168, in generate_images
    tiled=pipeline.tiled,
AttributeError: 'StableDiffusionPipeline' object has no attribute 'tiled'

You should probably pin the versions in requirements.txt.

entangledloops avatar Oct 28 '22 15:10 entangledloops

Looking at your error, it seems that you are using a diffusers StableDiffusionPipeline instead of the StableDiffusionWalkPipeline from this package to call that generate_images fn. That pipeline would indeed not have the tiled attribute, because it only exists in my pipeline here.


As for realesrgan install (which is separate issue from this one), it was originally optional, but I got lazy along the way and now it will try to import it either way. I'll just add it to requirements.txt then.

nateraw avatar Oct 28 '22 18:10 nateraw

Yup, you're right. It was some Jupyter state mixup. I just reran the same code:

from stable_diffusion_videos import StableDiffusionWalkPipeline, Interface
import torch

pipe = StableDiffusionWalkPipeline.from_pretrained(
    "runwayml/stable-diffusion-v1-5", 
    torch_dtype=torch.float16, 
    revision="fp16"
)
device = "cuda"
pipe.safety_checker = lambda images, clip_input: (images, False)
pipe = pipe.to(device)

interface = Interface(pipe)
interface.launch()

And it works this time. Closing the issue.

entangledloops avatar Oct 29 '22 18:10 entangledloops