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

Storydiffusion_Sampler: Placeholder storage has not been allocated on MPS device! #114

Open
Gyyyyyyyyds opened this issue Oct 28, 2024 · 5 comments

Comments

@Gyyyyyyyyds
Copy link

ComfyUI Error Report

Error Details

  • Node Type: Storydiffusion_Sampler
  • Exception Type: RuntimeError
  • Exception Message: Placeholder storage has not been allocated on MPS device!

Stack Trace

  File "/Users/gaoyuan/ComfyUI/execution.py", line 323, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)

  File "/Users/gaoyuan/ComfyUI/execution.py", line 198, in get_output_data
    return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)

  File "/Users/gaoyuan/ComfyUI/execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)

  File "/Users/gaoyuan/ComfyUI/execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))

  File "/Users/gaoyuan/ComfyUI/custom_nodes/ComfyUI_StoryDiffusion/Storydiffusion_node.py", line 1823, in story_sampler
    for value in gen:

  File "/Users/gaoyuan/ComfyUI/custom_nodes/ComfyUI_StoryDiffusion/Storydiffusion_node.py", line 805, in process_generation
    id_image = pipe(

  File "/Users/gaoyuan/miniconda3/envs/comflowy/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)

  File "/Users/gaoyuan/ComfyUI/custom_nodes/ComfyUI_StoryDiffusion/StoryMaker/pipeline_sdxl_storymaker.py", line 634, in __call__
    latents = self.prepare_latents(

  File "/Users/gaoyuan/miniconda3/envs/comflowy/lib/python3.10/site-packages/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl.py", line 709, in prepare_latents
    latents = randn_tensor(shape, generator=generator, device=device, dtype=dtype)

  File "/Users/gaoyuan/miniconda3/envs/comflowy/lib/python3.10/site-packages/diffusers/utils/torch_utils.py", line 81, in randn_tensor
    latents = torch.randn(shape, generator=generator, device=rand_device, dtype=dtype, layout=layout).to(device)
![WechatIMG759](https://github.com/user-attachments/assets/f7c0a9a5-7600-4fd5-830e-24986595ace4)
@Gyyyyyyyyds
Copy link
Author

WechatIMG759

@smthemex
Copy link
Owner

torch.randn don't support MPS, I haven't test this node in any Mac,so i can't help you~

@Gyyyyyyyyds
Copy link
Author

So do u know how to solve this problem? if I want to use this model on a Mac, what can I do, do u have any idea

@smthemex
Copy link
Owner

smthemex commented Nov 1, 2024

Give me some time, I need to refactor the code of this node.

@Gyyyyyyyyds
Copy link
Author

OK Thanks a lot, looking forward to ur feedback

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

2 participants