While attempting to increase solubility of PbI2 or/and PbBr2 in either dimethylformamide (DMF) or dimethyl sulfoxide (DMSO), it may possibly be found somewhat helpful to previously dry the solvents, as they are hygroscopic; see:
Every solution has its maximum solubility limit ans so when solving the salt in the solvent you have to not to exceed this saturation limit. The other issue you have to take the important remark of Carlos into consideration. You have to avoid the moisture as it can as it can affect adversely the solubility. So, for more information please follow the discussion on a similar issue on the readearchgate: https://www.researchgate.net/post/How_can_I_increase_the_solubility_of_PbI2_in_DMF