Giter VIP home page Giter VIP logo

comfyui_ultimatesdupscale's People

Contributors

ssitu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

comfyui_ultimatesdupscale's Issues

suggestion - batch support

Granted it might only be useful to people with more vram, is it possible to add a feature that supports multiple img2img tiles being generated in a batch, say for example 4 at a time to increase overall inference speed?

Has an issue with the recursion limit after upscaling a few images

Error occurred when executing UltimateSDUpscale:

maximum recursion depth exceeded while calling a Python object

File "F:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "F:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_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 "F:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 75, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "F:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\nodes.py", line 124, in upscale
processed = script.run(p=sdprocessing, =None, tile_width=tile_width, tile_height=tile_height,
File "F:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories\ultimate_sd_upscale\scripts\ultimate-upscale.py", line 553, in run
upscaler.process()
File "F:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\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:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\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:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\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:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\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:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\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:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\sample_error_enhancer.py", line 22, in informative_sample
raise e
File "F:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\sample_error_enhancer.py", line 9, in informative_sample
return original_sample(*args, **kwargs)
File "F:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\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:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\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:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 370, in load_models_gpu
unload_model_clones(loaded_model.model)
File "F:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 321, in unload_model_clones
current_loaded_models.pop(i).model_unload()
File "F:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 304, in model_unload
self.model.unpatch_model(self.model.offload_device)
File "F:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\comfy\model_patcher.py", line 287, in unpatch_model
self.model.to(device_to)
File "F:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\python_embeded\lib\site-packages\accelerate\big_modeling.py", line 416, in wrapper
return fn(*args, **kwargs)
File "F:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\python_embeded\lib\site-packages\accelerate\big_modeling.py", line 416, in wrapper
return fn(*args, **kwargs)
File "F:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\python_embeded\lib\site-packages\accelerate\big_modeling.py", line 416, in wrapper
return fn(*args, **kwargs)
[Previous line repeated 957 more times]
File "F:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\python_embeded\lib\site-packages\accelerate\big_modeling.py", line 412, in wrapper
logger.warning("You shouldn't move a model when it is dispatched on multiple devices.")
File "logging_init
.py", line 1489, in warning
File "logging_init_.py", line 1624, in log
File "logging_init
.py", line 1634, in handle
File "logging_init_.py", line 1696, in callHandlers
File "logging_init_.py", line 968, in handle
File "logging_init_.py", line 1103, in emit
File "F:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\python_embeded\lib\site-packages\colorama\ansitowin32.py", line 47, in write
self.__convertor.write(text)
File "F:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\python_embeded\lib\site-packages\colorama\ansitowin32.py", line 177, in write
self.write_and_convert(text)
File "F:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\python_embeded\lib\site-packages\colorama\ansitowin32.py", line 205, in write_and_convert
self.write_plain_text(text, cursor, len(text))
File "F:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\python_embeded\lib\site-packages\colorama\ansitowin32.py", line 210, in write_plain_text
self.wrapped.write(text[start:end])
File "F:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager\prestartup_script.py", line 32, in write
match = re.search(tqdm, message)
File "re.py", line 200, in search
File "re.py", line 290, in _compile

UpscalerData.__init__() error on execution

When executing a node, an error is displayed.
This happens if output "IMAGE" is connected to nodes: "Save Image", "Preview Image"

Error occurred when executing UltimateSDUpscale:

UpscalerData.__init__() missing 2 required positional arguments: 'name' and 'path'

File "D:\StableDiffusion\stable-diffusion-webui\extensions\sd-webui-comfyui\ComfyUI\execution.py", line 145, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "D:\StableDiffusion\stable-diffusion-webui\extensions\sd-webui-comfyui\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:\StableDiffusion\stable-diffusion-webui\extensions\sd-webui-comfyui\ComfyUI\execution.py", line 68, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "D:\StableDiffusion\stable-diffusion-webui\extensions\sd-webui-comfyui\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\nodes.py", line 105, in upscale
shared.sd_upscalers[0] = UpscalerData()

import fail

from modules import processing, shared, images, devices, scripts
ImportError: cannot import name 'devices' from 'modules' (D:\ComfyUI_Portable\ComfyUI\custom_nodes\comfyui-reactor-node\modules_init_.py)

Import Failed with the latest UlimateSDUpscale

I just did a clean clone of the latest version and when starting ComfyUI it throws an Import Failed.

Reverting to an older build of UltimateSDUpscale (used a version installed before 20230727) did fix the problem and it works correctly on the latest ComfyUI build.

Traceback (most recent call last):
  File "f:\ai\ComfyUI\nodes.py", line 1647, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "F:\ai\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\__init__.py", line 23, in <module>
    from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
  File "F:\ai\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\nodes.py", line 5, in <module>
    from usdu_patch import usdu
  File "F:\ai\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\usdu_patch.py", line 2, in <module>
    from repositories import ultimate_upscale as usdu
  File "F:\ai\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories\__init__.py", line 14, in <module>
    spec.loader.exec_module(ultimate_upscale)
  File "<frozen importlib._bootstrap_external>", line 879, in exec_module
  File "<frozen importlib._bootstrap_external>", line 1016, in get_code
  File "<frozen importlib._bootstrap_external>", line 1073, in get_data
FileNotFoundError: [Errno 2] No such file or directory: 'F:\\ai\\ComfyUI\\custom_nodes\\ComfyUI_UltimateSDUpscale\\repositories/ultimate_sd_upscale/scripts/ultimate-upscale.py'

Cannot import F:\ai\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale module for custom nodes: [Errno 2] No such file or directory: 'F:\\ai\\ComfyUI\\custom_nodes\\ComfyUI_UltimateSDUpscale\\repositories/ultimate_sd_upscale/scripts/ultimate-upscale.py'

Import times for custom nodes:
   0.0 seconds (IMPORT FAILED): F:\ai\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale

previews not working - taesd and latent2RGB

Hi,

Am I doing something wrong or it doesn't always work?
I'm starting Comfy with parameter '--preview-method taesd' and have 'Preview method: TAESD (slow)' selected in Comfy Manager.
The Upscaler only shows one image while it's upscaling it and then stops for the rest of the session until I restart Comfy, or change a setting in Comfy Manager.
Is there a way to enable it all the time?
I'm using DirectML and AMD card if that makes any difference.

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

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\ComfyUI_UltimateSDUpscale\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

Error occurred when executing UltimateSDUpscale: 'pooled_output'

Hi, any solutions for this error ? Thanks

Error occurred when executing UltimateSDUpscale:

'pooled_output'

File "C:\Users\Admin\Documents\Stable diffusion\ComfyUI\ComfyUI\execution.py", line 155, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\Documents\Stable diffusion\ComfyUI\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 "C:\Users\Admin\Documents\Stable diffusion\ComfyUI\ComfyUI\execution.py", line 78, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\Documents\Stable diffusion\ComfyUI\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\nodes.py", line 125, in upscale
processed = script.run(p=sdprocessing, _=None, tile_width=tile_width, tile_height=tile_height,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\Documents\Stable diffusion\ComfyUI\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories\ultimate_sd_upscale\scripts\ultimate-upscale.py", line 553, in run
upscaler.process()
File "C:\Users\Admin\Documents\Stable diffusion\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 "C:\Users\Admin\Documents\Stable diffusion\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 "C:\Users\Admin\Documents\Stable diffusion\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 "C:\Users\Admin\Documents\Stable diffusion\ComfyUI\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\modules\processing.py", line 122, in process_images
(samples,) = common_ksampler(p.model, p.seed, p.steps, p.cfg, p.sampler_name,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\Documents\Stable diffusion\ComfyUI\ComfyUI\nodes.py", line 1325, in common_ksampler
samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\Documents\Stable diffusion\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\sample_error_enhancer.py", line 9, in informative_sample
return original_sample(*args, **kwargs) # This code helps interpret error messages that occur within exceptions but does not have any impact on other operations.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\Documents\Stable diffusion\ComfyUI\ComfyUI\custom_nodes\ComfyUI-AnimateDiff-Evolved\animatediff\sampling.py", line 218, in motion_sample
return orig_comfy_sample(model, noise, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\Documents\Stable diffusion\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 "C:\Users\Admin\Documents\Stable diffusion\ComfyUI\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:\Users\Admin\Documents\Stable diffusion\ComfyUI\ComfyUI\comfy\samplers.py", line 606, in sample
positive = encode_model_conds(model.extra_conds, positive, noise, device, "positive", latent_image=latent_image, denoise_mask=denoise_mask, seed=seed)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\Documents\Stable diffusion\ComfyUI\ComfyUI\comfy\samplers.py", line 502, in encode_model_conds
out = model_function(**params)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\Documents\Stable diffusion\ComfyUI\ComfyUI\comfy\model_base.py", line 149, in extra_conds
adm = self.encode_adm(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\Documents\Stable diffusion\ComfyUI\ComfyUI\comfy\model_base.py", line 290, in encode_adm
clip_pooled = sdxl_pooled(kwargs, self.noise_augmentor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\Documents\Stable diffusion\ComfyUI\ComfyUI\comfy\model_base.py", line 254, in sdxl_pooled
return args["pooled_output"]

node will not load in pre-made workflow

Hi, I'm using Comfyui on windows 11. I get the following error:
"When loading the graph, the following node types were not found:
UltimateSDUpscale
Nodes that have failed to load will show as red on the graph."

I have this installed. When I pull up manager to install missing nodes it shows it installed already. I have deleted it, installed directly thru git, and git pull, reinstalled everything half a dozen times. I cannot get it to work. Please know I'm fairly new to this and do not know programming. However, I was able to install all the other nodes, so far, with no difficulty. Please tell me what step I am missing!
If it makes a difference, the workflow I am trying to load is: sdxl10COMFYCONFIG_v10
Thanks

Ultimate SD Upscale infinite loading

i've been trying to figure out how to incorporate this, but i seem to get an infinite image generation loop with Ultimate SD Upscale. I am basically doing image to image where i convert an image to latent, use aksampler, use roop to generate and upscale the face, then use ultimate sd upscale to upscale it all, but it never finishes. I have attached my workflow if anyone is kind enough to offer help or suggestions. I feel like this is my last step to finally get perfectly upscaled image generations.
Img2Img_USDU.json

Import Failed (followed instructions)

Also ran cmd as administrator

C:\Users\ckao1\OneDrive\Desktop\fresh_ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes>git clone https://github.com/ssitu/ComfyUI_UltimateSDUpscale --recursive
Cloning into 'ComfyUI_UltimateSDUpscale'...
remote: Enumerating objects: 256, done.
remote: Counting objects: 100% (43/43), done.
remote: Compressing objects: 100% (26/26), done.
Receiving objects: 100% (256/256), 68.88 KiB | 839.00 KiB/s, done.3

Resolving deltas: 100% (155/155), done.
Submodule 'repositories/ultimate_sd_upscale' (https://github.com/Coyote-A/ultimate-upscale-for-automatic1111) registered for path 'repositories/ultimate_sd_upscale'
Cloning into 'C:/Users/ckao1/OneDrive/Desktop/fresh_ComfyUI_windows_portable_nvidia_cu121_or_cpu/ComfyUI_windows_portable/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/repositories/ultimate_sd_upscale'...
remote: Enumerating objects: 318, done.
remote: Counting objects: 100% (93/93), done.
remote: Compressing objects: 100% (47/47), done.
remote: Total 318 (delta 38), reused 81 (delta 29), pack-reused 225
Receiving objects: 100% (318/318), 32.23 MiB | 1.86 MiB/s, done.
Resolving deltas: 100% (113/113), done.
fatal: cannot write keep file 'C:/Users/ckao1/OneDrive/Desktop/fresh_ComfyUI_windows_portable_nvidia_cu121_or_cpu/ComfyUI_windows_portable/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/.git/modules/repositories/ultimate_sd_upscale/objects/pack/pack-54b1f258e441ccf82bf2612e0f853c5e3da1ec4e.keep': Filename too long
fatal: fetch-pack: invalid index-pack output
fatal: clone of 'https://github.com/Coyote-A/ultimate-upscale-for-automatic1111' into submodule path 'C:/Users/ckao1/OneDrive/Desktop/fresh_ComfyUI_windows_portable_nvidia_cu121_or_cpu/ComfyUI_windows_portable/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/repositories/ultimate_sd_upscale' failed
Failed to clone 'repositories/ultimate_sd_upscale'. Retry scheduled
Cloning into 'C:/Users/ckao1/OneDrive/Desktop/fresh_ComfyUI_windows_portable_nvidia_cu121_or_cpu/ComfyUI_windows_portable/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/repositories/ultimate_sd_upscale'...
remote: Enumerating objects: 318, done.
remote: Counting objects: 100% (93/93), done.
remote: Compressing objects: 100% (47/47), done.
remote: Total 318 (delta 38), reused 81 (delta 29), pack-reused 225
Receiving objects: 100% (318/318), 32.23 MiB | 1.79 MiB/s, done.
Resolving deltas: 100% (113/113), done.
fatal: cannot write keep file 'C:/Users/ckao1/OneDrive/Desktop/fresh_ComfyUI_windows_portable_nvidia_cu121_or_cpu/ComfyUI_windows_portable/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/.git/modules/repositories/ultimate_sd_upscale/objects/pack/pack-ed1ce62df038b132b4e535c5b90b33d217fb620d.keep': Filename too long
fatal: fetch-pack: invalid index-pack output
fatal: clone of 'https://github.com/Coyote-A/ultimate-upscale-for-automatic1111' into submodule path 'C:/Users/ckao1/OneDrive/Desktop/fresh_ComfyUI_windows_portable_nvidia_cu121_or_cpu/ComfyUI_windows_portable/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/repositories/ultimate_sd_upscale' failed
Failed to clone 'repositories/ultimate_sd_upscale' a second time, aborting

import failed i know this is an old issue but

0.0 seconds (IMPORT FAILED): C:\COMFY\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale

C:\COMFY\ComfyUI_windows_portable\ComfyUI\custom_nodes>git clone https://github.com/ssitu/ComfyUI_UltimateSDUpscale.git
Cloning into 'ComfyUI_UltimateSDUpscale'...
remote: Enumerating objects: 248, done.
remote: Counting objects: 100% (35/35), done.
remote: Compressing objects: 100% (21/21), done.
Receiving objects: 98% (244/248)sed 19 (delta 14), pack-reused 213
Receiving objects: 100% (248/248), 64.23 KiB | 1.15 MiB/s, done.
Resolving deltas: 100% (152/152), done.

seems to have installed ok. Tried a number or times and no luck getting it recognized. Using it with Krita and keep getting error. image below of what was installed

https://github.com/ssitu/ComfyUI_UltimateSDUpscale.git

it is slower than a1111 webui

It seems that the highres fix in comfyui is to enlarge the tiles one by one in sequence, and webui is processed at the same time.
Can you improve this a little bit, it will be perfect

error

Traceback (most recent call last):
File "D:\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1872, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 940, in exec_module
File "", line 241, in call_with_frames_removed
File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale_init
.py", line 24, in
from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\nodes.py", line 5, in
from usdu_patch import usdu
File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\usdu_patch.py", line 2, in
from repositories import ultimate_upscale as usdu
File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories_init_.py", line 14, in
spec.loader.exec_module(ultimate_upscale)
File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories\ultimate_sd_upscale\scripts\ultimate-upscale.py", line 4, in
from modules import processing, shared, images, devices, scripts
ImportError: cannot import name 'images' from 'modules' (D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node\modules_init_.py)

Cannot import D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale module for custom nodes: cannot import name 'images' from 'modules' (D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node\modules_init_.py)

Error when trying to upscale an image from SDXL model and mix it with an other model (Realistic Vision)

Hi,

I got this error when I tried to use the Realistic Vision v5.0 model (same with other SD 1.5 model). What I can do to avoid this error ? I think it's about the aspect ratio of the source image and the SD 1.5 model lke Realistic Vision, no ? Or it's something else ;)

I try to use this model during upscale or Photon v1.0 to get more realistic skin / face during upscale. It's working well with standard SD 1.5 model but here, it's not working (note: work well if I use the SDXL refiner model but the skin and the face are not so well, not like a photo).

Here is the error :
`
Error occurred when executing UltimateSDUpscale:

mat1 and mat2 shapes cannot be multiplied (154x1280 and 768x320)

File "E:\00_ComfyUI\ComfyUI\execution.py", line 144, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "E:\00_ComfyUI\ComfyUI\execution.py", line 74, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "E:\00_ComfyUI\ComfyUI\execution.py", line 67, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "E:\00_ComfyUI\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\nodes.py", line 124, in upscale
processed = script.run(p=sdprocessing, _=None, tile_width=tile_width, tile_height=tile_height,
File "E:\00_ComfyUI\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories/ultimate_sd_upscale/scripts/ultimate-upscale.py", line 553, in run
upscaler.process()
File "E:\00_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 "E:\00_ComfyUI\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories/ultimate_sd_upscale/scripts/ultimate-upscale.py", line 245, in start
return self.chess_process(p, image, rows, cols)
File "E:\00_ComfyUI\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories/ultimate_sd_upscale/scripts/ultimate-upscale.py", line 215, in chess_process
processed = processing.process_images(p)
File "E:\00_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 "E:\00_ComfyUI\ComfyUI\nodes.py", line 1127, in common_ksampler
samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image,
File "E:\00_ComfyUI\ComfyUI\comfy\sample.py", line 88, 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:\00_ComfyUI\ComfyUI\comfy\samplers.py", line 714, in sample
samples = k_diffusion_sampling.sample_dpm_adaptive(self.model_k, noise, sigma_min, sigmas[0], extra_args=extra_args, callback=k_callback, disable=disable_pbar)
File "E:\00_ComfyUI\python_embeded\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "E:\00_ComfyUI\ComfyUI\comfy\k_diffusion\sampling.py", line 487, in sample_dpm_adaptive
x, info = dpm_solver.dpm_solver_adaptive(x, dpm_solver.t(torch.tensor(sigma_max)), dpm_solver.t(torch.tensor(sigma_min)), order, rtol, atol, h_init, pcoeff, icoeff, dcoeff, accept_safety, eta, s_noise, noise_sampler)
File "E:\00_ComfyUI\ComfyUI\comfy\k_diffusion\sampling.py", line 438, in dpm_solver_adaptive
eps, eps_cache = self.eps(eps_cache, 'eps', x, s)
File "E:\00_ComfyUI\ComfyUI\comfy\k_diffusion\sampling.py", line 338, in eps
eps = (x - self.model(x, sigma, *args, **self.extra_args, **kwargs)) / self.sigma(t)
File "E:\00_ComfyUI\python_embeded\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "E:\00_ComfyUI\ComfyUI\comfy\samplers.py", line 319, in forward
out = self.inner_model(x, sigma, cond=cond, uncond=uncond, cond_scale=cond_scale, cond_concat=cond_concat, model_options=model_options, seed=seed)
File "E:\00_ComfyUI\python_embeded\lib\site-packages\torch\nn\modules\module.py", line 1501, in call_impl
return forward_call(*args, **kwargs)
File "E:\00_ComfyUI\ComfyUI\comfy\k_diffusion\external.py", line 125, in forward
eps = self.get_eps(input * c_in, self.sigma_to_t(sigma), **kwargs)
File "E:\00_ComfyUI\ComfyUI\comfy\k_diffusion\external.py", line 151, in get_eps
return self.inner_model.apply_model(*args, **kwargs)
File "E:\00_ComfyUI\ComfyUI\comfy\samplers.py", line 307, in apply_model
out = sampling_function(self.inner_model.apply_model, x, timestep, uncond, cond, cond_scale, cond_concat, model_options=model_options, seed=seed)
File "E:\00_ComfyUI\ComfyUI\comfy\samplers.py", line 285, in sampling_function
cond, uncond = calc_cond_uncond_batch(model_function, cond, uncond, x, timestep, max_total_area, cond_concat, model_options)
File "E:\00_ComfyUI\ComfyUI\comfy\samplers.py", line 262, in calc_cond_uncond_batch
output = model_function(input_x, timestep
, **c).chunk(batch_chunks)
File "E:\00_ComfyUI\ComfyUI\comfy\model_base.py", line 61, in apply_model
return self.diffusion_model(xc, t, context=context, y=c_adm, control=control, transformer_options=transformer_options).float()
File "E:\00_ComfyUI\python_embeded\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "E:\00_ComfyUI\ComfyUI\comfy\ldm\modules\diffusionmodules\openaimodel.py", line 834, in forward
h = forward_timestep_embed(module, h, emb, context, transformer_options)
File "E:\00_ComfyUI\ComfyUI\comfy\ldm\modules\diffusionmodules\openaimodel.py", line 97, in forward_timestep_embed
x = layer(x, context, transformer_options)
File "E:\00_ComfyUI\python_embeded\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "E:\00_ComfyUI\ComfyUI\comfy\ldm\modules\attention.py", line 695, in forward
x = block(x, context=context[i], transformer_options=transformer_options)
File "E:\00_ComfyUI\python_embeded\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "E:\00_ComfyUI\ComfyUI\comfy\ldm\modules\attention.py", line 527, in forward
return checkpoint(self._forward, (x, context, transformer_options), self.parameters(), self.checkpoint)
File "E:\00_ComfyUI\ComfyUI\comfy\ldm\modules\diffusionmodules\util.py", line 123, in checkpoint
return func(*inputs)
File "E:\00_ComfyUI\ComfyUI\comfy\ldm\modules\attention.py", line 627, in _forward
n = self.attn2(n, context=context_attn2, value=value_attn2)
File "E:\00_ComfyUI\python_embeded\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "E:\00_ComfyUI\ComfyUI\comfy\ldm\modules\attention.py", line 422, in forward
k = self.to_k(context)
File "E:\00_ComfyUI\python_embeded\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "E:\00_ComfyUI\ComfyUI\comfy\ops.py", line 18, in forward
return torch.nn.functional.linear(input, self.weight, self.bias)
`

If you can tell me what I need to do to solve this, it'll be great.
Thank you,

Matt

[BUG]: float division by zero

I did an update of ComfyUI (portable) today and suddenly I have a problem with the UltimateSDUpscale which has functioned perfectly till now.

Error occurred when executing UltimateSDUpscale:

float division by zero

File "I:\Programme\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "I:\Programme\ComfyUI_windows_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 "I:\Programme\ComfyUI_windows_portable\ComfyUI\execution.py", line 75, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "I:\Programme\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\nodes.py", line 124, in upscale
processed = script.run(p=sdprocessing, _=None, tile_width=tile_width, tile_height=tile_height,
File "I:\Programme\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories\ultimate_sd_upscale\scripts\ultimate-upscale.py", line 553, in run
upscaler.process()
File "I:\Programme\ComfyUI_windows_portable\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 "I:\Programme\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories\ultimate_sd_upscale\scripts\ultimate-upscale.py", line 245, in start
return self.chess_process(p, image, rows, cols)
File "I:\Programme\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories\ultimate_sd_upscale\scripts\ultimate-upscale.py", line 215, in chess_process
processed = processing.process_images(p)
File "I:\Programme\ComfyUI_windows_portable\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 "I:\Programme\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1206, in common_ksampler
samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image,
File "I:\Programme\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\sample_error_enhancer.py", line 9, in informative_sample
return original_sample(*args, **kwargs)
File "I:\Programme\ComfyUI_windows_portable\ComfyUI\comfy\sample.py", line 95, in sample
sampler = comfy.samplers.KSampler(real_model, steps=steps, device=model.load_device, sampler=sampler_name, scheduler=scheduler, denoise=denoise, model_options=model.model_options)
File "I:\Programme\ComfyUI_windows_portable\ComfyUI\comfy\samplers.py", line 738, in init
self.set_steps(steps, denoise)
File "I:\Programme\ComfyUI_windows_portable\ComfyUI\comfy\samplers.py", line 761, in set_steps
new_steps = int(steps/denoise)

Any ideas where the problem is? 🤔

Using SD1.5 Results in a mess of an upscale?

Hello,

I'm trying to create a workflow to compare SD Ultimate Upscale using SDXL alone ; and SD1.5 + a Tile controlnet.
The worklow works fine for SDXL, however using SD1.5 models results in a jumbled mess (even without the controlnet plugged in).
I tried a few different models, a different VAE, but everytime I get the same jumbled result.

Here is a screenshot of my workflow + a typical "jumbled" image + the workflow itself.

What am I doing wrong here?

Example
Jumbled_Images.json
image

Image isn't sampling with "Ultimate SD Upscale (No upscale)" if mode_type = None

hello :)
been using your nodes so far and getting very nice result.
encountered with particular situation:
comfyUI version is @comfyanonymous/ComfyUI@6fb084f
workflow includes

  • Ksampler (default or advanced one)
  • VAE Decode
  • "Ultimate SD Upscale (No upscale)"
    image
  1. If mode_type is set to Linear or Chess sampling is happening with steps, cfg and scheduler set in node

  2. If mode_type is set to None images aren't using node settings (steps, cfg and scheduler), but instead just producing same pictures that was generated in Ksampler node

there is no actual error in console

got prompt
Canva size: 1024x1024
Image size: 1024x1024
Scale factor: 1
Tile size: 1024x1024
Tiles amount: 1
Grid: 1x1
Redraw enabled: False
Seams fix mode: NONE
Prompt executed in 0.59 seconds
got prompt
Canva size: 1024x1024
Image size: 1024x1024
Scale factor: 1
Tile size: 1024x1024
Tiles amount: 1
Grid: 1x1
Redraw enabled: False
Seams fix mode: NONE
Prompt executed in 0.64 seconds

is it an error?

Nodes not showing up

So I tried installing via comfyUI manager and git command and the nodes are not showing up and my workflow is saying that it's not installed, I have everything up to date. Can the issue be because I have other extensions?
this workflow-
Capybara's_Workflow_v1 4

Screenshot 2023-09-29 101207
Screenshot 2023-09-29 101231

I also don't understand if it's a problem with Ultimate SD Upscale or comfyui.

When I open comfyui and process the image for the 1st time, Ultimate SD Upscale is fast (ImgtoImg).
At this point, if I just change some parameters and continue generating, it's still fast.
But if I replace an input image, when I go to Ultimate SD Upscale, there is not enough memory(pretty sure) and the processing becomes slow.
So I did a test, 1. cancel the current queue during processing; 2. start generating again. At this point Ultimate SD Upscale's speed became normal. Even though I canceled the queue before the process reached Ultimate SD Upscale.
The result is that as soon as I replace the input image and then cancel it once during the generation process, then Ultimate SD Upscale is able to process at normal speed.

Translated with www.DeepL.com/Translator

Error when using with Conditioning (set area) + Conditioning (combine)

ERROR:root:!!! Exception during processing !!!
ERROR:root:Traceback (most recent call last):
  File "/home/ubuntu/ComfyUI/execution.py", line 153, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
  File "/home/ubuntu/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/ubuntu/ComfyUI/execution.py", line 76, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
  File "/home/ubuntu/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/nodes.py", line 124, in upscale
    processed = script.run(p=sdprocessing, _=None, tile_width=tile_width, tile_height=tile_height,
  File "/home/ubuntu/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/repositories/ultimate_sd_upscale/scripts/ultimate-upscale.py", line 553, in run
    upscaler.process()
  File "/home/ubuntu/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 "/home/ubuntu/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 "/home/ubuntu/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/repositories/ultimate_sd_upscale/scripts/ultimate-upscale.py", line 178, in linear_process
    processed = processing.process_images(p)
  File "/home/ubuntu/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/modules/processing.py", line 110, in process_images
    positive_cropped = crop_cond(p.positive, crop_region, p.init_size, init_image.size, tile_size)
  File "/home/ubuntu/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/utils.py", line 457, in crop_cond
    crop_area(cond_dict, region, init_size, canvas_size, tile_size, w_pad, h_pad)
  File "/home/ubuntu/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/utils.py", line 391, in crop_area
    h, w, y, x = cond_dict["area"]
ValueError: too many values to unpack (expected 4)

If this is not expected I can give a reproducible example.

ipadapter for use with the tiling?

Any chance there would be a way to integrate ipadapter to analyze the individual tiles as the upscaling is happening, this would likely help the issue where you get little faces from the portrait in each of the upscales if you upscale too quickly because the overall prompt doesn't match a tile of the image, if we could use ipadapter to analyze the tile with a higher strength than the overall weight it might really improve things.

[Feature request] change "Canva size" to be divisible by 8

hello :)
thanks for your work :)

started to use new node "Ultimate SD Upscale (No upscale)". And encountering problems with picture resolution if it not divisible by 64.
Problem is that node is making picture bigger when sampling it.

For example, image is 968x1600 and node making it 1024x1600, because 968 isn't divisible by 64

Canva size: 1024x1600                                                                                                   
Image size: 968x1600                                                                                                    
Scale factor: 1                                                                                                         
Tile size: 968x1600                                                                                                     
Tiles amount: 2                                                                                                         
Grid: 1x2                                                                                                               
Redraw enabled: True                                                                                                    
Seams fix mode: HALF_TILE 

but for "Ultimate SD Upscale (No upscale)". Canva size: 968x1600 :)

is it possible to change Canva size behaviour to be divisible by 8?

Erro after latest update

hi, USDUpscaler was working perfectly, this morning updated to latest version of node and now get this error "UltimateSDUpscale: - Required input is missing: force_uniform_tiles". I am trying to upscale using controlnet tile, as I said it was working fine, but after the update the Ultimate SDupscale node gives me this error. Any help in resolving this would be apreciated. Thanks.

not compatible with FP8?

ERROR:root:!!! Exception during processing !!!
ERROR:root:Traceback (most recent call last):
File "C:\Product\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 153, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Product\ComfyUI\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:\Product\ComfyUI\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:\Product\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\nodes.py", line 124, in upscale
processed = script.run(p=sdprocessing, _=None, tile_width=tile_width, tile_height=tile_height,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Product\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories\ultimate_sd_upscale\scripts\ultimate-upscale.py", line 553, in run
upscaler.process()
File "C:\Product\ComfyUI\ComfyUI_windows_portable\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 "C:\Product\ComfyUI\ComfyUI_windows_portable\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 "C:\Product\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories\ultimate_sd_upscale\scripts\ultimate-upscale.py", line 178, in linear_process
processed = processing.process_images(p)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Product\ComfyUI\ComfyUI_windows_portable\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 "C:\Product\ComfyUI\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1269, in common_ksampler
samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Product\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\sample_error_enhancer.py", line 9, in informative_sample
return original_sample(*args, **kwargs) # This code helps interpret error messages that occur within exceptions but does not have any impact on other operations.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Product\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-AnimateDiff-Evolved\animatediff\sampling.py", line 242, in motion_sample
return orig_comfy_sample(model, noise, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Product\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\sample.py", line 93, in sample
real_model, positive_copy, negative_copy, noise_mask, models = prepare_sampling(model, noise.shape, positive, negative, noise_mask)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Product\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\sample.py", line 86, in prepare_sampling
comfy.model_management.load_models_gpu([model] + models, model.memory_required([noise_shape[0] * 2] + list(noise_shape[1:])) + inference_memory)
File "C:\Product\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 410, in load_models_gpu
cur_loaded_model = loaded_model.model_load(lowvram_model_memory)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Product\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 297, in model_load
device_map = accelerate.infer_auto_device_map(self.real_model, max_memory={0: "{}MiB".format(lowvram_model_memory // (1024 * 1024)), "cpu": "16GiB"})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Product\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\accelerate\utils\modeling.py", line 978, in infer_auto_device_map
module_sizes = compute_module_sizes(model, dtype=dtype, special_dtypes=special_dtypes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Product\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\accelerate\utils\modeling.py", line 616, in compute_module_sizes
size = tensor.numel() * dtype_byte_size(tensor.dtype)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Product\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\accelerate\utils\modeling.py", line 115, in dtype_byte_size
raise ValueError(f"dtype is not a valid dtype: {dtype}.")
ValueError: dtype is not a valid dtype: torch.float8_e4m3fn.

Error occurred when executing UltimateSDUpscale: not enough GPU video memory

Getting this error when using this workflow
workflow
i have a AMD Radeon RX 5700 XT 8GB memory and 16gb shared memory

Error occurred when executing UltimateSDUpscale:

Could not allocate tensor with 1073741824 bytes. There is not enough GPU video memory available!

File "D:\AI\ComfyUI_AMD\ComfyUI\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "D:\AI\ComfyUI_AMD\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:\AI\ComfyUI_AMD\ComfyUI\execution.py", line 75, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "D:\AI\ComfyUI_AMD\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\nodes.py", line 124, in upscale
processed = script.run(p=sdprocessing, _=None, tile_width=tile_width, tile_height=tile_height,
File "D:\AI\ComfyUI_AMD\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories\ultimate_sd_upscale\scripts\ultimate-upscale.py", line 546, in run
upscaler.upscale()
File "D:\AI\ComfyUI_AMD\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\usdu_patch.py", line 61, in new_upscale
old_upscale(self)
File "D:\AI\ComfyUI_AMD\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories\ultimate_sd_upscale\scripts\ultimate-upscale.py", line 81, in upscale
self.image = self.upscaler.scaler.upscale(self.image, value, self.upscaler.data_path)
File "D:\AI\ComfyUI_AMD\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\modules\upscaler.py", line 21, in upscale
shared.batch = [self._upscale(img, scale) for img in shared.batch]
File "D:\AI\ComfyUI_AMD\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\modules\upscaler.py", line 21, in
shared.batch = [self._upscale(img, scale) for img in shared.batch]
File "D:\AI\ComfyUI_AMD\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\modules\upscaler.py", line 17, in _upscale
(upscaled,) = image_upscale_node.upscale(shared.actual_upscaler, tensor)
File "D:\AI\ComfyUI_AMD\ComfyUI\comfy_extras\nodes_upscale_model.py", line 52, in upscale
s = comfy.utils.tiled_scale(in_img, lambda a: upscale_model(a), tile_x=tile, tile_y=tile, overlap=overlap, upscale_amount=upscale_model.scale, pbar=pbar)
File "C:\Users\Drago87\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "D:\AI\ComfyUI_AMD\ComfyUI\comfy\utils.py", line 395, in tiled_scale
ps = function(s_in).cpu()
File "D:\AI\ComfyUI_AMD\ComfyUI\comfy_extras\nodes_upscale_model.py", line 52, in
s = comfy.utils.tiled_scale(in_img, lambda a: upscale_model(a), tile_x=tile, tile_y=tile, overlap=overlap, upscale_amount=upscale_model.scale, pbar=pbar)
File "C:\Users\Drago87\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "D:\AI\ComfyUI_AMD\ComfyUI\comfy_extras\chainner_models\architecture\RRDB.py", line 296, in forward
return self.model(x)
File "C:\Users\Drago87\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "C:\Users\Drago87\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\container.py", line 217, in forward
input = module(input)
File "C:\Users\Drago87\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "C:\Users\Drago87\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\conv.py", line 463, in forward
return self._conv_forward(input, self.weight, self.bias)
File "C:\Users\Drago87\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\conv.py", line 459, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,

if i try running it in

--lowvram

both are using

--directml

i get

Error occurred when executing UltimateSDUpscale:

Torch not compiled with CUDA enabled

File "D:\AI\ComfyUI_AMD\ComfyUI\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "D:\AI\ComfyUI_AMD\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:\AI\ComfyUI_AMD\ComfyUI\execution.py", line 75, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "D:\AI\ComfyUI_AMD\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\nodes.py", line 124, in upscale
processed = script.run(p=sdprocessing, _=None, tile_width=tile_width, tile_height=tile_height,
File "D:\AI\ComfyUI_AMD\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories\ultimate_sd_upscale\scripts\ultimate-upscale.py", line 553, in run
upscaler.process()
File "D:\AI\ComfyUI_AMD\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 "D:\AI\ComfyUI_AMD\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 "D:\AI\ComfyUI_AMD\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories\ultimate_sd_upscale\scripts\ultimate-upscale.py", line 178, in linear_process
processed = processing.process_images(p)
File "D:\AI\ComfyUI_AMD\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 "D:\AI\ComfyUI_AMD\ComfyUI\nodes.py", line 1206, in common_ksampler
samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image,
File "D:\AI\ComfyUI_AMD\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 "D:\AI\ComfyUI_AMD\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 "D:\AI\ComfyUI_AMD\ComfyUI\comfy\model_management.py", line 397, in load_models_gpu
cur_loaded_model = loaded_model.model_load(lowvram_model_memory)
File "D:\AI\ComfyUI_AMD\ComfyUI\comfy\model_management.py", line 291, in model_load
accelerate.dispatch_model(self.real_model, device_map=device_map, main_device=self.device)
File "C:\Users\Drago87\AppData\Local\Programs\Python\Python310\lib\site-packages\accelerate\big_modeling.py", line 396, in dispatch_model
attach_align_device_hook_on_blocks(
File "C:\Users\Drago87\AppData\Local\Programs\Python\Python310\lib\site-packages\accelerate\hooks.py", line 537, in attach_align_device_hook_on_blocks
attach_align_device_hook_on_blocks(
File "C:\Users\Drago87\AppData\Local\Programs\Python\Python310\lib\site-packages\accelerate\hooks.py", line 537, in attach_align_device_hook_on_blocks
attach_align_device_hook_on_blocks(
File "C:\Users\Drago87\AppData\Local\Programs\Python\Python310\lib\site-packages\accelerate\hooks.py", line 507, in attach_align_device_hook_on_blocks
add_hook_to_module(module, hook)
File "C:\Users\Drago87\AppData\Local\Programs\Python\Python310\lib\site-packages\accelerate\hooks.py", line 155, in add_hook_to_module
module = hook.init_hook(module)
File "C:\Users\Drago87\AppData\Local\Programs\Python\Python310\lib\site-packages\accelerate\hooks.py", line 253, in init_hook
set_module_tensor_to_device(module, name, self.execution_device)
File "C:\Users\Drago87\AppData\Local\Programs\Python\Python310\lib\site-packages\accelerate\utils\modeling.py", line 311, in set_module_tensor_to_device
new_value = old_value.to(device)
File "C:\Users\Drago87\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\cuda\__init__.py", line 239, in _lazy_init
raise AssertionError("Torch not compiled with CUDA enabled")

Got a syntax error

Total VRAM 16384 MB, total RAM 16384 MB
Set vram state to: SHARED
Device: mps
Using split optimization for cross attention
Traceback (most recent call last):
File "/Users/cdown/dill/comyui/ComfyUI/nodes.py", line 1590, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/Users/cdown/dill/comyui/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/init.py", line 23, in
from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
File "/Users/cdown/dill/comyui/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/nodes.py", line 5, in
from usdu_patch import usdu
File "/Users/cdown/dill/comyui/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/usdu_patch.py", line 2, in
from repositories import ultimate_upscale as usdu
File "/Users/cdown/dill/comyui/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/repositories/init.py", line 14, in
spec.loader.exec_module(ultimate_upscale)
File "/Users/cdown/dill/comyui/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/repositories/ultimate_sd_upscale/scripts/ultimate-upscale.py", line 4, in
from modules import processing, shared, images, devices, scripts
File "/Users/cdown/dill/comyui/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/modules/processing.py", line 69
match p.uniform_tile_mode:
^
SyntaxError: invalid syntax

Cannot import /Users/cdown/dill/comyui/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale module for custom nodes: invalid syntax (processing.py, line 69)

Import times for custom nodes:
0.0 seconds (IMPORT FAILED): /Users/cdown/dill/comyui/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale

Starting server

RAM out of memory errors.

Error occurred when executing UltimateSDUpscale:

[enforce fail at ..\c10\core\impl\alloc_cpu.cpp:72] data. DefaultCPUAllocator: not enough memory: you tried to allocate 5007237120 bytes.

File "C:\Users\zappa\Desktop\ComfyUi\ComfyUI_windows_portable\ComfyUI\execution.py", line 154, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "C:\Users\zappa\Desktop\ComfyUi\ComfyUI_windows_portable\ComfyUI\execution.py", line 84, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "C:\Users\zappa\Desktop\ComfyUi\ComfyUI_windows_portable\ComfyUI\execution.py", line 77, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "C:\Users\zappa\Desktop\ComfyUi\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\nodes.py", line 125, in upscale
processed = script.run(p=sdprocessing, _=None, tile_width=tile_width, tile_height=tile_height,
File "C:\Users\zappa\Desktop\ComfyUi\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories\ultimate_sd_upscale\scripts\ultimate-upscale.py", line 553, in run
upscaler.process()
File "C:\Users\zappa\Desktop\ComfyUi\ComfyUI_windows_portable\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 "C:\Users\zappa\Desktop\ComfyUi\ComfyUI_windows_portable\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 "C:\Users\zappa\Desktop\ComfyUi\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories\ultimate_sd_upscale\scripts\ultimate-upscale.py", line 178, in linear_process
processed = processing.process_images(p)
File "C:\Users\zappa\Desktop\ComfyUi\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\modules\processing.py", line 115, in process_images
negative_cropped = crop_cond(p.negative, crop_region, p.init_size, init_image.size, tile_size)
File "C:\Users\zappa\Desktop\ComfyUi\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\utils.py", line 455, in crop_cond
crop_controlnet(cond_dict, region, init_size, canvas_size, tile_size, w_pad, h_pad)
File "C:\Users\zappa\Desktop\ComfyUi\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\utils.py", line 313, in crop_controlnet
hint = resize_tensor(hint, tile_size[::-1])
File "C:\Users\zappa\Desktop\ComfyUi\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\utils.py", line 51, in resize_tensor
return torch.nn.functional.interpolate(tensor, size=size, mode=mode)
File "C:\Users\zappa\Desktop\ComfyUi\ComfyUI_windows_portable\python_embeded\lib\site-packages\torch\nn\functional.py", line 3938, in interpolate
return torch._C._nn._upsample_nearest_exact2d(input, output_size, scale_factors)

Running into errors with memory allocation in UltimateUpscale using large batches, I assume it shouldn't be an issue with 128gb of RAM and I don't haven any issues doing things of this size in latent. What could be the issue? Current batch size is 1410

Installation error

D:\ComfyUI\ComfyUI\custom_nodes>git clone https://github.com/ssitu/ComfyUI_UltimateSDUpscale --recursive
Cloning into 'ComfyUI_UltimateSDUpscale'...
remote: Enumerating objects: 248, done.
remote: Counting objects: 100% (35/35), done.
remote: Compressing objects: 100% (21/21), done.
remote: Total 248 (delta 18), reused 19 (delta 14), pack-reused 213
Receiving objects: 100% (248/248), 44.00 KiB | 58.00 KiB/s
Receiving objects: 100% (248/248), 64.25 KiB | 100.00 KiB/s, done.
Resolving deltas: 100% (152/152), done.
      0 [main] sh (11124) C:\Program Files\Git\usr\bin\sh.exe: *** fatal error - cygheap base mismatch detected - 0x1331408/0x13F1408.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.
      0 [main] sh 508 dofork: child -1 - forked process 11124 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
C:/Program Files/Git/mingw64/libexec/git-core\git-submodule: fork: retry: Resource temporarily unavailable
      0 [main] sh (10384) C:\Program Files\Git\usr\bin\sh.exe: *** fatal error - cygheap base mismatch detected - 0x1331408/0x1351408.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.
1019932 [main] sh 508 dofork: child -1 - forked process 10384 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
C:/Program Files/Git/mingw64/libexec/git-core\git-submodule: fork: retry: Resource temporarily unavailable
      0 [main] sh (15236) C:\Program Files\Git\usr\bin\sh.exe: *** fatal error - cygheap base mismatch detected - 0x1331408/0x1321408.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.
3039729 [main] sh 508 dofork: child -1 - forked process 15236 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
C:/Program Files/Git/mingw64/libexec/git-core\git-submodule: fork: retry: Resource temporarily unavailable
      0 [main] sh (1640) C:\Program Files\Git\usr\bin\sh.exe: *** fatal error - cygheap base mismatch detected - 0x1331408/0x1131408.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.
7052257 [main] sh 508 dofork: child -1 - forked process 1640 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
C:/Program Files/Git/mingw64/libexec/git-core\git-submodule: fork: retry: Resource temporarily unavailable
15059797 [main] sh 508 dofork: child -1 - forked process 3412 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
C:/Program Files/Git/mingw64/libexec/git-core\git-submodule: fork: Resource temporarily unavailable





[Feature] Improve progress indicators

It's really hard to tell where this node is at in it's overall progress, from either the UI or the logs. The UI seems to show progress per tile it creates, but there's no indicator there, or in the server logs about how many tiles are going to be created and how many are left. Thanks for your time!

Common issue that is posted in forums but still no solution

When downloading through the comfyui manger the extension loads into the workflow. But runs into errors when trying to execute:

File "C:\Users\jacom\ComfyUI_windows_portable\ComfyUI\execution.py", line 155, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jacom\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 "C:\Users\jacom\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 "C:\Users\jacom\ComfyUI_windows_portable\ComfyUI\comfy_extras\nodes_upscale_model.py", line 23, in load_model
out = model_loading.load_state_dict(sd).eval()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jacom\ComfyUI_windows_portable\ComfyUI\comfy_extras\chainner_models\model_loading.py", line 98, in load_state_dict
raise UnsupportedModel

I have tried downloading manually and placing everything into the proper folders several times. There are many others with the same issue. I used to be able to run this no problem several months ago but after reinstalling I keep running into the issue listed above.

install issues

I have tried to install via cmd in custom nodes, the manager and via link in manager. The file is in folder as if installed but won't load in any workflow. always red. failed to install and try fix doesn't work. what next? I need for 2 workflows badly. Please help!

Cannot upscale with ControlNet+MultiAreaConditioning

Whenever I try to upscale a 768x768 image created with MultiAreaConditioning, the result is a tiled mix of partial images as shown:

image

Using tile_width and tile_height of 768 instead of 512 also results in a wrong image:

image

I have no idea on how to configure the plugin because the README says nothing about the node's settings. Any help will be appreciated, thank.

Error when using as input to Facial Detailer

I'm not sure if this is an issue with the Facial Detailer from Impact Pack or if it's an issue with SD Upscale Node, but I only get this error when I use the Ultimate SD Upscale node before the Facial Detailer
image

Reference: ltdrdata/ComfyUI-Impact-Pack#26

The only way I can get it to work is by converting the image to latent and back to an image

image

The error only occurs when I use this node as an input to the facial detailer.

suggestion: noise seed changes for each tile

The way it works right now is that the same noise seed is used for each tile, even if set to random. Can we have it so that a new seed is generated (maybe increment the seed rather than create a random seed) for each tile so that patterns are less prone to showing up in the final image?

ImportError: cannot import name 'images' from 'modules'

When I update Manager: V2.7, comfyUI version to 19484c54c2, I get this error:
Traceback (most recent call last):
File "D:\AIGCTool\ComfyUI\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1893, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 940, in exec_module
File "", line 241, in call_with_frames_removed
File "D:\AIGCTool\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale_init
.py", line 24, in
from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
File "D:\AIGCTool\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\nodes.py", line 5, in
from usdu_patch import usdu
File "D:\AIGCTool\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\usdu_patch.py", line 2, in
from repositories import ultimate_upscale as usdu
File "D:\AIGCTool\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories_init_.py", line 14, in
spec.loader.exec_module(ultimate_upscale)
File "D:\AIGCTool\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories\ultimate_sd_upscale\scripts\ultimate-upscale.py", line 4, in
from modules import processing, shared, images, devices, scripts
ImportError: cannot import name 'images' from 'modules' (D:\AIGCTool\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node\modules_init_.py)

mask image

It seems that an error occurs with images that have transparency. Is there a way to counter this?

TypeError while generating images with batch > 1

Hello :)

Tried to generate more than 1 picture at same time (batch = 2 or 4) with "Ultimate SD Upscale (No upscale)" getting error TypeError: Cannot handle this data type: (1, 1, 1112, 3), |u1

detailed log
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/PIL/Image.py", line 3089, in fromarray
    mode, rawmode = _fromarray_typemap[typekey]
                    ~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: ((1, 1, 1112, 3), '|u1')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/tmp/ComfyUI/execution.py", line 141, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/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 "/tmp/ComfyUI/execution.py", line 68, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/nodes.py", line 156, in upscale
    tensor_to_pil(upscaled_image), model, positive, negative, vae,
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/utils.py", line 14, in tensor_to_pil
    img = Image.fromarray(np.clip(i, 0, 255).astype(np.uint8).squeeze())
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/PIL/Image.py", line 3092, in fromarray
    raise TypeError(msg) from e
TypeError: Cannot handle this data type: (1, 1, 1112, 3), |u1

Keep getting this error- FileNotFoundError: [Errno 2] No such file or directory:

Traceback (most recent call last):
File "D:\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1735, 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 "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale_init
.py", line 24, in
from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\nodes.py", line 5, in
from usdu_patch import usdu
File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\usdu_patch.py", line 2, in
from repositories import ultimate_upscale as usdu
File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories_init_.py", line 14, in
spec.loader.exec_module(ultimate_upscale)
File "", line 879, in exec_module
File "", line 1016, in get_code
File "", line 1073, in get_data
FileNotFoundError: [Errno 2] No such file or directory: 'D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories\ultimate_sd_upscale\scripts\ultimate-upscale.py'

Cannot import D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale module for custom nodes: [Errno 2] No such file or directory: 'D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale\repositories\ultimate_sd_upscale\scripts\ultimate-upscale.py'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.