facebookincubator / AITemplate

AITemplate is a Python framework which renders neural network into high performance CUDA/HIP C++ code. Specialized for FP16 TensorCore (NVIDIA GPU) and MatrixCore (AMD GPU) inference.
Apache License 2.0
4.54k stars 363 forks source link

something wrong: python examples/05_stable_diffusion/demo_img2img.py #116

Open CkShibit opened 1 year ago

CkShibit commented 1 year ago

Traceback (most recent call last): File "/workspace/AITemplate/examples/05_stable_diffusion/demo_img2img.py", line 69, in run() File "/root/miniconda3/envs/ai/lib/python3.9/site-packages/click/core.py", line 1130, in call return self.main(args, kwargs) File "/root/miniconda3/envs/ai/lib/python3.9/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/root/miniconda3/envs/ai/lib/python3.9/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, ctx.params) File "/root/miniconda3/envs/ai/lib/python3.9/site-packages/click/core.py", line 760, in invoke return __callback(args, kwargs) File "/workspace/AITemplate/examples/05_stable_diffusion/demo_img2img.py", line 41, in run pipe = StableDiffusionImg2ImgAITPipeline.from_pretrained( File "/root/miniconda3/envs/ai/lib/python3.9/site-packages/diffusers/pipeline_utils.py", line 679, in from_pretrained model = pipeline_class(init_kwargs) File "/workspace/AITemplate/examples/05_stable_diffusion/pipeline_stable_diffusion_img2img_ait.py", line 100, in init scheduler = scheduler.set_format("pt") AttributeError: 'PNDMScheduler' object has no attribute 'set_format'

tchaton commented 1 year ago

@CkShibit I removed that line and it seems to work.

Also, I found the generated image are quite bad with img2img demo.

Here is what's generated.

Screenshot 2022-12-21 at 11 11 43

Here are my dependencies

aiobotocore==2.4.1
aiohttp==3.8.3
aioitertools==0.11.0
aiosignal==1.3.1
aitemplate @ file:///content/AITemplate/python/dist/aitemplate-0.1.dev1-py3-none-any.whl
anyio==3.6.2
arrow==1.2.3
async-timeout==4.0.2
attrs==22.1.0
beautifulsoup4==4.11.1
black==22.12.0
bleach==5.0.1
blessed==1.19.1
botocore==1.27.59
certifi==2019.11.28
cffi==1.15.1
chardet==3.0.4
charset-normalizer==2.1.1
click==8.1.3
commonmark==0.9.1
croniter==1.3.8
cryptography==38.0.4
dbus-python==1.2.16
deepdiff==6.2.2
diffusers==0.11.1
distlib==0.3.6
dnspython==2.2.1
docker==6.0.1
docutils==0.19
email-validator==1.3.0
exceptiongroup==1.0.4
fastapi==0.88.0
filelock==3.8.2
frozenlist==1.3.3
fsspec==2022.11.0
h11==0.14.0
httpcore==0.16.2
httptools==0.5.0
httpx==0.23.1
huggingface-hub==0.11.1
idna==2.8
importlib-metadata==5.1.0
iniconfig==1.1.1
inquirer==3.0.0
isort==5.11.2
itsdangerous==2.1.2
jaraco.classes==3.2.3
jeepney==0.8.0
Jinja2==3.1.2
jmespath==1.0.1
keyring==23.11.0
lightning @ file:///content/lightning-1.9.0.dev0.tar.gz
lightning-cloud @ file:///content/lightning_cloud-0.5.13.tar.gz
lightning-launcher @ file:///content/lightning_launcher-0.0.42.tar.gz
lightning-utilities==0.4.2
MarkupSafe==2.1.1
more-itertools==9.0.0
multidict==6.0.3
mypy-extensions==0.4.3
numpy==1.24.0
nvidia-cublas-cu11==11.10.3.66
nvidia-cuda-nvrtc-cu11==11.7.99
nvidia-cuda-runtime-cu11==11.7.99
nvidia-cudnn-cu11==8.5.0.96
ordered-set==4.1.0
orjson==3.8.3
packaging==22.0
pathspec==0.10.3
Pillow==9.3.0
pkginfo==1.9.2
platformdirs==2.6.0
pluggy==1.0.0
protobuf==3.20.1
psutil==5.9.4
pycparser==2.21
pydantic==1.10.2
Pygments==2.13.0
PyGObject==3.36.0
PyJWT==2.6.0
pytest==7.2.0
python-apt==2.0.0+ubuntu0.20.4.8
python-dateutil==2.8.2
python-dotenv==0.21.0
python-editor==1.0.4
python-multipart==0.0.5
PyYAML==6.0
readchar==4.0.3
readme-renderer==37.3
redis==4.4.0
regex==2022.10.31
requests==2.28.1
requests-toolbelt==0.10.1
requests-unixsocket==0.2.0
rfc3986==1.5.0
rich==12.6.0
s3fs==2022.11.0
SecretStorage==3.3.3
six==1.14.0
sniffio==1.3.0
soupsieve==2.3.2.post1
starlette==0.22.0
starsessions==1.3.0
tabulate==0.9.0
tensorboardX==2.5.1
tokenizers==0.13.2
tomli==2.0.1
torch==1.13.1
torchmetrics==0.11.0
tqdm==4.64.1
traitlets==5.7.1
transformers==4.25.1
twine==4.0.2
typing_extensions==4.4.0
ujson==5.6.0
urllib3==1.26.13
uvicorn==0.20.0
uvloop==0.17.0
virtualenv==20.17.1
watchfiles==0.18.1
wcwidth==0.2.5
webencodings==0.5.1
websocket-client==1.4.2
websockets==10.4
wrapt==1.14.1
yarl==1.8.2
zipp==3.11.0
tchaton commented 1 year ago

Additional question: I wondered how can the model be compiled with stabilityai/stable-diffusion-2 and using runwayml/stable-diffusion-v1-5 for the img2img demo example.

tchaton commented 1 year ago

@antinucleon