instruct-pix2pix
instruct-pix2pix copied to clipboard
AttributeError: module transformers has no attribute CLIPImageProcessor
Hello, when running
import PIL import requests import torch from diffusers import StableDiffusionInstructPix2PixPipeline, EulerAncestralDiscreteScheduler
model_id = "timbrooks/instruct-pix2pix" pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, torch_dtype=torch.float16, revision="fp16", safety_checker=None) pipe.to("cuda") pipe.enable_attention_slicing()
i keep encountering "AttributeError: module transformers has no attribute CLIPImageProcessor"
i tried installing clip and updating transformers, but same error. The only issue similar issue i could find was
https://self-development.info/%E3%80%90stable-diffusion%E3%80%91%E3%82%B5%E3%83%B3%E3%83%80%E3%83%BC%E3%83%90%E3%83%BC%E3%83%89%E9%A2%A8%E3%81%AE%E7%94%BB%E5%83%8F%E3%82%92%E7%94%9F%E6%88%90%E3%81%99%E3%82%8B/
and google translate didnt help much lol

I had it too, not sure how I solved it but I think you need to install a newer version of transformers
the command is: pip install -U transformers I believe
let me know if it doesnt work
RuntimeError: CUDA out of memory. Tried to allocate 48.00 MiB (GPU 0; 6.00 GiB total capacity; 5.26 GiB already allocated; 0 bytes free; 5.30 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
geting this with and without --no-half in the bat file so can you help me out with that
I am trying to run this on Kaggle and I'm having the same issue.