-
Notifications
You must be signed in to change notification settings - Fork 249
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: "clamp_min_cpu" not implemented for "Half" #187
Comments
Same problem here! |
I also encountered this problem, but I seem to have found the problem. |
maybe you left the start param:--gpus all |
I think it is a PyTorch issue. There are some operations such as ReLu that you cannot do in CPU using half precision. You can either use full precision or run the model on the GPU |
Morning everyone;
I'm trying to run DiscoArt on a local machine, alas without a GPU. It's straight out of the box, so "pip install discoart", then start python and run "from discoart import create" and "create()" as can be seen below. However, I'm getting the error mentioned below (and in the title) as per the console output below of "clamp_min_cpu" not being implemented for "Half"
Can you advise on what's going on, and what I need to do to correct this (aside from getting a CUDA-enabled machine - funds don't support - or Google Colab)
Thanks in advance,
Oliver
warnings.warn(
2022-10-13 10:36:28,663 - discoart - INFO - preparing models...
Setting up [LPIPS] perceptual loss: trunk [vgg], v[0.1], spatial [off]
/Users/studioadmin/Library/Python/3.8/lib/python/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and will be removed in 0.15, please use 'weights' instead.
warnings.warn(
/Users/studioadmin/Library/Python/3.8/lib/python/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or
None
for 'weights' are deprecated since 0.13 and will be removed in 0.15. The current behavior is equivalent to passingweights=VGG16_Weights.IMAGENET1K_V1
. You can also useweights=VGG16_Weights.DEFAULT
to get the most up-to-date weights.warnings.warn(msg)
Loading model from: /Users/studioadmin/Library/Python/3.8/lib/python/site-packages/lpips/weights/v0.1/vgg.pth
2022-10-13 10:36:31,281 - discoart - INFO -
W&B dashboard is disabled. To enable the online dashboard for tracking losses, gradients,
scheduling tracking, please set
WANDB_MODE=online
before running/importing DiscoArt. e.g.2022-10-13 10:36:31,281 - discoart - INFO - creating artworks
discoart-6f5383004ada11edbb22a860b62d2fe9
(0/4)...0%| | 0/250 [03:06<?, ?it/s]
Traceback (most recent call last):
File "", line 1, in
File "/Users/studioadmin/Library/Python/3.8/lib/python/site-packages/discoart/create.py", line 217, in create
da = do_run(
File "/Users/studioadmin/Library/Python/3.8/lib/python/site-packages/discoart/runner.py", line 414, in do_run
for j, sample in enumerate(samples):
File "/Users/studioadmin/Library/Python/3.8/lib/python/site-packages/guided_diffusion/gaussian_diffusion.py", line 897, in ddim_sample_loop_progressive
out = sample_fn(
File "/Users/studioadmin/Library/Python/3.8/lib/python/site-packages/guided_diffusion/gaussian_diffusion.py", line 674, in ddim_sample
out = self.condition_score(cond_fn, out_orig, x, t, model_kwargs=model_kwargs)
File "/Users/studioadmin/Library/Python/3.8/lib/python/site-packages/guided_diffusion/respace.py", line 102, in condition_score
return super().condition_score(self._wrap_model(cond_fn), *args, **kwargs)
File "/Users/studioadmin/Library/Python/3.8/lib/python/site-packages/guided_diffusion/gaussian_diffusion.py", line 399, in condition_score
eps = eps - (1 - alpha_bar).sqrt() * cond_fn(
File "/Users/studioadmin/Library/Python/3.8/lib/python/site-packages/guided_diffusion/respace.py", line 128, in call
return self.model(x, new_ts, **kwargs)
File "/Users/studioadmin/Library/Python/3.8/lib/python/site-packages/discoart/runner.py", line 207, in cond_fn
masked_weights = normalize_fn(
File "/Users/studioadmin/Library/Python/3.8/lib/python/site-packages/torch/nn/functional.py", line 4620, in normalize
denom = input.norm(p, dim, keepdim=True).clamp_min(eps).expand_as(input)
RuntimeError: "clamp_min_cpu" not implemented for 'Half'
The text was updated successfully, but these errors were encountered: