if cfg_scale > 0.:
un_x = x.clone()
un_x[:, :prompt.shape[1]] = dim
Should we rely on prompt.shape[1] to determine the prompt length, given that prompts can be of variable length? Or would it be better to use a different way to compute the prompt length?