Traceback (most recent call last): File "./scripts/txt2imghd.py", line 551, in <module> main() File "./scripts/txt2imghd.py", line 365, in main text2img2(opt) File "./scripts/txt2imghd.py", line 511, in text2img2 samples = sampler.decode(z_enc, c, t_enc, unconditional_guidance_scale=opt.detail_scale, File "/home/bbrown/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "/home/bbrown/src/stable-diffusion-cpuonly/ldm/models/diffusion/ddim.py", line 238, in decode x_dec, _ = self.p_sample_ddim(x_dec, cond, ts, index=index, use_original_steps=use_original_steps, File "/home/bbrown/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "/home/bbrown/src/stable-diffusion-cpuonly/ldm/models/diffusion/ddim.py", line 177, in p_sample_ddim e_t_uncond, e_t = self.model.apply_model(x_in, t_in, c_in).chunk(2) File "/home/bbrown/src/stable-diffusion-cpuonly/ldm/models/diffusion/ddpm.py", line 987, in apply_model x_recon = self.model(x_noisy, t, **cond) File "/home/bbrown/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/home/bbrown/src/stable-diffusion-cpuonly/ldm/models/diffusion/ddpm.py", line 1410, in forward out = self.diffusion_model(x, t, context=cc) File "/home/bbrown/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/home/bbrown/src/stable-diffusion-cpuonly/ldm/modules/diffusionmodules/openaimodel.py", line 732, in forward h = module(h, emb, context) File "/home/bbrown/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/home/bbrown/src/stable-diffusion-cpuonly/ldm/modules/diffusionmodules/openaimodel.py", line 85, in forward x = layer(x, context) File "/home/bbrown/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/home/bbrown/src/stable-diffusion-cpuonly/ldm/modules/attention.py", line 254, in forward x = self.norm(x) File "/home/bbrown/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/home/bbrown/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/nn/modules/normalization.py", line 272, in forward return F.group_norm( File "/home/bbrown/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/nn/functional.py", line 2516, in group_norm return torch.group_norm(input, num_groups, weight, bias, eps, torch.backends.cudnn.enabled) RuntimeError: expected scalar type BFloat16 but found Float
Is there a work around to running txt2imghd on cpu only?
Trying to run txt2imghd on cpu by passing CUDA_VISIBLE_DEVICES="" gives me RuntimeError: "expected scalar type BFloat16 but found Float"
Command to produce error:
CUDA_VISIBLE_DEVICES="" python ./scripts/txt2imghd.py --img '/home/bbrown/src/stable-diffusion-cpuonly/outputs/txt2img-samples/a_portrait_of_a_psychedelic_cat_owl_figure_by_naoto_hattori,_android_jones_and_chris_dyer,_deep_bold_colors,_galactic_entity,_/seed_407049_00000.png' --prompt ""
Error message:
Traceback (most recent call last): File "./scripts/txt2imghd.py", line 551, in <module> main() File "./scripts/txt2imghd.py", line 365, in main text2img2(opt) File "./scripts/txt2imghd.py", line 511, in text2img2 samples = sampler.decode(z_enc, c, t_enc, unconditional_guidance_scale=opt.detail_scale, File "/home/bbrown/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "/home/bbrown/src/stable-diffusion-cpuonly/ldm/models/diffusion/ddim.py", line 238, in decode x_dec, _ = self.p_sample_ddim(x_dec, cond, ts, index=index, use_original_steps=use_original_steps, File "/home/bbrown/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "/home/bbrown/src/stable-diffusion-cpuonly/ldm/models/diffusion/ddim.py", line 177, in p_sample_ddim e_t_uncond, e_t = self.model.apply_model(x_in, t_in, c_in).chunk(2) File "/home/bbrown/src/stable-diffusion-cpuonly/ldm/models/diffusion/ddpm.py", line 987, in apply_model x_recon = self.model(x_noisy, t, **cond) File "/home/bbrown/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/home/bbrown/src/stable-diffusion-cpuonly/ldm/models/diffusion/ddpm.py", line 1410, in forward out = self.diffusion_model(x, t, context=cc) File "/home/bbrown/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/home/bbrown/src/stable-diffusion-cpuonly/ldm/modules/diffusionmodules/openaimodel.py", line 732, in forward h = module(h, emb, context) File "/home/bbrown/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/home/bbrown/src/stable-diffusion-cpuonly/ldm/modules/diffusionmodules/openaimodel.py", line 85, in forward x = layer(x, context) File "/home/bbrown/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/home/bbrown/src/stable-diffusion-cpuonly/ldm/modules/attention.py", line 254, in forward x = self.norm(x) File "/home/bbrown/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/home/bbrown/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/nn/modules/normalization.py", line 272, in forward return F.group_norm( File "/home/bbrown/anaconda3/envs/ldm/lib/python3.8/site-packages/torch/nn/functional.py", line 2516, in group_norm return torch.group_norm(input, num_groups, weight, bias, eps, torch.backends.cudnn.enabled) RuntimeError: expected scalar type BFloat16 but found Float
Is there a work around to running txt2imghd on cpu only?