blenderneko / comfyui_tiledksampler Goto Github PK
View Code? Open in Web Editor NEWTiled samplers for ComfyUI
License: GNU General Public License v3.0
Tiled samplers for ComfyUI
License: GNU General Public License v3.0
Does not tile correctly when using multiple controlnets
I'm trying to generate one big image but I get multiple unrelated images of 512x512 inside one big image. Is it possible to render a 1920x1080 image by splitting it in 512x512 tiles ? I only have 8GB of video ram.
Relevant commit: comfyanonymous/ComfyUI@0542088
The linked commit above from 3 days ago that refactored sample.py has broken this extension.
Traceback (most recent call last):
File "C:\comfy\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\comfy\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\comfy\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\comfy\custom_nodes\ComfyUI_TiledKSampler-master\nodes.py", line 320, in sample
return sample_common(model, 'enable', seed, tile_width, tile_height, tiling_strategy, steps_total, cfg, sampler_name, scheduler, positive, negative, latent_image, steps_total-steps, steps_total, 'disable', denoise=1.0, preview=True)
File "C:\comfy\custom_nodes\ComfyUI_TiledKSampler-master\nodes.py", line 124, in sample_common
positive_copy = comfy.sample.convert_cond(positive)
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'comfy.sample' has no attribute 'convert_cond'
given what I've read in some of your closed issues, it looks like comfyui may have changed something in the backend on their newest version? Using your tiled ksampler directly, or through efficiency nodes or impact pack, all throw this error
Error occurred when executing BNK_TiledKSampler:
module 'comfy.sample' has no attribute 'broadcast_cond'
File "C:\ComfyUI_windows_portable\ComfyUI\execution.py", line 153, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "C:\ComfyUI_windows_portable\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 "C:\ComfyUI_windows_portable\ComfyUI\execution.py", line 76, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 315, in sample
return sample_common(model, 'enable', seed, tile_width, tile_height, tiling_strategy, steps_total, cfg, sampler_name, scheduler, positive, negative, latent_image, steps_total-steps, steps_total, 'disable', denoise=1.0, preview=True)
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 180, in sample_common
positive_copy = comfy.sample.broadcast_cond(positive, shape[0], device)
ComfyUI_TiledKSampler/nodes.py
Line 203 in d1353b6
tiled_noise = tiling.get_slice(noise, tile_h, tile_h_len, tile_w, tile_w_len).to(device) * (1 - tiled_mask)
missing assignment: tiled_noise =
This error appears when the progress bar of TiledKSampler reaches ~95%:
Error occurred when executing BNK_TiledKSampler:
local variable 'h' referenced before assignment
File "D:\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "D:\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 "D:\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "D:\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 305, in sample
return sample_common(model, 'enable', seed, tile_width, tile_height, tiling_strategy, steps_total, cfg, sampler_name, scheduler, positive, negative, latent_image, steps_total-steps, steps_total, 'disable', denoise=1.0, preview=True)
File "D:\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 261, in sample_common
tile_result = sampler.sample(tiled_noise, pos, neg, cfg=cfg, latent_image=tiled_latent, start_step=start_at_step + i * tile_steps, last_step=start_at_step + i*tile_steps + tile_steps, force_full_denoise=force_full_denoise and i+1 == end_at_step - start_at_step, denoise_mask=tiled_mask, callback=callback, disable_pbar=True, seed=noise_seed)
File "D:\ComfyUI\comfy\samplers.py", line 733, in sample
samples = getattr(k_diffusion_sampling, "sample_{}".format(self.sampler))(self.model_k, noise, sigmas, extra_args=extra_args, callback=k_callback, disable=disable_pbar)
File "D:\ComfyUI\venv\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "D:\ComfyUI\comfy\k_diffusion\sampling.py", line 695, in sample_dpmpp_3m_sde_gpu
return sample_dpmpp_3m_sde(model, x, sigmas, extra_args=extra_args, callback=callback, disable=disable, eta=eta, s_noise=s_noise, noise_sampler=noise_sampler)
File "D:\ComfyUI\venv\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "D:\ComfyUI\comfy\k_diffusion\sampling.py", line 688, in sample_dpmpp_3m_sde
h_1, h_2 = h, h_1
Now, I know this is likely an issue on my end, but at least one other person I know has the same issue.
ive had an issue like this when impossible resolutions got sent to a sampler...
Its kind of getting in the way of my work lol.
Error occurred when executing BNK_TiledKSampler:
load_additional_models() missing 1 required positional argument: 'dtype'
File "D:\othercomfy\origin\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "D:\othercomfy\origin\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 "D:\othercomfy\origin\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "D:\othercomfy\origin\ComfyUI\custom_nodes\ComfyUI_TiledKSampler-master\nodes.py", line 278, in sample
return sample_common(model, 'enable', seed, tile_width, tile_height, tiling_strategy, steps_total, cfg, sampler_name, scheduler, positive, negative, latent_image, steps_total-steps, steps_total, 'disable', denoise=1.0)
File "D:\othercomfy\origin\ComfyUI\custom_nodes\ComfyUI_TiledKSampler-master\nodes.py", line 115, in sample_common
models = comfy.sample.load_additional_models(positive, negative)
Traceback (most recent call last):
File "D:\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\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 "D:\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 357, in sample
return sample_common(model, add_noise, noise_seed, tile_width, tile_height, tiling_strategy, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, start_at_step, end_at_step, return_with_leftover_noise, denoise=1.0, preview= preview == 'enable')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 173, in sample_common
spatial_conds_pos = [
^
File "D:\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 175, in
comfy.sample.prepare_mask(c[1]['mask'], shape, device) if 'mask' in c[1] else None)
ImportError: huggingface-hub>=0.23.0,<1.0 is required for a normal functioning of this module, but found huggingface-hub==0.20.3.
Try: pip install transformers -U
or pip install -e '.[dev]'
if you're working with git main
This commit: comfyanonymous/ComfyUI@89a0767
causes ComfyUI_TiledKSampler to fail:
Error occurred when executing BNK_TiledKSampler:
module 'comfy.sample' has no attribute 'load_additional_models'
It looks like this method was renamed: comfyanonymous/ComfyUI@89a0767#diff-2e28093f5c1fe698e3f531ad59f86e68cb6947e7c94f9ce142d2ae6ce0fd7506R54
Hi,
Would you able to make TiledKSampler work with controlnet ?
With different TOME patch ratios, tile sizes, and image sizes the error can occur instantly in the TiledKSampler or after some number of steps.
Here is an example workflow that I get the issue with.
Here's my traceback:
File "D:\ComfyUI\execution.py", line 195, in execute
recursive_execute(self.server, prompt, self.outputs, x, extra_data, executed)
File "D:\ComfyUI\execution.py", line 58, in recursive_execute
recursive_execute(server, prompt, outputs, input_unique_id, extra_data, executed)
File "D:\ComfyUI\execution.py", line 58, in recursive_execute
recursive_execute(server, prompt, outputs, input_unique_id, extra_data, executed)
File "D:\ComfyUI\execution.py", line 67, in recursive_execute
outputs[unique_id] = getattr(obj, obj.FUNCTION)(**input_data_all)
File "D:\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 138, in sample
tile_result = sampler.sample(noise_tile, pos, neg, cfg=cfg, latent_image=latent_tiles, start_step=start_at_step + i * steps_per_tile, last_step=start_at_step + i*steps_per_tile + steps_per_tile, force_full_denoise=force_full_denoise and i+1 == end_at_step - start_at_step, denoise_mask=masks, disable_pbar=True)
File "D:\ComfyUI\comfy\samplers.py", line 669, in sample
samples = getattr(k_diffusion_sampling, "sample_{}".format(self.sampler))(self.model_k, noise, sigmas, extra_args=extra_args, callback=k_callback, disable=disable_pbar)
File "D:\stable-diffusion-webui\venv\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "D:\ComfyUI\comfy\k_diffusion\sampling.py", line 594, in sample_dpmpp_2m
denoised = model(x, sigmas[i] * s_in, **extra_args)
File "D:\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "D:\ComfyUI\comfy\samplers.py", line 283, in forward
out = self.inner_model(x, sigma, cond=cond, uncond=uncond, cond_scale=cond_scale, cond_concat=cond_concat, model_options=model_options)
File "D:\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "D:\ComfyUI\comfy\k_diffusion\external.py", line 114, in forward
eps = self.get_eps(input * c_in, self.sigma_to_t(sigma), **kwargs)
File "D:\ComfyUI\comfy\k_diffusion\external.py", line 140, in get_eps
return self.inner_model.apply_model(*args, **kwargs)
File "D:\ComfyUI\comfy\samplers.py", line 271, in apply_model
out = sampling_function(self.inner_model.apply_model, x, timestep, uncond, cond, cond_scale, cond_concat, model_options=model_options)
File "D:\ComfyUI\comfy\samplers.py", line 250, in sampling_function
cond, uncond = calc_cond_uncond_batch(model_function, cond, uncond, x, timestep, max_total_area, cond_concat, model_options)
File "D:\ComfyUI\comfy\samplers.py", line 227, in calc_cond_uncond_batch
output = model_function(input_x, timestep_, cond=c).chunk(batch_chunks)
File "D:\ComfyUI\comfy\ldm\models\diffusion\ddpm.py", line 859, in apply_model
x_recon = self.model(x_noisy, t, **cond)
File "D:\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "D:\ComfyUI\comfy\ldm\models\diffusion\ddpm.py", line 1337, in forward
out = self.diffusion_model(x, t, context=cc, control=control, transformer_options=transformer_options)
File "D:\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "D:\ComfyUI\comfy\ldm\modules\diffusionmodules\openaimodel.py", line 821, in forward
h = forward_timestep_embed(module, h, emb, context, transformer_options)
File "D:\ComfyUI\comfy\ldm\modules\diffusionmodules\openaimodel.py", line 97, in forward_timestep_embed
x = layer(x, context, transformer_options)
File "D:\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "D:\stable-diffusion-webui\venv\lib\site-packages\accelerate\hooks.py", line 165, in new_forward
output = old_forward(*args, **kwargs)
File "D:\ComfyUI\comfy\ldm\modules\attention.py", line 634, in forward
x = block(x, context=context[i], transformer_options=transformer_options)
File "D:\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "D:\stable-diffusion-webui\venv\lib\site-packages\accelerate\hooks.py", line 165, in new_forward
output = old_forward(*args, **kwargs)
File "D:\ComfyUI\comfy\ldm\modules\attention.py", line 523, in forward
return checkpoint(self._forward, (x, context, transformer_options), self.parameters(), self.checkpoint)
File "D:\ComfyUI\comfy\ldm\modules\diffusionmodules\util.py", line 121, in checkpoint
return CheckpointFunction.apply(func, len(inputs), *args)
File "D:\ComfyUI\comfy\ldm\modules\diffusionmodules\util.py", line 136, in forward
output_tensors = ctx.run_function(*ctx.input_tensors)
File "D:\ComfyUI\comfy\ldm\modules\attention.py", line 550, in _forward
m, u = tomesd.get_functions(x, transformer_options["tomesd"]["ratio"], transformer_options["original_shape"])
File "D:\ComfyUI\comfy\ldm\modules\tomesd.py", line 140, in get_functions
m, u = bipartite_soft_matching_random2d(x, w, h, stride_x, stride_y, r, no_rand)
File "D:\ComfyUI\comfy\ldm\modules\tomesd.py", line 92, in bipartite_soft_matching_random2d
node_max, node_idx = scores.max(dim=-1)
IndexError: max(): Expected reduction dim 2 to have non-zero size.
Hi! I was trying to test the tiled sampler but got the following error:
Error occurred when executing BNK_TiledKSamplerAdvanced:
load_additional_models() missing 1 required positional argument: 'dtype'
File "D:\Code\stable-diffusion\ComfyUI_windows_portable\ComfyUI\execution.py", line 145, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "D:\Code\stable-diffusion\ComfyUI_windows_portable\ComfyUI\execution.py", line 75, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "D:\Code\stable-diffusion\ComfyUI_windows_portable\ComfyUI\execution.py", line 68, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "D:\Code\stable-diffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 309, in sample
return sample_common(model, add_noise, noise_seed, tile_width, tile_height, tiling_strategy, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, start_at_step, end_at_step, return_with_leftover_noise, denoise=1.0)
File "D:\Code\stable-diffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 116, in sample_common
models = comfy.sample.load_additional_models(positive, negative)
Error occurred when executing BNK_TiledKSamplerAdvanced:
module 'comfy.sample' has no attribute 'load_additional_models'
I got this error , after update comfyUI,
Reading the roadmap I'm not sure what is the difference between Tile wide controlnets and Image wide controlnets.
From the source code it appears the control image is sliced using the slice_cnet function meaning that each tile get a cropped control image (which is what I expected). Not sure what other kind of behaviour would be made possible by another type of CN processing?
It's just a github ( https://github.com/jpohhhh/gigadiffusion ) I found but maybe it can be useful to reduce the generation time of the complete image according to the graphics of your blog ( https://www.jpohhhh.com/articles/gigadiffusion ).
when using this workflow
blenderneko cloud_panorama-wyrded.zip
got prompt
making attention of type 'vanilla-pytorch' with 512 in_channels
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla-pytorch' with 512 in_channels
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
100%|████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:01<00:00, 1.64s/it]
100%|████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:01<00:00, 1.31s/it]
100%|████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 3.30it/s]
100%|████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:01<00:00, 1.42s/it]
100%|████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1.19it/s]
3%|██▎ | 1/35 [00:06<03:31, 6.22s/it]
Traceback (most recent call last):
File "D:\sd\comfyui\comfy\execution.py", line 195, in execute
recursive_execute(self.server, prompt, self.outputs, x, extra_data, executed)
File "D:\sd\comfyui\comfy\execution.py", line 58, in recursive_execute
recursive_execute(server, prompt, outputs, input_unique_id, extra_data, executed)
File "D:\sd\comfyui\comfy\execution.py", line 58, in recursive_execute
recursive_execute(server, prompt, outputs, input_unique_id, extra_data, executed)
File "D:\sd\comfyui\comfy\execution.py", line 58, in recursive_execute
recursive_execute(server, prompt, outputs, input_unique_id, extra_data, executed)
[Previous line repeated 3 more times]
File "D:\sd\comfyui\comfy\execution.py", line 67, in recursive_execute
outputs[unique_id] = getattr(obj, obj.FUNCTION)(**input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\sd\comfyui\comfy\custom_nodes\TiledKSampler\nodes.py", line 96, in sample
slices = [tiling.get_slice(samples, x1,x2,y1,y2) for x1,x2,y1,y2,_ in tiles_batch]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\sd\comfyui\comfy\custom_nodes\TiledKSampler\nodes.py", line 96, in <listcomp>
slices = [tiling.get_slice(samples, x1,x2,y1,y2) for x1,x2,y1,y2,_ in tiles_batch]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\sd\comfyui\comfy\custom_nodes\TiledKSampler\tiling.py", line 21, in get_slice
t = tensor.narrow(-2, h, h_len)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: start (0) + length (120) exceeds dimension size (64).
tensor slices go out of bounds when using a non-square resolution, possibly mixing up width and height
Traceback (most recent call last): File "V:\ComfyUI-dev[execution.py](http://execution.py/)", line 195, in execute recursive_execute(self.server, prompt, self.outputs, x, extra_data, executed)
File "V:\ComfyUI-dev[execution.py](http://execution.py/)", line 58, in recursive_execute recursive_execute(server, prompt, outputs, input_unique_id, extra_data, executed)
File "V:\ComfyUI-dev[execution.py](http://execution.py/)", line 58, in recursive_execute recursive_execute(server, prompt, outputs, input_unique_id, extra_data, executed)
File "V:\ComfyUI-dev[execution.py](http://execution.py/)", line 67, in recursive_execute outputs[unique_id] = getattr(obj, obj.FUNCTION)(**input_data_all) File "V:\ComfyUI-dev\custom_nodes\ComfyUI_TiledKSampler[nodes.py](http://nodes.py/)", line 96, in sample slices = [tiling.get_slice(samples, x1,x2,y1,y2) for x1,x2,y1,y2,_ in tiles_batch] File "V:\ComfyUI-dev\custom_nodes\ComfyUI_TiledKSampler[nodes.py](http://nodes.py/)", line 96, in slices = [tiling.get_slice(samples, x1,x2,y1,y2) for x1,x2,y1,y2,_ in tiles_batch] File "V:\ComfyUI-dev\custom_nodes\ComfyUI_TiledKSampler[tiling.py](http://tiling.py/)", line 21, in get_slice t = tensor.narrow(-2, h, h_len) RuntimeError: start (240) + length (128) exceeds dimension size (256).
This happens when using controlnet on tiled ksampler advanced
Loading 1 new model
0%| | 0/105 [00:00<?, ?it/s]
ERROR:root:!!! Exception during processing !!!
ERROR:root:Traceback (most recent call last):
File "G:\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 153, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "G:\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\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 "G:\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 76, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "G:\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 347, in sample
return sample_common(model, add_noise, noise_seed, tile_width, tile_height, tiling_strategy, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, start_at_step, end_at_step, return_with_leftover_noise, denoise=1.0, preview= preview == 'enable')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "G:\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 251, in sample_common
slice_cnet(tile_h, tile_h_len, tile_w, tile_w_len, m, img)
File "G:\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 86, in slice_cnet
model.cond_hint = tiling.get_slice(img, h8, h_len8, w8, w_len8).to(model.control_model.dtype).to(model.device)
^^^^^^^^^^^^^^^^^^^
AttributeError: 'ControlLora' object has no attribute 'control_model'
Getting this error when using TiledK Sampler (Advanced):
Advanced:
'ModelPatcher' object has no attribute 'memory_required'
File "\ComfyUI_windows_portable\ComfyUI\execution.py", line 153, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\ComfyUI_windows_portable\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 "\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_ezXY\autoCastPatch.py", line 296, in map_node_over_list
return _map_node_over_list(obj, input_data_all, func, allow_interrupt)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\ComfyUI_windows_portable\ComfyUI\execution.py", line 76, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 347, in sample
return sample_common(model, add_noise, noise_seed, tile_width, tile_height, tiling_strategy, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, start_at_step, end_at_step, return_with_leftover_noise, denoise=1.0, preview= preview == 'enable')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 124, in sample_common
comfy.model_management.load_models_gpu([model] + modelPatches, model.memory_required(noise.shape) + inference_memory)
Does anyone happen to know why I might be running into this error when it hits the Tiled KSampler node? Regular KSampler works fine in its place.
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument weight in method wrapper_CUDA__native_group_norm)
ERROR:root:!!! Exception during processing !!!
ERROR:root:Traceback (most recent call last):
File "C:\ComfyUI_windows_portable\ComfyUI\execution.py", line 153, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\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 "C:\ComfyUI_windows_portable\ComfyUI\execution.py", line 76, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 320, in sample
return sample_common(model, 'enable', seed, tile_width, tile_height, tiling_strategy, steps_total, cfg, sampler_name, scheduler, positive, negative, latent_image, steps_total-steps, steps_total, 'disable', denoise=1.0, preview=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 276, in sample_common
tile_result = sampler.sample(tiled_noise, pos, neg, cfg=cfg, latent_image=tiled_latent, start_step=start_at_step + i * tile_steps, last_step=start_at_step + i*tile_steps + tile_steps, force_full_denoise=force_full_denoise and i+1 == end_at_step - start_at_step, denoise_mask=tiled_mask, callback=callback, disable_pbar=True, seed=noise_seed)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\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 "C:\ComfyUI_windows_portable\ComfyUI\comfy\samplers.py", line 622, in sample
samples = sampler.sample(model_wrap, sigmas, extra_args, callback, noise, latent_image, denoise_mask, disable_pbar)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\comfy\samplers.py", line 561, in sample
samples = self.sampler_function(model_k, noise, sigmas, extra_args=extra_args, callback=k_callback, disable=disable_pbar, **self.extra_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\comfy\k_diffusion\sampling.py", line 154, in sample_euler_ancestral
denoised = model(x, sigmas[i] * s_in, **extra_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\comfy\samplers.py", line 285, in forward
out = self.inner_model(x, sigma, cond=cond, uncond=uncond, cond_scale=cond_scale, model_options=model_options, seed=seed)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\comfy\samplers.py", line 275, in forward
return self.apply_model(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\comfy\samplers.py", line 272, in apply_model
out = sampling_function(self.inner_model, x, timestep, uncond, cond, cond_scale, model_options=model_options, seed=seed)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\comfy\samplers.py", line 252, in sampling_function
cond_pred, uncond_pred = calc_cond_uncond_batch(model, cond, uncond_, x, timestep, model_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\comfy\samplers.py", line 226, in calc_cond_uncond_batch
output = model.apply_model(input_x, timestep_, **c).chunk(batch_chunks)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\comfy\model_base.py", line 85, in apply_model
model_output = self.diffusion_model(xc, t, context=context, control=control, transformer_options=transformer_options, **extra_conds).float()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\comfy\ldm\modules\diffusionmodules\openaimodel.py", line 854, in forward
h = forward_timestep_embed(module, h, emb, context, transformer_options, time_context=time_context, num_video_frames=num_video_frames, image_only_indicator=image_only_indicator)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\comfy\ldm\modules\diffusionmodules\openaimodel.py", line 52, in forward_timestep_embed
x = layer(x)
^^^^^^^^
File "C:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-AnimateDiff-Evolved\animatediff\motion_module_ad.py", line 386, in forward
return self.temporal_transformer(input_tensor, encoder_hidden_states, attention_mask)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-AnimateDiff-Evolved\animatediff\motion_module_ad.py", line 527, in forward
hidden_states = self.norm(hidden_states).to(hidden_states.dtype)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-AnimateDiff-Evolved\animatediff\motion_utils.py", line 81, in forward
return F.group_norm(
^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\functional.py", line 2558, in group_norm
return torch.group_norm(input, num_groups, weight, bias, eps, torch.backends.cudnn.enabled)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument weight in method wrapper_CUDA__native_group_norm)
Prompt executed in 67.93 seconds
More of a feature request -- I tried running this workflow myself with the animatediff module activated. Are there any plans to add animatediff support to this node? It'd be super helpful to be able to upscale video with an advanced tiled ksampler. Happy to contribute as well.
Error occurred when executing BNK_TiledKSampler:
module 'comfy.sample' has no attribute 'get_additional_models'
File "C:\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "C:\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 "C:\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 "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 311, in sample
return sample_common(model, 'enable', seed, tile_width, tile_height, tiling_strategy, steps_total, cfg, sampler_name, scheduler, positive, negative, latent_image, steps_total-steps, steps_total, 'disable', denoise=1.0, preview=True)
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 116, in sample_common
modelPatches = comfy.sample.get_additional_models(positive, negative)
what is the problem? how to fix?
Similar to how the Tiled IPAdapter does it. The Tiled IPAdapter allows for processing the tiles separately while still retaining the overall conditioning from the IPAdapter (though not perfectly). This in turn allows for processing of the latent on multiple GPUs via the NetDist nodes, speeding up the processing significantly.
Not sure if it applicable in the same way to controlnets though.
Here is an example for the Tiled IPAdapter upscale where it only renders the first tile of four of the upscaled image. This upscale is in a 2x2 tiling. The tile is selected via the latent index in this case:
Hello, how is this node supposed to work? Is it with ControlNet Tile Model? Could you please provide an example?
Thank you so much and congratulations for the amazing work!
I just tried again and the output is a black image. I used the beach example.
Console output:
100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [00:03<00:00, 5.66it/s]
100%|████████████████████████████████████████████████████████████████████████████████| 236/236 [01:37<00:00, 2.42it/s]
D:\Code\stable-diffusion\ComfyUI_windows_portable\ComfyUI\nodes.py:1140: RuntimeWarning: invalid value encountered in cast
img = Image.fromarray(np.clip(i, 0, 255).astype(np.uint8))
Prompt executed in 112.21 seconds
Hi; tried installing just now via the Manager and receive this issue when loading comfyui back up:
Traceback (most recent call last):
File "C:\Users\X\Desktop\Comfy\ComfyUI\nodes.py", line 1665, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\Users\X\Desktop\Comfy\ComfyUI\custom_nodes\ComfyUI_TiledKSampler_init.py", line 1, in
from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
File "C:\Users\X\Desktop\Comfy\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 12, in
import comfy.controlnet
ModuleNotFoundError: No module named 'comfy.controlnet'Cannot import C:\Users\X\Desktop\Comfy\ComfyUI\custom_nodes\ComfyUI_TiledKSampler module for custom nodes: No module named 'comfy.controlnet'
Any idea what's missing here? I checked other controlnet themed nodes via manager but didn't look like anything obvious that would resolve it.
I'm doing a i2i upscale workflow. Similar to 2nd example
Is there any way to increase batch size so it does more than 1 tile at a time?
looking to grab the images the tiling produces as separate images i can then run ksamplers through. is that possible?
So where does this content get installed in ComfyUI?
I got error msg.
Error occurred when executing BNK_TiledKSamplerAdvanced:
load_additional_models() missing 1 required positional argument: 'dtype'
it's not work , since comfyUI being update....
not sure what's the problem.
A workflow that was previously working is now failing with:
Error occurred when executing BNK_TiledKSampler:
get_additional_models() missing 1 required positional argument: 'dtype'
File "D:\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "D:\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 "D:\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "D:\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 311, in sample
return sample_common(model, 'enable', seed, tile_width, tile_height, tiling_strategy, steps_total, cfg, sampler_name, scheduler, positive, negative, latent_image, steps_total-steps, steps_total, 'disable', denoise=1.0, preview=True)
File "D:\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 116, in sample_common
modelPatches = comfy.sample.get_additional_models(positive, negative)
The other 3 strategies all work but random will thorw an error.
Trying to do 1024x1024 tiles on a 2048x2048 latent image?
Error occurred when executing BNK_TiledKSamplerAdvanced:
pixel_unshuffle expects height to be divisible by downscale_factor, but input.size(-2)=200 is not divisible by 16
I'm attempting to do some very simple regional conditioning with a mask, but I keep getting the error message KeyError: 1
whenever I try to run my prompt. I've attempted it with ComfyUI's regular ksampler and the mask conditioning works, but with tileksampler, it fails:
ERROR:root:!!! Exception during processing !!!
ERROR:root:Traceback (most recent call last):
File "/home/####/comfy/ComfyUI/execution.py", line 155, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/####/comfy/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 "/home/####/comfy/ComfyUI/execution.py", line 78, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/####/comfy/ComfyUI/custom_nodes/ComfyUI_TiledKSampler/nodes.py", line 320, in sample
return sample_common(model, 'enable', seed, tile_width, tile_height, tiling_strategy, steps_total, cfg, sampler_name, scheduler, positive, negative, latent_image, steps_total-steps, steps_total, 'disable', denoise=1.0, preview=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/####/comfy/ComfyUI/custom_nodes/ComfyUI_TiledKSampler/nodes.py", line 265, in sample_common
pos = [slice_cond(tile_h, tile_h_len, tile_w, tile_w_len, c, area) for c, area in zip(pos, spatial_conds_pos)]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/####/comfy/ComfyUI/custom_nodes/ComfyUI_TiledKSampler/nodes.py", line 265, in <listcomp>
pos = [slice_cond(tile_h, tile_h_len, tile_w, tile_w_len, c, area) for c, area in zip(pos, spatial_conds_pos)]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/####/comfy/ComfyUI/custom_nodes/ComfyUI_TiledKSampler/nodes.py", line 55, in slice_cond
cond[1]['mask'] = new_mask
~~~~^^^
KeyError: 1
I've attached the workflow's JSON file: KeyError1.json
it create pixaled tiles at 4 corner. I've tried both normal/karras with padding/random tile method
Edit: SDE++ also doesn't work
after updating comfyui from git getting this:
ERROR:root:!!! Exception during processing !!!
ERROR:root:Traceback (most recent call last):
File "/home/myky/Stažené/git/ComfyUI/execution.py", line 153, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/myky/Stažené/git/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 "/home/myky/Stažené/git/ComfyUI/execution.py", line 76, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/myky/Stažené/git/ComfyUI/custom_nodes/ComfyUI_TiledKSampler/nodes.py", line 312, in sample
return sample_common(model, 'enable', seed, tile_width, tile_height, tiling_strategy, steps_total, cfg, sampler_name, scheduler, positive, negative, latent_image, steps_total-steps, steps_total, 'disable', denoise=1.0, preview=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/myky/Stažené/git/ComfyUI/custom_nodes/ComfyUI_TiledKSampler/nodes.py", line 123, in sample_common
comfy.model_management.load_models_gpu([model] + modelPatches, comfy.model_management.batch_area_memory(noise.shape[0] * noise.shape[2] * noise.shape[3]) + inference_memory)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'comfy.model_management' has no attribute 'batch_area_memory'
seems like comfyui update killed it :(
other no tiled KSampler work well , but TiledKSampler not work.
Error occurred when executing BNK_TiledKSamplerAdvanced:
'T2IAdapter' object has no attribute 'control_model'
File "D:\ComfyUI_Portable\ComfyUI\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "D:\ComfyUI_Portable\ComfyUI\execution.py", line 82, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "D:\ComfyUI_Portable\ComfyUI\execution.py", line 75, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "D:\ComfyUI_Portable\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 346, in sample
return sample_common(model, add_noise, noise_seed, tile_width, tile_height, tiling_strategy, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, start_at_step, end_at_step, return_with_leftover_noise, denoise=1.0, preview= preview == 'enable')
File "D:\ComfyUI_Portable\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 250, in sample_common
slice_cnet(tile_h, tile_h_len, tile_w, tile_w_len, m, img)
File "D:\ComfyUI_Portable\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 86, in slice_cnet
model.cond_hint = tiling.get_slice(img, h8, h_len8, w8, w_len8).to(model.control_model.dtype).to(model.device)
rror occurred when executing BNK_TiledKSampler:
module 'comfy.sample' has no attribute 'convert_cond'
File "E:\stable_diffusion\ComfyUI_windows_portable_nvidia_cu118_or_cpu_23_09_2023\ComfyUI_windows_portable\ComfyUI\execution.py", line 153, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "E:\stable_diffusion\ComfyUI_windows_portable_nvidia_cu118_or_cpu_23_09_2023\ComfyUI_windows_portable\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:\stable_diffusion\ComfyUI_windows_portable_nvidia_cu118_or_cpu_23_09_2023\ComfyUI_windows_portable\ComfyUI\execution.py", line 76, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "E:\stable_diffusion\ComfyUI_windows_portable_nvidia_cu118_or_cpu_23_09_2023\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 312, in sample
return sample_common(model, 'enable', seed, tile_width, tile_height, tiling_strategy, steps_total, cfg, sampler_name, scheduler, positive, negative, latent_image, steps_total-steps, steps_total, 'disable', denoise=1.0, preview=True)
File "E:\stable_diffusion\ComfyUI_windows_portable_nvidia_cu118_or_cpu_23_09_2023\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_TiledKSampler\nodes.py", line 120, in sample_common
positive_copy = comfy.sample.convert_cond(positive)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.