Skip to content

Problems when running with gfx1201 (AMD Radeon RX 9070) card #304

@bestbug456

Description

@bestbug456

Hello,

I was able to install locally the Hunyuan3D-2 model, sadly when running on gfx1201 (AMD Radeon RX 9070) cards the result are as shown in photo when the render is able to running, but way often I see errors as follow:

/Hunyuan3D-2/hy3dgen/shapegen/models/autoencoders/volume_decoders.py:81: UserWarning: Using a non-tuple sequence for multidimensional indexing is deprecated and will be changed in pytorch 2.9; use x[tuple(seq)] instead of x[seq]. In pytorch 2.9 this will be interpreted as tensor index, x[torch.tensor(seq)], which will result either in an error or a different result (Triggered internally at /pytorch/torch/csrc/autograd/python_variable_indexing.cpp:309.)
  sliced = padded[slice_dims]
Traceback (most recent call last):
  File "/Hunyuan3D-2/env310/lib/python3.10/site-packages/gradio/queueing.py", line 626, in process_events
    response = await route_utils.call_process_api(
  File "/Hunyuan3D-2/env310/lib/python3.10/site-packages/gradio/route_utils.py", line 350, in call_process_api
    output = await app.get_blocks().process_api(
  File "/Hunyuan3D-2/env310/lib/python3.10/site-packages/gradio/blocks.py", line 2235, in process_api
    result = await self.call_function(
  File "/Hunyuan3D-2/env310/lib/python3.10/site-packages/gradio/blocks.py", line 1746, in call_function
    prediction = await anyio.to_thread.run_sync(  # type: ignore
  File "/Hunyuan3D-2/env310/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "/Hunyuan3D-2/env310/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2470, in run_sync_in_worker_thread
    return await future
  File "/Hunyuan3D-2/env310/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 967, in run
    result = context.run(func, *args)
  File "/Hunyuan3D-2/env310/lib/python3.10/site-packages/gradio/utils.py", line 917, in wrapper
    response = f(*args, **kwargs)
  File "/Hunyuan3D-2/gradio_app.py", line 323, in shape_generation
    mesh, image, save_folder, stats, seed = _gen_shape(
  File "/Hunyuan3D-2/gradio_app.py", line 218, in _gen_shape
    outputs = i23d_worker(
  File "/Hunyuan3D-2/env310/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 120, in decorate_context
    return func(*args, **kwargs)
  File "/Hunyuan3D-2/hy3dgen/shapegen/pipelines.py", line 765, in __call__
    return self._export(
  File "/Hunyuan3D-2/hy3dgen/shapegen/pipelines.py", line 662, in _export
    outputs = self.vae.latents2mesh(
  File "/Hunyuan3D-2/hy3dgen/shapegen/models/autoencoders/model.py", line 173, in latents2mesh
    grid_logits = self.volume_decoder(latents, self.geo_decoder, **kwargs)
  File "/Hunyuan3D-2/env310/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 120, in decorate_context
    return func(*args, **kwargs)
  File "/Hunyuan3D-2/hy3dgen/shapegen/models/autoencoders/volume_decoders.py", line 399, in __call__
    min_val = next_points.min(axis=0).values
IndexError: min(): Expected reduction dim 0 to have non-zero size.

or

/Hunyuan3D-2/hy3dgen/shapegen/models/autoencoders/volume_decoders.py:81: UserWarning: Using a non-tuple sequence for multidimensional indexing is deprecated and will be changed in pytorch 2.9; use x[tuple(seq)] instead of x[seq]. In pytorch 2.9 this will be interpreted as tensor index, x[torch.tensor(seq)], which will result either in an error or a different result (Triggered internally at /pytorch/torch/csrc/autograd/python_variable_indexing.cpp:309.)
  sliced = padded[slice_dims]
Traceback (most recent call last):
  File "/Hunyuan3D-2/hy3dgen/shapegen/models/autoencoders/surface_extractors.py", line 54, in __call__
    vertices, faces = self.run(grid_logits[i], **kwargs)
  File "/Hunyuan3D-2/hy3dgen/shapegen/models/autoencoders/surface_extractors.py", line 69, in run
    vertices, faces, normals, _ = measure.marching_cubes(
  File "/Hunyuan3D-2/env310/lib/python3.10/site-packages/skimage/measure/_marching_cubes_lewiner.py", line 139, in marching_cubes
    return _marching_cubes_lewiner(
  File "/Hunyuan3D-2/env310/lib/python3.10/site-packages/skimage/measure/_marching_cubes_lewiner.py", line 206, in _marching_cubes_lewiner
    raise RuntimeError('No surface found at the given iso value.')
RuntimeError: No surface found at the given iso value.
2025-07-17 18:10:03,430 - hy3dgen.shapgen - INFO - ---Shape generation takes 1.8881449699401855 seconds ---
Traceback (most recent call last):
  File "/Hunyuan3D-2/env310/lib/python3.10/site-packages/gradio/queueing.py", line 626, in process_events
    response = await route_utils.call_process_api(
  File "/Hunyuan3D-2/env310/lib/python3.10/site-packages/gradio/route_utils.py", line 350, in call_process_api
    output = await app.get_blocks().process_api(
  File "/Hunyuan3D-2/env310/lib/python3.10/site-packages/gradio/blocks.py", line 2235, in process_api
    result = await self.call_function(
  File "/Hunyuan3D-2/env310/lib/python3.10/site-packages/gradio/blocks.py", line 1746, in call_function
    prediction = await anyio.to_thread.run_sync(  # type: ignore
  File "/Hunyuan3D-2/env310/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "/Hunyuan3D-2/env310/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2470, in run_sync_in_worker_thread
    return await future
  File "/Hunyuan3D-2/env310/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 967, in run
    result = context.run(func, *args)
  File "/Hunyuan3D-2/env310/lib/python3.10/site-packages/gradio/utils.py", line 917, in wrapper
    response = f(*args, **kwargs)
  File "/Hunyuan3D-2/gradio_app.py", line 258, in generation_all
    mesh, image, save_folder, stats, seed = _gen_shape(
  File "/Hunyuan3D-2/gradio_app.py", line 234, in _gen_shape
    stats['number_of_faces'] = mesh.faces.shape[0]
AttributeError: 'NoneType' object has no attribute 'faces'

while the rendering are like

Image

I'm kinda clueless on what is going on here, what I can do, beside doing some specific tests, is to report that I've used python 3.10 and 3.13 with the same results. The rocm installed is a 6.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions