TinyTerra / ComfyUI_tinyterraNodes

A selection of nodes for Stable Diffusion ComfyUI
GNU General Public License v3.0
422 stars 45 forks source link

bug: 'NodeType' object has no attribute 'to' #65

Closed BaronFalke closed 1 year ago

BaronFalke commented 1 year ago

Using only pipeLoader + pipeKSampler: image

Executing prompt will cause this error: Error occurred when executing ttN pipeKSampler:

'NoneType' object has no attribute 'to'

File "E:\Software\AIImageCreators\ComfyUI\ComfyUI\execution.py", line 153, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "E:\Software\AIImageCreators\ComfyUI\ComfyUI\execution.py", line 83, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "E:\Software\AIImageCreators\ComfyUI\ComfyUI\execution.py", line 76, in map_node_over_list results.append(getattr(obj, func)(slice_dict(input_data_all, i))) File "E:\Software\AIImageCreators\ComfyUI\ComfyUI\custom_nodes\ComfyUI_tinyterraNodes\tinyterraNodes.py", line 1448, in sample return process_sample_state(pipe, samp_model, samp_clip, samp_samples, samp_vae, samp_seed, samp_positive, samp_negative, lora_name, lora_model_strength, lora_clip_strength, File "E:\Software\AIImageCreators\ComfyUI\ComfyUI\custom_nodes\ComfyUI_tinyterraNodes\tinyterraNodes.py", line 1318, in process_sample_state samp_samples = sampler.common_ksampler(samp_model, samp_seed, steps, cfg, sampler_name, scheduler, samp_positive, samp_negative, samp_samples, denoise=denoise, preview_latent=preview_latent, start_step=start_step, last_step=last_step, force_full_denoise=force_full_denoise, disable_noise=disable_noise) File "E:\Software\AIImageCreators\ComfyUI\ComfyUI\custom_nodes\ComfyUI_tinyterraNodes\tinyterraNodes.py", line 402, in common_ksampler samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, File "E:\Software\AIImageCreators\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\sample_error_enhancer.py", line 9, in informative_sample return original_sample(args, kwargs) File "E:\Software\AIImageCreators\ComfyUI\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 "E:\Software\AIImageCreators\ComfyUI\ComfyUI\comfy\samplers.py", line 728, 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 "E:\Software\AIImageCreators\ComfyUI\ComfyUI\comfy\samplers.py", line 633, in sample samples = sampler.sample(model_wrap, sigmas, extra_args, callback, noise, latent_image, denoise_mask, disable_pbar) File "E:\Software\AIImageCreators\ComfyUI\ComfyUI\comfy\samplers.py", line 589, in sample samples = getattr(k_diffusionsampling, "sample{}".format(sampler_name))(model_k, noise, sigmas, extra_args=extra_args, callback=k_callback, disable=disable_pbar, extra_options) File "E:\Software\AIImageCreators\ComfyUI\python_embeded\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(args, kwargs) File "E:\Software\AIImageCreators\ComfyUI\ComfyUI\comfy\k_diffusion\sampling.py", line 580, in sample_dpmpp_2m denoised = model(x, sigmas[i] * s_in, extra_args) File "E:\Software\AIImageCreators\ComfyUI\python_embeded\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl return forward_call(*args, *kwargs) File "E:\Software\AIImageCreators\ComfyUI\ComfyUI\comfy\samplers.py", line 287, in forward out = self.inner_model(x, sigma, cond=cond, uncond=uncond, cond_scale=cond_scale, model_options=model_options, seed=seed) File "E:\Software\AIImageCreators\ComfyUI\python_embeded\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl return forward_call(args, kwargs) File "E:\Software\AIImageCreators\ComfyUI\ComfyUI\comfy\k_diffusion\external.py", line 129, in forward eps = self.get_eps(input * c_in, self.sigma_to_t(sigma), *kwargs) File "E:\Software\AIImageCreators\ComfyUI\ComfyUI\comfy\k_diffusion\external.py", line 155, in get_eps return self.inner_model.apply_model(args, kwargs) File "E:\Software\AIImageCreators\ComfyUI\ComfyUI\comfy\samplers.py", line 275, in apply_model out = sampling_function(self.inner_model.apply_model, x, timestep, uncond, cond, cond_scale, model_options=model_options, seed=seed) File "E:\Software\AIImageCreators\ComfyUI\ComfyUI\comfy\samplers.py", line 253, in sampling_function cond, uncond = calc_cond_uncond_batch(model_function, cond, uncond, x, timestep, max_total_area, model_options) File "E:\Software\AIImageCreators\ComfyUI\ComfyUI\comfy\samplers.py", line 229, in calc_cond_uncond_batch output = model_function(inputx, timestep, c).chunk(batch_chunks) File "E:\Software\AIImageCreators\ComfyUI\ComfyUI\comfy\model_base.py", line 62, in apply_model context = context.to(dtype)

DVinci commented 1 year ago

Same behavior here: Captura de tela 2023-10-28 085619

DVinci commented 1 year ago

Same behavior here: Captura de tela 2023-10-28 085619

The bug happens with a normal KSampler too:

workflow (3)

TinyTerra commented 1 year ago

Base comfy updated how conditioning is handled.. This should be fixed in 0da409fec794105570b093bb64fd4d2c24a7920c.

Brotoshi commented 1 year ago

Base comfy updated how conditioning is handled.. This should be fixed in 0da409f.

THANK YOU! :) - back in action !