Alexander Bagus commited on
Commit
4746b3b
Β·
1 Parent(s): eafe6ec
Files changed (2) hide show
  1. app.py +8 -7
  2. static/footer.md +3 -2
app.py CHANGED
@@ -61,8 +61,9 @@ print("transformer ready.")
61
  vae = AutoencoderKL.from_pretrained(
62
  MODEL_LOCAL,
63
  subfolder="vae",
64
- device_map="cuda"
65
- ).to(DTYPE)
 
66
  print("vae ready.")
67
 
68
  tokenizer = AutoTokenizer.from_pretrained(
@@ -76,11 +77,11 @@ text_encoder = Qwen3ForCausalLM.from_pretrained(
76
  subfolder="text_encoder",
77
  torch_dtype=DTYPE,
78
  )
79
- # scheduler = FlowMatchEulerDiscreteScheduler(num_train_timesteps=1000, shift=3)
80
- scheduler = FlowMatchEulerDiscreteScheduler.from_pretrained(
81
- MODEL_LOCAL,
82
- subfolder="scheduler"
83
- )
84
  print("scheduler ready.")
85
 
86
  pipe = ZImageControlPipeline(
 
61
  vae = AutoencoderKL.from_pretrained(
62
  MODEL_LOCAL,
63
  subfolder="vae",
64
+ device_map="cuda",
65
+ torch_dtype=DTYPE,
66
+ )
67
  print("vae ready.")
68
 
69
  tokenizer = AutoTokenizer.from_pretrained(
 
77
  subfolder="text_encoder",
78
  torch_dtype=DTYPE,
79
  )
80
+ scheduler = FlowMatchEulerDiscreteScheduler(num_train_timesteps=1000, shift=7)
81
+ # scheduler = FlowMatchEulerDiscreteScheduler.from_pretrained(
82
+ # MODEL_LOCAL,
83
+ # subfolder="scheduler"
84
+ # )
85
  print("scheduler ready.")
86
 
87
  pipe = ZImageControlPipeline(
static/footer.md CHANGED
@@ -1,6 +1,6 @@
1
 
2
  ## What does this app do?
3
- This AI image editor allows you to transform your pictures by simply applying a mask and providing a text prompt. You can select specific areas of your image with the mask and then describe the desired changes using natural language. The app will then intelligently edit the selected area of your image based on your instructions.
4
 
5
  ## Usage
6
  - **Edit Image (required)**: Upload the image you want to edit, then mark the area you want to change.
@@ -9,7 +9,8 @@ This AI image editor allows you to transform your pictures by simply applying a
9
 
10
  ### Tips
11
  - If the result isn't great, try marking a bigger area or lowering the *context scale*.
12
- - Maximum image size is 1280(width/height), anything bigger will be downscaled to avoid OOM,
 
13
 
14
  **And if you're happy with the result, please support me by pressing the like button πŸ˜„**
15
 
 
1
 
2
  ## What does this app do?
3
+ This AI image editor lets you transform your pictures by just using a mask and a text prompt. You can select specific areas of your image with the mask and then describe the changes you want using natural language. The app will then smartly edit the selected area of your image based on your instructions.
4
 
5
  ## Usage
6
  - **Edit Image (required)**: Upload the image you want to edit, then mark the area you want to change.
 
9
 
10
  ### Tips
11
  - If the result isn't great, try marking a bigger area or lowering the *context scale*.
12
+ - Maximum image size is 1280(width/height), anything bigger will be downscaled to avoid OOM.
13
+ - You can check the mask image output by clicking at *Preprocessor data*.
14
 
15
  **And if you're happy with the result, please support me by pressing the like button πŸ˜„**
16