Skip to content

[Issue] depthmap - numpy 1.24.3 (part 2) #224

Closed
@brunogcar

Description

@brunogcar

after #219 and fix #220, most of functionality works

except for Generate 3D inpainted mesh, that still have issues with deprecated numpy alias

Generating inpainted mesh .. (go make some coffee) ..
  0%|                                                                                            | 0/1 [00:23<?, ?it/s]
All done.mesh:   0%|                                                                             | 0/7 [00:00<?, ?it/s]
11:00:02-280863 ERROR    Exception: module 'numpy' has no attribute 'int'.
                         `np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code,
                         use `int` by itself. Doing this will not modify any behavior and is safe. When replacing
                         `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you
                         wish to review your current use, check the release note link for additional information.
                         The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the
                         original release note at:
                             https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
11:00:02-282865 ERROR    Arguments: args=(0, <PIL.Image.Image image mode=RGB size=640x960 at 0x22FA69432E0>, None, '',
                         '', 0, 0, 512, 512, False, True, False, False, 0, 1, False, 1, True, True, True, False,
                         ['left-right', 'red-cyan-anaglyph'], 2.5, 'polylines_sharp', 0, True, False, False, False,
                         False, 'u2net', False, 0, 2, False, None, True, False, True, False) kwargs={}
11:00:02-284867 ERROR    gradio call: AttributeError
╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮
│ E:\GitHub\TTI\automatic\modules\call_queue.py:33 in f                                                                │
│                                                                                                                      │
│    32 │   │   │   try:                                                                                               │
│ ❱  33 │   │   │   │   res = func(*args, **kwargs)                                                                    │
│    34 │   │   │   │   progress.record_results(id_task, res)                                                          │
│                                                                                                                      │
│ E:\GitHub\TTI\automatic\extensions\stable-diffusion-webui-depthmap-script\scripts\depthmap.py:1171 in run_generate   │
│                                                                                                                      │
│   1170 │                                                                                                             │
│ ❱ 1171 │   outputs, mesh_fi, meshsimple_fi = run_depthmap(                                                           │
│   1172 │   │   None, outpath, imageArr, imageNameArr,                                                                │
│                                                                                                                      │
│                                               ... 3 frames hidden ...                                                │
│                                                                                                                      │
│ E:\GitHub\TTI\automatic\extensions/stable-diffusion-webui-depthmap-script/scripts\inpaint\mesh.py:274 in             │
│ reassign_floating_island                                                                                             │
│                                                                                                                      │
│    273 │   mask[bord_up:bord_down, bord_left:bord_right] = 1                                                         │
│ ❱  274 │   label_lost_map = (label_lost_map * mask).astype(np.int)                                                   │
│    275                                                                                                               │
│                                                                                                                      │
│ E:\GitHub\TTI\automatic\venv\lib\site-packages\numpy\__init__.py:305 in __getattr__                                  │
│                                                                                                                      │
│   304 │   │   if attr in __former_attrs__:                                                                           │
│ ❱ 305 │   │   │   raise AttributeError(__former_attrs__[attr])                                                       │
│   306                                                                                                                │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
AttributeError: module 'numpy' has no attribute 'int'.
`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing
this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or
`np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional
information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
Traceback (most recent call last):
  File "E:\GitHub\TTI\automatic\venv\lib\site-packages\gradio\routes.py", line 414, in run_predict
    output = await app.get_blocks().process_api(
  File "E:\GitHub\TTI\automatic\venv\lib\site-packages\gradio\blocks.py", line 1326, in process_api
    data = self.postprocess_data(fn_index, result["prediction"], state)
  File "E:\GitHub\TTI\automatic\venv\lib\site-packages\gradio\blocks.py", line 1229, in postprocess_data
    self.validate_outputs(fn_index, predictions)  # type: ignore
  File "E:\GitHub\TTI\automatic\venv\lib\site-packages\gradio\blocks.py", line 1204, in validate_outputs
    raise ValueError(
ValueError: An event handler (f) didn't receive enough output values (needed: 5, received: 4).
Wanted outputs:
    [gallery, textbox, model3d, html, html]
Received outputs:
    [None, "", "", "<div class='error'>module &#x27;numpy&#x27; has no attribute &#x27;int&#x27;.
`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations</div><div class='performance'><p class='time'>Time taken: 4m 57.84s</p> | <p class='vram'>GPU active 7312 MB reserved 7362 MB | System peak 8423 MB total 12288 MB</p></div>"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions