Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] faceenhance RuntimeError: start (12) + length (1) exceeds dimension size (12). #195

Open
drmbt opened this issue Aug 30, 2024 · 1 comment
Assignees
Labels
status: 🧹 needs triage This issue needs to triage, applied to new issues type: 🐛 bug Something isn't working

Comments

@drmbt
Copy link

drmbt commented Aug 30, 2024

Describe the bug

ace restore breaks on default workflow. Using stability matrix

Reproduction

I finally got the first part of the face-swap workflow working after installing your wheels, and following this advice: AUTOMATIC1111/stable-diffusion-webui#13985 (comment)

just trying to run faceswap example workflow

Expected behavior

it runs faceenhance.py successfully

Operating System

Windows (Default)

Comfy Mode

Other (online services, containers etc..)

Console output

occurred when executing Restore Face (mtb):

start (12) + length (1) exceeds dimension size (12).

File "D:\AI\StabilityMatrix-win-x64\Data\Packages\ComfyUI-clean\execution.py", line 317, in execute
output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
File "D:\AI\StabilityMatrix-win-x64\Data\Packages\ComfyUI-clean\execution.py", line 192, in get_output_data
return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
File "D:\AI\StabilityMatrix-win-x64\Data\Packages\ComfyUI-clean\execution.py", line 169, in _map_node_over_list
process_inputs(input_dict, i)
File "D:\AI\StabilityMatrix-win-x64\Data\Packages\ComfyUI-clean\execution.py", line 158, in process_inputs
results.append(getattr(obj, func)(**inputs))
File "D:\AI\StabilityMatrix-win-x64\Data\Packages\ComfyUI-clean\custom_nodes\comfy_mtb\nodes\faceenhance.py", line 247, in restore
out = [
File "D:\AI\StabilityMatrix-win-x64\Data\Packages\ComfyUI-clean\custom_nodes\comfy_mtb\nodes\faceenhance.py", line 248, in
self.do_restore(
File "D:\AI\StabilityMatrix-win-x64\Data\Packages\ComfyUI-clean\custom_nodes\comfy_mtb\nodes\faceenhance.py", line 208, in do_restore
cropped_faces, restored_faces, restored_img = model.enhance(
File "D:\AI\StabilityMatrix-win-x64\Data\Packages\ComfyUI-clean\venv\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "D:\AI/StabilityMatrix-win-x64/Data/Packages/ComfyUI-clean/custom_nodes/comfy_mtb/extern/GFPGAN\gfpgan\utils.py", line 139, in enhance
bg_img = self.bg_upsampler.enhance(img, outscale=self.upscale)[0]
File "D:\AI\StabilityMatrix-win-x64\Data\Packages\ComfyUI-clean\custom_nodes\comfy_mtb\nodes\faceenhance.py", line 139, in enhance
s = comfy.utils.tiled_scale(
File "D:\AI\StabilityMatrix-win-x64\Data\Packages\ComfyUI-clean\comfy\utils.py", line 761, in tiled_scale
return tiled_scale_multidim(samples, function, (tile_y, tile_x), overlap, upscale_amount, out_channels, output_device, pbar)
File "D:\AI\StabilityMatrix-win-x64\Data\Packages\ComfyUI-clean\venv\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "D:\AI\StabilityMatrix-win-x64\Data\Packages\ComfyUI-clean\comfy\utils.py", line 740, in tiled_scale_multidim
m = mask.narrow(d, t, 1)

Additional context

No response

@drmbt drmbt added status: 🧹 needs triage This issue needs to triage, applied to new issues type: 🐛 bug Something isn't working labels Aug 30, 2024
@melMass
Copy link
Owner

melMass commented Sep 4, 2024

I'm going to look into it, can you share your workflow?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: 🧹 needs triage This issue needs to triage, applied to new issues type: 🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants