Gal4way / TPD

This is the official repository for the paper "Texture-Preserving Diffusion Models for High-Fidelity Virtual Try-On". CVPR 2024
116 stars 21 forks source link

ldm/util.py", line 85, in instantiate_from_config return get_obj_from_str(config["target"])(**config.get("params", dict())) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: LatentDiffusion.__init__() missing 1 required positional argument: 'cond_stage_config' #5

Closed shahzaib-s-warraich closed 4 months ago

shahzaib-s-warraich commented 6 months ago

Hi, any idea how I might be able to fix this while inferring using ldm's util?

Gal4way commented 6 months ago

The information you've provided is a bit confusing and hard to understand. Could you provide more detailed error messages and the commands you used? This will help us assist you in resolving the issue.

shahzaib-s-warraich commented 6 months ago

I'm trying to run inference, bash commands/inference.sh, I have the checkpoints, dataset, and stable diffusion repository requirements in place.

Baicheng42 commented 4 months ago

hi, I got the same error, and I fixed it.

  1. I use the easiest way to fix it by replacing the line 18 sys.path[0] = "/home/yx/code/virtual_tryon/TPD" in inference.py with my own path.

  2. then I add the code under it: if '/home/xxxxx/stable-diffusion' in sys.path: sys.path.remove('/home/xxxxx/stable-diffusion')

Then it works for me.

the reason of the ERROR may be due to the conflict between 'stable-diffusion/ldm/util.py' and 'tpd/ldm/util.py' if you installed the package of 'stable-diffusion'.