Sana
Sana copied to clipboard
TypeError: DCAE_HF.__init__() missing 1 required positional argument: 'model_name'
When using the code in readme for inference without pre-downloading the models' weight, it seems that there will be such error.
I add one argument value in diffusion/model/builder.py to fix this.
To be specific, in line 88:
# ========== Mark this row ==========
# dc_ae = DCAE_HF.from_pretrained(model_path).to(device).eval()
# ========== Replace it with ==========
dc_ae = DCAE_HF.from_pretrained(model_path, model_name=model_path.split("/")[-1]).to(device).eval()
This seems to be an error required for correction.