mirror of
https://github.com/deepseek-ai/Janus.git
synced 2026-11-05 00:57:18 +00:00
[GH-ISSUE #83] macOS 15.1.1 (24B91),M3 chip , 使用1B模型时(通过 app_januspro.py),图片对话正常,但生成图片报错 RuntimeError: Input type (c10::BFloat16) and bias type (c10::Half) should be the same, #63
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#63
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 @craii on GitHub (Jan 29, 2025).
Original GitHub issue: https://github.com/deepseek-ai/Janus/issues/83
raceback (most recent call last):
File "/Users/eliascheung/Documents/Janus/WORKENV/lib/python3.8/site-packages/gradio/queueing.py", line 536, in process_events
response = await route_utils.call_process_api(
File "/Users/eliascheung/Documents/Janus/WORKENV/lib/python3.8/site-packages/gradio/route_utils.py", line 322, in call_process_api
output = await app.get_blocks().process_api(
File "/Users/eliascheung/Documents/Janus/WORKENV/lib/python3.8/site-packages/gradio/blocks.py", line 1935, in process_api
result = await self.call_function(
File "/Users/eliascheung/Documents/Janus/WORKENV/lib/python3.8/site-packages/gradio/blocks.py", line 1520, in call_function
prediction = await anyio.to_thread.run_sync( # type: ignore
File "/Users/eliascheung/Documents/Janus/WORKENV/lib/python3.8/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "/Users/eliascheung/Documents/Janus/WORKENV/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 2364, in run_sync_in_worker_thread
return await future
File "/Users/eliascheung/Documents/Janus/WORKENV/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 864, in run
result = context.run(func, *args)
File "/Users/eliascheung/Documents/Janus/WORKENV/lib/python3.8/site-packages/gradio/utils.py", line 826, in wrapper
response = f(*args, **kwargs)
File "/Users/eliascheung/Documents/Janus/WORKENV/lib/python3.8/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "./demo/app_januspro.py", line 160, in generate_image
output, patches = generate(input_ids,
File "./demo/app_januspro.py", line 118, in generate
patches = vl_gpt.gen_vision_model.decode_code(generated_tokens.to(dtype=torch.int),
File "/Users/eliascheung/Documents/Janus/janus/models/vq_model.py", line 507, in decode_code
dec = self.decode(quant_b)
File "/Users/eliascheung/Documents/Janus/janus/models/vq_model.py", line 502, in decode
dec = self.decoder(quant)
File "/Users/eliascheung/Documents/Janus/WORKENV/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/Users/eliascheung/Documents/Janus/WORKENV/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/Users/eliascheung/Documents/Janus/janus/models/vq_model.py", line 208, in forward
h = block.upsample(h)
File "/Users/eliascheung/Documents/Janus/WORKENV/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/Users/eliascheung/Documents/Janus/WORKENV/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/Users/eliascheung/Documents/Janus/janus/models/vq_model.py", line 426, in forward
x = self.conv(x)
File "/Users/eliascheung/Documents/Janus/WORKENV/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/Users/eliascheung/Documents/Janus/WORKENV/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/Users/eliascheung/Documents/Janus/WORKENV/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 458, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/Users/eliascheung/Documents/Janus/WORKENV/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 454, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
RuntimeError: Input type (c10::BFloat16) and bias type (c10::Half) should be the same
@Hxxxz0 commented on GitHub (Jan 29, 2025):
我也遇到了同样的问题 mac 无法运行生成的这个程序
@craii commented on GitHub (Jan 29, 2025):
thanks to @takahirosir 's work repled on https://github.com/deepseek-ai/Janus/issues/66#issuecomment-2619865019
github.com/takahirosir/Janus@ff1e732981 (diff-1b6c4cb198)it works for me but makes the inference way more slower than generating image of the same size with comfyui on my macbook
@craii commented on GitHub (Jan 29, 2025):
please fix this
@jerryzhao173985 commented on GitHub (Jan 31, 2025):
same for me
@kipa200 commented on GitHub (Feb 1, 2025):
RuntimeError: probability tensor contains either
inf,nanor element < 0up is my error