Comfy-Org / Comfy-Org/ComfyUI

ERROR occurred when executing KSamplerAdvanced: 'ModuleList' object has no attribute '1'

Open
#2,624 3 comments 11 reactions 0 assignees View on GitHub
User Support
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

Hi! I'm getting this error when I do Queue Prompt using a Checkpoint different than SDXL and it reads the KSampler Node (Advanced). Would anyone know why? Thank you in advance!

```
Error occurred when executing KSamplerAdvanced:

'ModuleList' object has no attribute '1'

File "D:\Archivos de programas\StableDiffusion\ComfyUI_windows_portable\ComfyUI\execution.py", line 155, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "D:\Archivos de programas\StableDiffusion\ComfyUI_windows_portable\ComfyUI\execution.py", line 85, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "D:\Archivos de programas\StableDiffusion\ComfyUI_windows_portable\ComfyUI\execution.py", line 78, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "D:\Archivos de programas\StableDiffusion\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1389, in sample
return common_ksampler(model, noise_seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise, disable_noise=disable_noise, start_step=start_at_step, last_step=end_at_step, force_full_denoise=force_full_denoise)
File "D:\Archivos de programas\StableDiffusion\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1325, in common_ksampler
samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image,
File "D:\Archivos de programas\StableDiffusion\ComfyUI_windows_portable\ComfyUI\comfy\sample.py", line 100, in sample
samples = sampler.sample(noise, positive_copy, negative_copy, cfg=cfg, latent_image=latent_image, start_step=start_step, last_step=last_step, force_full_denoise=force_full_denoise, denoise_mask=noise_mask, sigmas=sigmas, callback=callback, disable_pbar=disable_pbar, seed=seed)
File "D:\Archivos de programas\StableDiffusion\ComfyUI_windows_portable\ComfyUI\comfy\samplers.py", line 716, in sample
return sample(self.model, noise, positive, negative, cfg, self.device, sampler, sigmas, self.model_options, latent_image=latent_image, denoise_mask=denoise_mask, callback=callback, disable_pbar=disable_pbar, seed=seed)
File "D:\Archivos de programas\StableDiffusion\ComfyUI_windows_portable\ComfyUI\comfy\samplers.py", line 615, in sample
pre_run_control(model, negative + positive)
File "D:\Archivos de programas\StableDiffusion\ComfyUI_windows_portable\ComfyUI\comfy\samplers.py", line 452, in pre_run_control
x['control'].pre_run(model, percent_to_timestep_function)
File "D:\Archivos de programas\StableDiffusion\ComfyUI_windows_portable\ComfyUI\comfy\controlnet.py", line 296, in pre_run
comfy.utils.set_attr(self.control_model, k, self.control_weights[k].to(dtype).to(comfy.model_management.get_torch_device()))
File "D:\Archivos de programas\StableDiffusion\ComfyUI_windows_portable\ComfyUI\comfy\utils.py", line 279, in set_attr
obj = getattr(obj, name)
File "D:\Archivos de programas\StableDiffusion\ComfyUI_windows_portable\python_embeded\lib\site-packages\torch\nn\modules\module.py", line 1695, in __getattr__
raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.