Update app.py
Browse files
app.py
CHANGED
|
@@ -326,7 +326,7 @@ def create_intervene_part(pipe: HookedStableDiffusionXLPipeline, saes_dict, mean
|
|
| 326 |
return images.images[0]
|
| 327 |
|
| 328 |
@spaces.GPU
|
| 329 |
-
def image_mod(prompt, block_str, brush_index, strength, num_steps, input_image,
|
| 330 |
block = block_str.split(" ")[0]
|
| 331 |
|
| 332 |
mask = (input_image["layers"][0] > 0)[:, :, -1].astype(float)
|
|
@@ -496,7 +496,7 @@ def create_intervene_part(pipe: HookedStableDiffusionXLPipeline, saes_dict, mean
|
|
| 496 |
num_steps.change(update_index_maxes, [num_steps], [start_index, end_index])
|
| 497 |
|
| 498 |
button.click(image_mod,
|
| 499 |
-
inputs=[prompt_field, block_select, brush_index, strength, num_steps, i_image,
|
| 500 |
outputs=o_image)
|
| 501 |
# button_icon.click(feature_icon, inputs=[block_select, brush_index], outputs=o_image)
|
| 502 |
demo.load(image_gen, [prompt_field, num_steps], outputs=[image_state])
|
|
|
|
| 326 |
return images.images[0]
|
| 327 |
|
| 328 |
@spaces.GPU
|
| 329 |
+
def image_mod(prompt, block_str, brush_index, strength, num_steps, input_image, block_start, block_end, start_index=None, end_index=None, guidance_scale=None):
|
| 330 |
block = block_str.split(" ")[0]
|
| 331 |
|
| 332 |
mask = (input_image["layers"][0] > 0)[:, :, -1].astype(float)
|
|
|
|
| 496 |
num_steps.change(update_index_maxes, [num_steps], [start_index, end_index])
|
| 497 |
|
| 498 |
button.click(image_mod,
|
| 499 |
+
inputs=[prompt_field, block_select, brush_index, strength, num_steps, i_image, block_start, block_finish, start_index, end_index],
|
| 500 |
outputs=o_image)
|
| 501 |
# button_icon.click(feature_icon, inputs=[block_select, brush_index], outputs=o_image)
|
| 502 |
demo.load(image_gen, [prompt_field, num_steps], outputs=[image_state])
|