Wendy-Fly commited on
Commit
fed0475
·
verified ·
1 Parent(s): b23d644

Upload mgie.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. mgie.py +1 -1
mgie.py CHANGED
@@ -117,5 +117,5 @@ for i in tqdm(range(2)):
117
  out = remove_alter(tokenizer.decode(out))
118
  emb = model.edit_head(hid.unsqueeze(dim=0), EMB)
119
  res = pipe(image=Image.open('_input/%d.jpg'%(i)).convert('RGB'), prompt_embeds=emb, negative_prompt_embeds=NULL, generator=T.Generator(device='cuda').manual_seed(SEED)).images[0]
120
- save_img_path = os.path.join(save_image, f{i}.png)
121
  Image.save(save_img_path)
 
117
  out = remove_alter(tokenizer.decode(out))
118
  emb = model.edit_head(hid.unsqueeze(dim=0), EMB)
119
  res = pipe(image=Image.open('_input/%d.jpg'%(i)).convert('RGB'), prompt_embeds=emb, negative_prompt_embeds=NULL, generator=T.Generator(device='cuda').manual_seed(SEED)).images[0]
120
+ save_img_path = os.path.join(save_image, f"{i}.png")
121
  Image.save(save_img_path)