You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@DanielHuZM I met the same problem, and solved it. That was because of pyhocon version problem.
If you still have that problem, check your pyhocon version -> ( 0.3.57).
Hello @hongfz16 , Thanks for your work. It seems wrong when launch the code.
AppearanceDescription = "Iron Man" #@param {type:"string"}
torch.set_default_tensor_type('torch.cuda.FloatTensor')
FORMAT = "[%(filename)s:%(lineno)s - %(funcName)20s() ] %(message)s"
logging.basicConfig(level=logging.INFO, format=FORMAT)
conf_path = 'confs/examples_small/example.conf'
f = open(conf_path)
conf_text = f.read()
f.close()
conf_text = conf_text.replace('{TOREPLACE}', AppearanceDescription)
print(conf_text)
conf = ConfigFactory.parse_string(conf_text)
print("Prompt: {}".format(conf.get_string('clip.prompt')))
print("Face Prompt: {}".format(conf.get_string('clip.face_prompt')))
print("Back Prompt: {}".format(conf.get_string('clip.back_prompt')))
Shows:
ParseException Traceback (most recent call last)
ParseException: Expected '}', found '=' (at char 1312), (line:67, col:14)
During handling of the above exception, another exception occurred:
ParseSyntaxException Traceback (most recent call last)
in <cell line: 12>()
10 conf_text = conf_text.replace('{TOREPLACE}', AppearanceDescription)
11 # print(conf_text)
---> 12 conf = ConfigFactory.parse_string(conf_text)
13 print("Prompt: {}".format(conf.get_string('clip.prompt')))
14 print("Face Prompt: {}".format(conf.get_string('clip.face_prompt')))
2 frames
/usr/local/lib/python3.10/dist-packages/pyparsing/core.py in parse_string(self, instring, parse_all, parseAll)
1139 else:
1140 # catch and re-raise exception from here, clearing out pyparsing internal stack trace
-> 1141 raise exc.with_traceback(None)
1142 else:
1143 return tokens
ParseSyntaxException: Expected '}', found '=' (at char 1312), (line:67, col:14)
The text was updated successfully, but these errors were encountered: