-
Notifications
You must be signed in to change notification settings - Fork 820
Description
dear大佬,
使用app.py 脚本,运行后出现bug,用的是第一个例子,4张图的。

[Debug] Generate image using aspect ratio [Instagram (1:1)] => 1024 x 1024
Start inference...
[Debug] Prompt: instagram photo, portrait photo of a woman img, colorful, perfect face, natural skin, hard shadows, film grain,
[Debug] Neg Prompt: (asymmetry, worst quality, low quality, illustration, 3d, 2d, painting, cartoons, sketch), open mouth
10
Traceback (most recent call last):
File "/data/envs/photomaker/lib/python3.10/site-packages/gradio/queueing.py", line 626, in process_events
response = await route_utils.call_process_api(
File "/data/envs/photomaker/lib/python3.10/site-packages/gradio/route_utils.py", line 322, in call_process_api
output = await app.get_blocks().process_api(
File "/data/envs/photomaker/lib/python3.10/site-packages/gradio/blocks.py", line 2220, in process_api
result = await self.call_function(
File "/data/envs/photomaker/lib/python3.10/site-packages/gradio/blocks.py", line 1731, in call_function
prediction = await anyio.to_thread.run_sync( # type: ignore
File "/data/envs/photomaker/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "/data//envs/photomaker/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2470, in run_sync_in_worker_thread
return await future
File "/data//envs/photomaker/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 967, in run
result = context.run(func, *args)
File "/data//envs/photomaker/lib/python3.10/site-packages/gradio/utils.py", line 940, in wrapper
response = f(*args, **kwargs)
File "/data/soft/anaconda3/envs/photomaker/lib/python3.10/site-packages/gradio/utils.py", line 940, in wrapper
response = f(*args, **kwargs)
File "/data2//PhotoMaker/gradio_demo/app.py", line 88, in generate_image
images = pipe(
File "/data/envs/photomaker/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "/data/3/envs/photomaker/lib/python3.10/site-packages/photomaker/pipeline.py", line 708, in call
prompt_embeds = self.id_encoder(id_pixel_values, prompt_embeds, class_tokens_mask)
File "/data/s3/envs/photomaker/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/da3/envs/photomaker/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "/da/envs/photomaker/lib/python3.10/site-packages/photomaker/model.py", line 107, in forward
updated_prompt_embeds = self.fuse_module(prompt_embeds, id_embeds, class_tokens_mask)
File "/data/s/envs/photomaker/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/data/s3/envs/photomaker/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "/data/envs/photomaker/lib/python3.10/site-packages/photomaker/model.py", line 83, in forward
stacked_id_embeds = self.fuse_fn(image_token_embeds, valid_id_embeds)
File "/data/3/envs/photomaker/lib/python3.10/site-packages/photomaker/model.py", line 49, in fuse_fn
stacked_id_embeds = torch.cat([prompt_embeds, id_embeds], dim=-1)
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 8 but got size 4 for tensor number 1 in the list.