mirror of
https://github.com/deepseek-ai/Janus.git
synced 2026-11-05 00:57:18 +00:00
[GH-ISSUE #128] RuntimeError: Input type (struct c10::BFloat16) and bias type (struct c10::Half) should be the same #97
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/Janus#97
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @harry2141985 on GitHub (Feb 2, 2025).
Original GitHub issue: https://github.com/deepseek-ai/Janus/issues/128
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
@Ameni-Fathallah commented on GitHub (Feb 15, 2025):
solution?