Skip to content

dream.py issue on M1 Mac: torch._C' has no attribute '_cuda_resetPeakMemoryStats' #234

Description

@yudhanjaya

M1 Mac. After model load,


Loading model from models/ldm/stable-diffusion-v1/model.ckpt
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
making attention of type 'vanilla' with 512 in_channels
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
Using half precision math. Call with --full_precision to use more accurate but VRAM-intensive full precision.
>> Setting Sampler to k_lms
model loaded in 7.59s
* Initialization done! Awaiting your command (-h for help, 'q' to quit)
dream> "a tower of books"

this error happens:

Traceback (most recent call last):
  File "/Users/yudhanjaya/stable-diffusion/scripts/dream.py", line 518, in <module>
    main()
  File "/Users/yudhanjaya/stable-diffusion/scripts/dream.py", line 99, in main
    main_loop(t2i, opt.outdir, opt.prompt_as_dir, cmd_parser, infile)
  File "/Users/yudhanjaya/stable-diffusion/scripts/dream.py", line 208, in main_loop
    image_list  = t2i.prompt2image(image_callback=callback, **vars(opt))
  File "/Users/yudhanjaya/stable-diffusion/ldm/simplet2i.py", line 283, in prompt2image
    torch.cuda.torch.cuda.reset_peak_memory_stats()
  File "/Users/yudhanjaya/miniconda3/envs/ldm/lib/python3.10/site-packages/torch/cuda/memory.py", line 260, in reset_peak_memory_stats
    return torch._C._cuda_resetPeakMemoryStats(device)
AttributeError: module 'torch._C' has no attribute '_cuda_resetPeakMemoryStats'

I've done all the steps in trouble-shooting: as far as I can tell, loading is not an issue. What am I doing wrong?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions