Skip to content

Commit f7cfa7a

Browse files
fixed a bug
1 parent 3be2660 commit f7cfa7a

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
**/*.pyc
1+
**/*.pyc

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ This repository will contain the official implementation of _ICEdit_.
3535
# To Do List
3636

3737
- [x] Inference Code
38-
- [ ] Inference Scaling with VLM
38+
- [ ] Inference-time Scaling with VLM
3939
- [x] Pretrained Weights
4040
- [ ] More Inference Demos
4141
- [ ] IC-Edit GUI
@@ -64,12 +64,14 @@ If you can connect to Huggingface, you don't need to download the weights. Other
6464
- [Flux.1-fill-dev](https://huggingface.co/black-forest-labs/flux.1-fill-dev).
6565
- [ICEdit-MoE-LoRA](https://huggingface.co/sanaka87/ICEdit-MoE-LoRA).
6666

67-
## Inference in bash (w/o VLM Inference Scaling)
67+
## Inference in bash (w/o VLM Inference-time Scaling)
6868

6969
Now you can have a try!
7070

7171
> Our model can **only edit images with a width of 512 pixels** (there is no restriction on the height). If you pass in an image with a width other than 512 pixels, the model will automatically resize it to 512 pixels.
7272
73+
> If you found the model failed to generate the expected results, please try to change the `--seed` parameter. Inference-time Scaling with VLM can help much to improve the results.
74+
7375
```bash
7476
python scripts/inference.py --image assets/girl.png \
7577
--instruction "Make her hair dark green and her clothes checked." \
@@ -95,7 +97,7 @@ python scripts/inference.py --image assets/girl.png \
9597

9698
### 🎨 Enjoy your editing!
9799

98-
## Inference in bash (w/ VLM Inference Scaling)
100+
## Inference in bash (w/ VLM Inference-time Scaling)
99101

100102
TODO.
101103

scripts/inference.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@
3939

4040
if image.size[0] != 512:
4141
print("\033[93m[WARNING] We can only deal with the case where the image's width is 512.\033[0m")
42-
print("\033[93m[WARNING] Resizing the image to width 512...\033[0m")
4342
new_width = 512
4443
scale = new_width / image.size[0]
4544
new_height = int(image.size[1] * scale)
4645
new_height = (new_height // 8) * 8
47-
image = image.resize((new_width, new_height), Image.ANTIALIAS)
46+
image = image.resize((new_width, new_height))
47+
print(f"\033[93m[WARNING] Resizing the image to {new_width} x {new_height}\033[0m")
4848

4949
instruction = args.instruction
5050

0 commit comments

Comments
 (0)