How to inference on CPU? RuntimeError: "addmm_impl_cpu_" not implemented for 'Half'
#41
by
demetera
- opened
Trying to play with the default script using stable_audio_tools on CPU.
I'm getting : RuntimeError: "addmm_impl_cpu_" not implemented for 'Half'
When executing the generation block :
output = generate_diffusion_cond(
model,
steps=100,
cfg_scale=7,
conditioning=conditioning,
sample_size=sample_size,
sigma_min=0.3,
sigma_max=500,
sampler_type="dpmpp-3m-sde",
device='cpu'
)
I found a solution to use float32 torch, but no idea, how to implement it using Stable Audio Tools.
demetera
changed discussion title from
How to inference on CPU?
to How to inference on CPU? RuntimeError: "addmm_impl_cpu_" not implemented for 'Half'
model = model.float() # Convert model to float
conditioning = conditioning.float() # Convert conditioning to float
output = generate_diffusion_cond(
model,
steps=100,
cfg_scale=7,
conditioning=conditioning,
sample_size=sample_size,
sigma_min=0.3,
sigma_max=500,
sampler_type="dpmpp-3m-sde",
device='cpu'
)
maybe?
total guess