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

Latest code causes app.py to quit without error #22

Open
SoftologyPro opened this issue Nov 7, 2024 · 7 comments
Open

Latest code causes app.py to quit without error #22

SoftologyPro opened this issue Nov 7, 2024 · 7 comments

Comments

@SoftologyPro
Copy link

SoftologyPro commented Nov 7, 2024

Since the last code update, app.py starts, shows

Loading example img list ...
Loading example txt list ...

then quits without error.
Adding more debug prints shows it is this line

from infer import seed_everything, save_gif

Specifically the seed_everything import.

Debugging that further shows it is the random.seed(seed) line in utils.py that kills the script.

def seed_everything(seed):
    '''
        seed everthing
    '''
    random.seed(seed)
@SoftologyPro
Copy link
Author

SoftologyPro commented Nov 9, 2024

The latest updates seems to have fixed the above error (or it may still be there, but this new error happens earlier).

Running python app.py exits back to command prompt without any hints or errors.

Adding some debug code shows it is now
from .text_to_image import Text2Image
inside infer\_init_.py
that causes the script to fail without error and return to the command line.

Tracing that further shows it is
from diffusers import HunyuanDiTPipeline, AutoPipelineForText2Image
in infer\text_to_image.py
that causes the script to fail. Specifically the import of HunyuanDiTPipeline

Even trying the latest dev release of diffusers, ie
pip install git+https://github.com/huggingface/diffusers
does not help.

Any ideas to fix this?

@realisticdreamer114514
Copy link

realisticdreamer114514 commented Nov 9, 2024

Can you tell me how to change the code for it to debug and print errors? I'm trying to solve another bug at ./infer/views_to_mesh.py on my own instead of waiting for busy devs to read my issue #20 Thx in advance!

@SoftologyPro
Copy link
Author

SoftologyPro commented Nov 9, 2024

Can you tell me how to change the code for it to debug and print errors? I'm trying to solve another bug at ./infer/views_to_mesh.py on my own instead of waiting for busy devs to read my issue #20 Thx in advance!

Just go through and add new lines print('debug 0') etc so you know what the script gets to.
For printing variable values print(f'var_name = {var_name})

@SoftologyPro
Copy link
Author

SoftologyPro commented Nov 9, 2024

For those with my above error(s) you can roll back to the working commit with

git clone https://github.com/Tencent/Hunyuan3D-1
cd Hunyuan3D-1
git checkout 8d2fd6a971478c488f2e5a12a82f44da88c7093e
git clean -df

Hoping the devs can get the latest scripts working again.

@realisticdreamer114514
Copy link

Just go through and add new lines print('debug 0') etc so you know what the script gets to.

OK, after doing this I can pinpoint the part of the code that likely caused it to quit:

        seed_everything(seed)
        self.mv23d_predictor.predict(
            image_list, 
            save_dir = save_dir, 
            image_input = image_input,
            target_face_count = target_face_count,
            do_texture_mapping = do_texture_mapping
        )
        torch.cuda.empty_cache()
        return save_dir

Seems like my bug is related to your 1st bug (this part starting with seed_everything(seed) ).

@SoftologyPro
Copy link
Author

OK, well hoprfully the dev(s) can fix these issues.
In the meantime commit 8d2fd6a does not have these bugs if you need it now.

@realisticdreamer114514
Copy link

realisticdreamer114514 commented Nov 10, 2024

I can't get that commit's views_to_mesh.py running, and I'm not sure now if what I said about that is a false positive because another snippet of code from the most updated repo might be bad too:

views_to_mesh_model(
        views,  cond,  0,
        target_face_count = args.max_faces_num,
        save_folder = args.save_folder,
        do_texture_mapping = args.do_texture_mapping
    )

And running it sometimes might lead to 0xC0000005: Access violation reading location 0x0000000000000000 for python.exe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants