ssitu / ComfyUI_UltimateSDUpscale

ComfyUI nodes for the Ultimate Stable Diffusion Upscale script by Coyote-A.
GNU General Public License v3.0
781 stars 52 forks source link

Error occurred when executing UltimateSDUpscale: Cannot copy out of meta tensor; no data! #26

Open ZeFluffyNuphkin opened 11 months ago

ZeFluffyNuphkin commented 11 months ago

I keep getting this error when I attempt to generate an image. Unfortunately I have no idea what it means. Here's my error

Error occurred when executing UltimateSDUpscale:

Cannot copy out of meta tensor; no data!

File "F:\Stable_diffusion\stable-diffusion-webui\extensions\sd-webui-comfyui\ComfyUI\execution.py", line 153, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "F:\Stable_diffusion\stable-diffusion-webui\extensions\sd-webui-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 "F:\Stable_diffusion\stable-diffusion-webui\extensions\sd-webui-comfyui\ComfyUI\execution.py", line 76, in map_node_over_list results.append(getattr(obj, func)(*slice_dict(input_data_all, i))) File "F:\Stable_diffusion\stable-diffusion-webui\extensions\sd-webui-comfyui\ComfyUI\custom_nodes\ComfyUIUltimateSDUpscale\nodes.py", line 124, in upscale processed = script.run(p=sdprocessing, =None, tile_width=tile_width, tile_height=tile_height, File "F:\Stable_diffusion\stable-diffusion-webui\extensions\sd-webui-comfyui\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories\ultimate_sd_upscale\scripts\ultimate-upscale.py", line 553, in run upscaler.process() File "F:\Stable_diffusion\stable-diffusion-webui\extensions\sd-webui-comfyui\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories\ultimate_sd_upscale\scripts\ultimate-upscale.py", line 136, in process self.image = self.redraw.start(self.p, self.image, self.rows, self.cols) File "F:\Stable_diffusion\stable-diffusion-webui\extensions\sd-webui-comfyui\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories\ultimate_sd_upscale\scripts\ultimate-upscale.py", line 243, in start return self.linear_process(p, image, rows, cols) File "F:\Stable_diffusion\stable-diffusion-webui\extensions\sd-webui-comfyui\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories\ultimate_sd_upscale\scripts\ultimate-upscale.py", line 178, in linear_process processed = processing.process_images(p) File "F:\Stable_diffusion\stable-diffusion-webui\extensions\sd-webui-comfyui\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\modules\processing.py", line 119, in process_images (samples,) = common_ksampler(p.model, p.seed, p.steps, p.cfg, p.sampler_name, File "F:\Stable_diffusion\stable-diffusion-webui\extensions\sd-webui-comfyui\ComfyUI\nodes.py", line 1206, in common_ksampler samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, File "F:\Stable_diffusion\stable-diffusion-webui\extensions\sd-webui-comfyui\ComfyUI\comfy\sample.py", line 90, in sample real_model, positive_copy, negative_copy, noise_mask, models = prepare_sampling(model, noise.shape, positive, negative, noise_mask) File "F:\Stable_diffusion\stable-diffusion-webui\extensions\sd-webui-comfyui\ComfyUI\comfy\sample.py", line 81, in prepare_sampling comfy.model_management.load_models_gpu([model] + models, comfy.model_management.batch_area_memory(noise_shape[0] noise_shape[2] * noise_shape[3]) + inference_memory) File "F:\Stable_diffusion\stable-diffusion-webui\extensions\sd-webui-comfyui\ComfyUI\comfy\model_management.py", line 375, in load_models_gpu unload_model_clones(loaded_model.model) File "F:\Stable_diffusion\stable-diffusion-webui\extensions\sd-webui-comfyui\ComfyUI\comfy\model_management.py", line 324, in unload_model_clones current_loaded_models.pop(i).model_unload() File "F:\Stable_diffusion\stable-diffusion-webui\extensions\sd-webui-comfyui\ComfyUI\comfy\model_management.py", line 307, in model_unload self.model.unpatch_model(self.model.offload_device) File "F:\Stable_diffusion\stable-diffusion-webui\extensions\sd-webui-comfyui\ComfyUI\comfy\model_patcher.py", line 291, in unpatch_model self.model.to(device_to) File "F:\Stable_diffusion\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1145, in to return self._apply(convert) File "F:\Stable_diffusion\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 797, in _apply module._apply(fn) File "F:\Stable_diffusion\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 797, in _apply module._apply(fn) File "F:\Stable_diffusion\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 797, in _apply module._apply(fn) [Previous line repeated 2 more times] File "F:\Stable_diffusion\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 820, in _apply param_applied = fn(param) File "F:\Stable_diffusion\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1143, in convert return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking)

Here's my UI setup

image image

ssitu commented 11 months ago

What happens if you use a regular clip text encode conditioning for the ultimateupscale node? Like this: image

JasonS09 commented 11 months ago

I'm having the same issue, in my case it happens when I try to use controlnet tile.

EricRollei commented 11 months ago

All of a sudden, I'm having this error. Literally from one gen to the next, but I didn't update or make any changes to my workflow? ERROR:root:!!! Exception during processing !!! ERROR:root:Traceback (most recent call last): File "A:\Comfy_Aug\ComfyUI\execution.py", line 153, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\Comfy_Aug\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 "A:\Comfy_Aug\ComfyUI\execution.py", line 76, in map_node_over_list results.append(getattr(obj, func)(slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\Comfy_Aug\ComfyUI\custom_nodes\ComfyUIUltimateSDUpscale\nodes.py", line 124, in upscale processed = script.run(p=sdprocessing, =None, tile_width=tile_width, tile_height=tile_height, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\Comfy_Aug\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories\ultimate_sd_upscale\scripts\ultimate-upscale.py", line 553, in run upscaler.process() File "A:\Comfy_Aug\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories\ultimate_sd_upscale\scripts\ultimate-upscale.py", line 136, in process self.image = self.redraw.start(self.p, self.image, self.rows, self.cols) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\Comfy_Aug\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories\ultimate_sd_upscale\scripts\ultimate-upscale.py", line 243, in start return self.linear_process(p, image, rows, cols) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\Comfy_Aug\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories\ultimate_sd_upscale\scripts\ultimate-upscale.py", line 178, in linear_process processed = processing.process_images(p) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\Comfy_Aug\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\modules\processing.py", line 119, in process_images (samples,) = common_ksampler(p.model, p.seed, p.steps, p.cfg, p.sampler_name, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\Comfy_Aug\ComfyUI\nodes.py", line 1206, in common_ksampler samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\Comfy_Aug\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\sample_error_enhancer.py", line 22, in informative_sample raise e File "A:\Comfy_Aug\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\sample_error_enhancer.py", line 9, in informative_sample return original_sample(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\Comfy_Aug\ComfyUI\custom_nodes\ComfyUI-AnimateDiff-Evolved\animatediff\sampling.py", line 109, in animatediff_sample return orig_comfy_sample(model, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\Comfy_Aug\ComfyUI\comfy\sample.py", line 90, in sample real_model, positive_copy, negative_copy, noise_mask, models = prepare_sampling(model, noise.shape, positive, negative, noise_mask) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "A:\Comfy_Aug\ComfyUI\comfy\sample.py", line 81, in prepare_sampling comfy.model_management.load_models_gpu([model] + models, comfy.model_management.batch_area_memory(noise_shape[0] noise_shape[2] noise_shape[3]) + inference_memory) File "A:\Comfy_Aug\ComfyUI\comfy\model_management.py", line 375, in load_models_gpu unload_model_clones(loaded_model.model) File "A:\Comfy_Aug\ComfyUI\comfy\model_management.py", line 324, in unload_model_clones current_loaded_models.pop(i).model_unload() File "A:\Comfy_Aug\ComfyUI\comfy\model_management.py", line 307, in model_unload self.model.unpatch_model(self.model.offload_device) File "A:\Comfy_Aug\ComfyUI\comfy\model_patcher.py", line 291, in unpatch_model self.model.to(device_to) File "A:\Comfy_Aug\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1160, in to return self._apply(convert) ^^^^^^^^^^^^^^^^^^^^ File "A:\Comfy_Aug\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 810, in _apply module._apply(fn) File "A:\Comfy_Aug\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 810, in _apply module._apply(fn) File "A:\Comfy_Aug\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 810, in _apply module._apply(fn) [Previous line repeated 4 more times] File "A:\Comfy_Aug\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 833, in _apply param_applied = fn(param) ^^^^^^^^^ File "A:\Comfy_Aug\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1158, in convert return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ NotImplementedError: Cannot copy out of meta tensor; no data!

edit - to add further information - I'm using the node with SDXL and have both IPAdapter Plus and Controlnet Canny in use with the node (has always worked and until controlnet SDXL tile is available I'm using those). Also I have the WAS blender-neko text encode nodes for the clip. I'll try bypassing / swapping out to see if any of those make a difference.

EricRollei commented 11 months ago

Oops, scratch that! I got 3 runs without error by switching the text encode parameters from comfy to comfy++, then it started again. Hmm.... so strange! / /

ssitu commented 11 months ago

@EricRollei Not every type of conditioning is supported, I'll have to work on that.

ssitu commented 11 months ago

@JasonS09 ControlNet tile should work assuming you are using the base ComfyUI nodes for it.

EricRollei commented 11 months ago

What is so strange to me is that I was using it fine in my workflow and it ran like 50 runs with no problems and hundreds of runs with a very similar workflow. All of a sudden I started to get this error. I did not update nodes or comfy, or change nodes or parameters. That's what's so mystifiying . It will run a few runs, then give the error again.

I disabled the controlnet and it's run a few gens without error, but who knows.... let's see.

Updates.... seems to be working fine now that I've bypassed the controlnet so maybe that's where the issue lies for my workflow at least. I was using controlnet SDXL canny and advanced apply controlnet that uses both pos and neg conditioning

kikoferrer commented 10 months ago

I got back to using comfy today after 2 weeks and I got the same error. Any fix for this yet? I use tile controlnet

ssitu commented 10 months ago

I got back to using comfy today after 2 weeks and I got the same error. Any fix for this yet? I use tile controlnet

You either are using conditioning that isn't compatible or are mixing conditionings from SDXL with SD1.5

kikoferrer commented 10 months ago

I got back to using comfy today after 2 weeks and I got the same error. Any fix for this yet? I use tile controlnet

You either are using conditioning that isn't compatible or are mixing conditionings from SDXL with SD1.5

Is it possible to be dependencies issue? I just tried on my PC and it work no sweat. my laptop awhile ago got this error with the same exact node setup. Imma reinstall my comfy in my laptop to be sure. Thanks

ssitu commented 10 months ago

Is it possible to be dependencies issue? I just tried on my PC and it work no sweat. my laptop awhile ago got this error with the same exact node setup. Imma reinstall my comfy in my laptop to be sure. Thanks

I've never seen it as a dependency issue.