Upload mgie.py with huggingface_hub
Browse files
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)
|