yyk19 commited on
Commit
bd89e06
1 Parent(s): 79538bb
Files changed (2) hide show
  1. app.py +2 -2
  2. scripts/rendertext_tool.py +1 -2
app.py CHANGED
@@ -68,9 +68,9 @@ def process_multi_wrapper_only_show_rendered(rendered_txt_0, rendered_txt_1, ren
68
 
69
 
70
  cfg = OmegaConf.load("config.yaml")
71
- model = load_model_from_config(cfg, "model_wo_ema.ckpt", verbose=True)
72
  # model = load_model_from_config(cfg, "model_states.pt", verbose=True)
73
- # model = load_model_from_config(cfg, "model.ckpt", verbose=True)
74
 
75
  ddim_sampler = DDIMSampler(model)
76
  render_tool = Render_Text(model)
 
68
 
69
 
70
  cfg = OmegaConf.load("config.yaml")
71
+ # model = load_model_from_config(cfg, "model_wo_ema.ckpt", verbose=True)
72
  # model = load_model_from_config(cfg, "model_states.pt", verbose=True)
73
+ model = load_model_from_config(cfg, "model.ckpt", verbose=True)
74
 
75
  ddim_sampler = DDIMSampler(model)
76
  render_tool = Render_Text(model)
scripts/rendertext_tool.py CHANGED
@@ -72,7 +72,6 @@ class Render_Text:
72
  self.precision_scope("cuda"), \
73
  self.model.ema_scope("Sampling on Benchmark Prompts"):
74
  print("rendered txt:", str(rendered_txt_values), "[t]")
75
- print("prompt for the SD branch:", str(shared_prompt), "[t]")
76
  if rendered_txt_values == "":
77
  control = None
78
  else:
@@ -115,7 +114,7 @@ class Render_Text:
115
  seed_everything(shared_seed)
116
 
117
  print("control is None: {}".format(control is None))
118
-
119
  cond_c_cross = self.model.get_learned_conditioning([shared_prompt + ', ' + shared_a_prompt] * shared_num_samples)
120
  un_cond_cross = self.model.get_learned_conditioning([shared_n_prompt] * shared_num_samples)
121
 
 
72
  self.precision_scope("cuda"), \
73
  self.model.ema_scope("Sampling on Benchmark Prompts"):
74
  print("rendered txt:", str(rendered_txt_values), "[t]")
 
75
  if rendered_txt_values == "":
76
  control = None
77
  else:
 
114
  seed_everything(shared_seed)
115
 
116
  print("control is None: {}".format(control is None))
117
+ print("prompt for the SD branch:", str(shared_prompt), "[t]")
118
  cond_c_cross = self.model.get_learned_conditioning([shared_prompt + ', ' + shared_a_prompt] * shared_num_samples)
119
  un_cond_cross = self.model.get_learned_conditioning([shared_n_prompt] * shared_num_samples)
120