Skip to content
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

hello - 'SDXL' object has no attribute 'get_model_object'- can you help me #30

Open
nikolaiusa opened this issue Jul 20, 2024 · 5 comments

Comments

@nikolaiusa
Copy link

Error occurred when executing Iterative Mixing KSampler:

'SDXL' object has no attribute 'get_model_object'

File "I:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "I:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "I:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "I:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Iterative-Mixer\nodes.py", line 740, in sample
(z_primes,) = self.batch_unsampler.unsampler(model, sampler_name,
File "I:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\python_embeded\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "I:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Iterative-Mixer\nodes.py", line 173, in unsampler
sigmas = calc_sigmas(model, sampler_name, scheduler, steps,
File "I:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\python_embeded\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "I:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Iterative-Mixer\nodes.py", line 33, in calc_sigmas
sampler = comfy.samplers.KSampler(real_model, steps=steps, device=device, sampler=sampler_name, scheduler=scheduler, denoise=1.0, model_options=model.model_options)
File "I:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\comfy\samplers.py", line 767, in init
self.set_steps(steps, denoise)
File "I:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\comfy\samplers.py", line 788, in set_steps
self.sigmas = self.calculate_sigmas(steps).to(self.device)
File "I:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\comfy\samplers.py", line 779, in calculate_sigmas
sigmas = calculate_sigmas(self.model.get_model_object("model_sampling"), self.scheduler, steps)
File "I:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\python_embeded\lib\site-packages\torch\nn\modules\module.py", line 1709, in getattr
raise AttributeError(f"'{type(self).name}' object has no attribute '{name}'")

@HMBM47
Copy link

HMBM47 commented Aug 3, 2024

The same issue can be fixed with the same changes made here to lines 30-33 of nodes.py:
BlenderNeko/ComfyUI_Noise@5cd95f7

@ttulttul
Copy link
Owner

ttulttul commented Aug 4, 2024

Sigh, yes this happens because of a breaking change made to ComfyUI a few months ago. I did not fix it comprehensively and will try to get to this soon. Sorry.

@ModzhaHead
Copy link

i have a same error, but maybe i doing something wrong in workflow design?
question to owner - can you share workflow from article? maybe it works as it should and we misunderstood something and that's why we're getting errors?

@ttulttul
Copy link
Owner

@ModzhaHead Would you mind sharing your workflow here? I think I know why this is happening but I'd love the JSON file so that I can replicate it precisely.

@ModzhaHead
Copy link

Would you mind sharing your workflow here? I think I know why this is happening but I'd love the JSON file so that I can replicate it precisely.

I may have been unclear... I meant that I am asking the developer to share the workflow described in the article

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants