Retrieval-based-Voice-Conversion-WebUI
Retrieval-based-Voice-Conversion-WebUI copied to clipboard
Fix format #526
Fix format #526
I just removed the unnecessary (), so it should not affect the operation.
These codes you are editting the parentheses are written by me, I think it will cause problems. In my environment, if the paranthesis is removed, then "-pg" and "-pd" will be passed, with no path passed, will cause error. The ideas of these paranthesis are that when there is no pretrained model, "-pg" and "-pd" should also not be passed.
Thanks for your contribution and for the replies! I will test it again just in case.
I make a minium function test
path_str = "path_str"
f0_str = "f0_str"
sr2 = "sr2"
def test():
return (
"pretrained%s/%sG%s.pth" % (path_str, f0_str, sr2) if if_pretrained_generator_exist else "",
"pretrained%s/%sD%s.pth" % (path_str, f0_str, sr2) if if_pretrained_discriminator_exist else "",
{"visible": True, "__type__": "update"}
)
a, b, c = test()
print(a, b)
and it return
pretrainedpath_str/f0_strGsr2.pth pretrainedpath_str/f0_strDsr2.pth
Maybe, but I think it will work.
Thank you for your patience, I actually means for this line,
"-pg %s" % pretrained_G14 if pretrained_G14 != "" else "",
HOWEVER, I tested it and its totally OK. Maybe it is because I encountered another problem and I thought it is because of the paranthesis and just make another change. Meanwhile, "the another change" fix the error, so I thought I need this paranthesis.
So the edit is totally working and may incur no error! Thanks for your patience again.
Thank you very much! It's not annoying at all, in fact, I'm rather delighted!
@Tps-F According to JunityZhzna, this pr seems unnecessary?
@RVC-Boss Yes, There is no change in behavior due to this PR. However, this is the more appropriate way to write Python.
@RVC-Boss Yes, There is no change in behavior due to this PR. However, this is the more appropriate way to write Python.
I will merge it, but "This branch has conflicts that must be resolved", can you help resolving it?
@RVC-Boss I resolved it Thank you for responding!