Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: Input type (struct c10::BFloat16) and bias type (struct c10::Half) should be the same #128

Open
harry2141985 opened this issue Feb 2, 2025 · 0 comments

Comments

@harry2141985
Copy link

IMPORTANT: You are using gradio version 3.48.0, however version 4.44.1 is available, please upgrade.

model.safetensors: 1%|▌ | 41.9M/4.18G [00:34<1:00:58, 1.13MB/s]
Could not create share link. Please check your internet connection or our status page: https://status.gradio.app.
model.safetensors: 100%|██████████████████████████████████████████████████████████| 4.18G/4.18G [44:22<00:00, 1.57MB/s]
Traceback (most recent call last):
File "F:\janus\Janus-main\venv\lib\site-packages\gradio\routes.py", line 534, in predict
output = await route_utils.call_process_api(
File "F:\janus\Janus-main\venv\lib\site-packages\gradio\route_utils.py", line 226, in call_process_api
output = await app.get_blocks().process_api(
File "F:\janus\Janus-main\venv\lib\site-packages\gradio\blocks.py", line 1550, in process_api
result = await self.call_function(
File "F:\janus\Janus-main\venv\lib\site-packages\gradio\blocks.py", line 1185, in call_function
prediction = await anyio.to_thread.run_sync(
File "F:\janus\Janus-main\venv\lib\site-packages\anyio\to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "F:\janus\Janus-main\venv\lib\site-packages\anyio_backends_asyncio.py", line 2461, in run_sync_in_worker_thread
return await future
File "F:\janus\Janus-main\venv\lib\site-packages\anyio_backends_asyncio.py", line 962, in run
result = context.run(func, *args)
File "F:\janus\Janus-main\venv\lib\site-packages\gradio\utils.py", line 661, in wrapper
response = f(*args, **kwargs)
File "F:\janus\Janus-main\venv\lib\site-packages\torch\utils_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "F:\janus\Janus-main\demo\app_januspro.py", line 160, in generate_image
output, patches = generate(input_ids,
File "F:\janus\Janus-main\demo\app_januspro.py", line 118, in generate
patches = vl_gpt.gen_vision_model.decode_code(generated_tokens.to(dtype=torch.int),
File "F:\janus\Janus-main\janus\models\vq_model.py", line 507, in decode_code
dec = self.decode(quant_b)
File "F:\janus\Janus-main\janus\models\vq_model.py", line 502, in decode
dec = self.decoder(quant)
File "F:\janus\Janus-main\venv\lib\site-packages\torch\nn\modules\module.py", line 1739, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "F:\janus\Janus-main\venv\lib\site-packages\torch\nn\modules\module.py", line 1750, in _call_impl
return forward_call(*args, **kwargs)
File "F:\janus\Janus-main\janus\models\vq_model.py", line 208, in forward
h = block.upsample(h)
File "F:\janus\Janus-main\venv\lib\site-packages\torch\nn\modules\module.py", line 1739, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "F:\janus\Janus-main\venv\lib\site-packages\torch\nn\modules\module.py", line 1750, in _call_impl
return forward_call(*args, **kwargs)
File "F:\janus\Janus-main\janus\models\vq_model.py", line 426, in forward
x = self.conv(x)
File "F:\janus\Janus-main\venv\lib\site-packages\torch\nn\modules\module.py", line 1739, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "F:\janus\Janus-main\venv\lib\site-packages\torch\nn\modules\module.py", line 1750, in _call_impl
return forward_call(*args, **kwargs)
File "F:\janus\Janus-main\venv\lib\site-packages\torch\nn\modules\conv.py", line 554, in forward
return self._conv_forward(input, self.weight, self.bias)
File "F:\janus\Janus-main\venv\lib\site-packages\torch\nn\modules\conv.py", line 549, in _conv_forward
return F.conv2d(
RuntimeError: Input type (struct c10::BFloat16) and bias type (struct c10::Half) should be the same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant