CustomNet icon indicating copy to clipboard operation
CustomNet copied to clipboard

KeyError: 'text_only'

Open rootpine opened this issue 1 year ago • 3 comments

Thanks for your great work! I tried to train CustomNet on the sample dataset and got a KeyError of 'text_only'. How can I solve this issue?

https://github.com/TencentARC/CustomNet/blob/23a378fc8cfcec72181cc4fd625c708f9485e490/ldm/models/diffusion/ddpm.py#L756

image

rootpine avatar Aug 10 '24 10:08 rootpine

Also, when I try to train customnet_inpaint, I cannot find “bg_concat”. https://github.com/TencentARC/CustomNet/blob/23a378fc8cfcec72181cc4fd625c708f9485e490/ldm/models/diffusion/ddpm.py#L772

rootpine avatar Aug 19 '24 10:08 rootpine

I'm facing this issue too. Have you solved this?

Is it used to indicate whether there is only text and no background picture with 1 and 0 ?

uishd666 avatar Feb 12 '25 16:02 uishd666

I try to replace it with text_only = (torch.rand(x.size(0), device=x.device) < uncond).float().unsqueeze(-1) I dont know whether this is appropriate, but this works.

uishd666 avatar Feb 13 '25 05:02 uishd666