Closed elcolie closed 1 year ago
@yiyixuxu could you have a look here maybe? :-)
@elcolie Hi: Thanks for reporting this issue!
StableDiffusionControlNetInpaintPipeline
requires 3 image inputs: image
, mask_image
and control_image
. I think what happened here is that you passed your control_image
as image
, and your control_image
argument is left to be set to default None
hence the type error
You will also need to pass your masks
image = pipe(
f"{base_prompt}, {add_prompt}",
image = [init_image] * 2,
mask_image = [ mask_cloth_image, mask_background_image],
control_image=my_images,
negative_prompt=negative_prompt,
num_inference_steps=50,
generator=generator,
eta=eta,
strength=strength,
guidance_scale=guidance_scale,
controlnet_conditioning_scale=[1.0, 0.8]
).images[0].save(f"{out_dir}/{strength}_{guidance_scale}_{eta}_{add_prompt}.png")
Let me know if this makes sense :)
YiYi
@yiyixuxu I think this might be an open issue for img2img pipeline. When i try passing in the image it gives me that error. Is there a sort of control image that is required for the StableDiffusionControlNetImg2ImgPipeline? i do not want to open another issue is this is a user error... Here is the debugger log:
Exception has occurred: TypeError
image must be passed and be one of PIL image, numpy array, torch tensor, list of PIL images, list of numpy arrays or list of torch tensors, but is <class 'NoneType'>
@qnlbnsl it seems like your image
argument is empty
Describe the bug
StableDiffusionControlNetInpaintPipeline
raises TypeError: For multiple controlnets:
image
must be type `list``Reproduction
Logs
System Info
OSX: 13.4.1(c) RAM: 96GB absl-py==1.4.0 accelerate==0.19.0 aiofiles==23.1.0 aiohttp==3.8.4 aiosignal==1.3.1 altair==5.0.0 ansiwrap==0.8.4 antlr4-python3-runtime==4.9.3 anyio==3.6.2 appnope==0.1.3 asttokens==2.2.1 async-generator==1.10 async-timeout==4.0.2 attrs==23.1.0 autopep8==2.0.2 backcall==0.2.0 backoff==2.2.1 beautifulsoup4==4.12.2 bleach==6.0.0 bson==0.5.10 build==0.10.0 certifi==2023.5.7 cffi==1.15.1 chardet==3.0.4 charset-normalizer==3.1.0 click==8.1.3 cmake==3.26.4 colorama==0.4.6 comm==0.1.3 commonmark==0.9.1 contourpy==1.0.7 controlnet-aux==0.0.5 cycler==0.11.0 datasets==2.12.0 debuglater==1.4.4 debugpy==1.6.7 decorator==5.1.1 defusedxml==0.7.1 diffusers==0.18.1 dill==0.3.6 einops==0.6.1 entrypoints==0.4 evaluate==0.4.0 exceptiongroup==1.1.1 executing==1.2.0 fastapi==0.95.2 fastjsonschema==2.17.1 ffmpy==0.3.0 filelock==3.12.0 flatbuffers==23.5.26 fonttools==4.39.4 frozenlist==1.3.3 fsspec==2023.5.0 gradio==3.32.0 gradio_client==0.2.5 h11==0.14.0 h5py==3.9.0 httpcore==0.17.2 httpx==0.24.1 huggingface-hub==0.14.1 humanize==4.6.0 idna==3.4 imageio==2.31.0 importlib-metadata==6.6.0 invisible-watermark==0.2.0 ipdb==0.13.13 ipykernel==6.23.1 ipython==8.13.2 jedi==0.18.2 Jinja2==3.1.2 jprq==2.1.0 jsonschema==4.17.3 jupyter_client==8.2.0 jupyter_core==5.3.0 jupyterlab-pygments==0.2.2 jupytext==1.14.5 kiwisolver==1.4.4 lazy_loader==0.2 linkify-it-py==2.0.2 markdown-it-py==2.2.0 MarkupSafe==2.1.2 matplotlib==3.7.1 matplotlib-inline==0.1.6 mdit-py-plugins==0.3.3 mdurl==0.1.2 mediapipe==0.10.1 mistune==2.0.5 monotonic==1.6 mpmath==1.3.0 multidict==6.0.4 multiprocess==0.70.14 mypy-extensions==1.0.0 nbclient==0.7.4 nbconvert==7.4.0 nbformat==5.8.0 nest-asyncio==1.5.6 networkx==3.1 numpy==1.24.3 omegaconf==2.3.0 openai==0.27.7 opencv-contrib-python==4.7.0.72 opencv-python==4.7.0.72 orjson==3.8.13 outcome==1.2.0 packaging==23.1 pandas==2.0.1 pandocfilters==1.5.0 papermill==2.4.0 parso==0.8.3 pexpect==4.8.0 pickleshare==0.7.5 Pillow==9.5.0 pip-tools==6.13.0 platformdirs==3.5.1 ploomber==0.22.3 ploomber-core==0.2.10 ploomber-engine==0.0.28 ploomber-scaffold==0.3.1 posthog==3.0.1 prompt-toolkit==3.0.38 protobuf==3.20.3 psutil==5.9.5 ptyprocess==0.7.0 pure-eval==0.2.2 pyarrow==12.0.0 pycodestyle==2.10.0 pycparser==2.21 pydantic==1.10.7 pydub==0.25.1 pyflakes==3.0.1 Pygments==2.15.1 pyparsing==3.0.9 pypdf==3.9.0 pyproject_hooks==1.0.0 pyre-extensions==0.0.29 pyrsistent==0.19.3 PySocks==1.7.1 python-dateutil==2.8.2 python-dotenv==1.0.0 python-multipart==0.0.6 pytz==2023.3 PyWavelets==1.4.1 PyYAML==6.0 pyzmq==25.0.2 regex==2023.5.5 requests==2.30.0 responses==0.18.0 rich==10.14.0 safetensors==0.3.1 scikit-image==0.21.0 scipy==1.10.1 selenium==4.10.0 semantic-version==2.10.0 simple-photo-gallery @ file:///Users/sarit/study/simple-photo-gallery six==1.16.0 sniffio==1.3.0 sortedcontainers==2.4.0 sounddevice==0.4.6 soupsieve==2.4.1 SQLAlchemy==2.0.15 sqlparse==0.4.4 stack-data==0.6.2 starlette==0.27.0 super-image==0.1.7 sympy==1.12 tabulate==0.9.0 tenacity==8.2.2 textwrap3==0.9.2 tifffile==2023.4.12 tiktoken==0.4.0 timm==0.9.2 tinycss2==1.2.1 tokenizers==0.13.3 toml==0.10.2 tomli==2.0.1 toolz==0.12.0 torch==2.0.1 torchvision==0.15.2 tornado==6.3.2 tqdm==4.65.0 traitlets==5.9.0 transformers==4.29.2 trio==0.22.0 trio-websocket==0.10.3 triton-pre-mlir @ git+https://github.com/vchiley/triton.git@2dd3b957698a39bbca615c02a447a98482c144a3#subdirectory=python typing-inspect==0.9.0 typing_extensions==4.5.0 tzdata==2023.3 uc-micro-py==1.0.2 urllib3==2.0.2 uvicorn==0.22.0 wcwidth==0.2.6 webencodings==0.5.1 websockets==11.0.3 wsproto==1.2.0 xformers==0.0.20 xxhash==3.2.0 yarl==1.9.2 zipp==3.15.0 Python 3.11.3 CPU: M2
Who can help?
@patrickvonplaten @stevhliu @pcuenca