Update app.py
Browse files
app.py
CHANGED
|
@@ -373,7 +373,7 @@ def create_intervene_part(pipe: HookedStableDiffusionXLPipeline, saes_dict, mean
|
|
| 373 |
seed=42,
|
| 374 |
num_inference_steps=int(num_steps),
|
| 375 |
edit_fn= lambda input, output: hook(None, input, output),
|
| 376 |
-
layers_for_edit_fn=[i for i in range(block_start, block_end)],
|
| 377 |
stream="image").images[0]
|
| 378 |
else:
|
| 379 |
|
|
@@ -465,8 +465,8 @@ def create_intervene_part(pipe: HookedStableDiffusionXLPipeline, saes_dict, mean
|
|
| 465 |
with gr.Row():
|
| 466 |
strength = gr.Number(value=10, label="Strength", minimum=-40, maximum=40, elem_id="strength", precision=2)
|
| 467 |
with gr.Row():
|
| 468 |
-
block_start = gr.Number(value=18, label="Block start", minimum=0, maximum=
|
| 469 |
-
block_finish = gr.Number(value=
|
| 470 |
with gr.Row():
|
| 471 |
button = gr.Button('Apply', elem_id="apply_button")
|
| 472 |
|
|
|
|
| 373 |
seed=42,
|
| 374 |
num_inference_steps=int(num_steps),
|
| 375 |
edit_fn= lambda input, output: hook(None, input, output),
|
| 376 |
+
layers_for_edit_fn=[i for i in range(block_start, block_end + 1)],
|
| 377 |
stream="image").images[0]
|
| 378 |
else:
|
| 379 |
|
|
|
|
| 465 |
with gr.Row():
|
| 466 |
strength = gr.Number(value=10, label="Strength", minimum=-40, maximum=40, elem_id="strength", precision=2)
|
| 467 |
with gr.Row():
|
| 468 |
+
block_start = gr.Number(value=18, label="Block start", minimum=0, maximum=56, elem_id="block_start")
|
| 469 |
+
block_finish = gr.Number(value=56, label="Block finish", minimum=0, maximum=56, elem_id="block_finish")
|
| 470 |
with gr.Row():
|
| 471 |
button = gr.Button('Apply', elem_id="apply_button")
|
| 472 |
|