Merge branch 'main' of hf.co:spaces/xilluill/KV-Edit into main
Browse files- .gitattributes +1 -1
- .gitignore +2 -0
- README.md +4 -3
- app.py +2 -2
- flux/__pycache__/__init__.cpython-310.pyc +0 -0
- flux/__pycache__/_version.cpython-310.pyc +0 -0
- flux/__pycache__/math.cpython-310.pyc +0 -0
- flux/__pycache__/model.cpython-310.pyc +0 -0
- flux/__pycache__/sampling.cpython-310.pyc +0 -0
- flux/__pycache__/util.cpython-310.pyc +0 -0
- flux/model.py +2 -2
- flux/modules/__pycache__/autoencoder.cpython-310.pyc +0 -0
- flux/modules/__pycache__/conditioner.cpython-310.pyc +0 -0
- flux/modules/__pycache__/layers.cpython-310.pyc +0 -0
- models/__pycache__/kv_edit.cpython-310.pyc +0 -0
.gitattributes
CHANGED
@@ -32,4 +32,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
32 |
*.xz filter=lfs diff=lfs merge=lfs -text
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
32 |
*.xz filter=lfs diff=lfs merge=lfs -text
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
.gitignore
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
__pycache__/
|
2 |
+
result/
|
README.md
CHANGED
@@ -1,13 +1,14 @@
|
|
1 |
---
|
2 |
-
title: KV
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
colorTo: pink
|
6 |
sdk: gradio
|
7 |
sdk_version: 5.16.2
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: apache-2.0
|
|
|
11 |
---
|
12 |
|
13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
+
title: KV-Edit
|
3 |
+
emoji: 🎨
|
4 |
+
colorFrom: blue
|
5 |
colorTo: pink
|
6 |
sdk: gradio
|
7 |
sdk_version: 5.16.2
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: apache-2.0
|
11 |
+
short_description: Precise Background Preservation in Editing
|
12 |
---
|
13 |
|
14 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
app.py
CHANGED
@@ -194,9 +194,9 @@ def create_demo(model_name: str):
|
|
194 |
|
195 |
with gr.Row():
|
196 |
with gr.Column():
|
197 |
-
source_prompt = gr.Textbox(label="Source Prompt", value='
|
198 |
inversion_num_steps = gr.Slider(1, 50, 28, step=1, label="Number of inversion steps")
|
199 |
-
target_prompt = gr.Textbox(label="Target Prompt", value='
|
200 |
denoise_num_steps = gr.Slider(1, 50, 28, step=1, label="Number of denoise steps")
|
201 |
brush_canvas = gr.ImageEditor(label="Brush Canvas",
|
202 |
sources=('upload'),
|
|
|
194 |
|
195 |
with gr.Row():
|
196 |
with gr.Column():
|
197 |
+
source_prompt = gr.Textbox(label="Source Prompt", value='' )
|
198 |
inversion_num_steps = gr.Slider(1, 50, 28, step=1, label="Number of inversion steps")
|
199 |
+
target_prompt = gr.Textbox(label="Target Prompt", value='' )
|
200 |
denoise_num_steps = gr.Slider(1, 50, 28, step=1, label="Number of denoise steps")
|
201 |
brush_canvas = gr.ImageEditor(label="Brush Canvas",
|
202 |
sources=('upload'),
|
flux/__pycache__/__init__.cpython-310.pyc
DELETED
Binary file (477 Bytes)
|
|
flux/__pycache__/_version.cpython-310.pyc
DELETED
Binary file (485 Bytes)
|
|
flux/__pycache__/math.cpython-310.pyc
DELETED
Binary file (2.23 kB)
|
|
flux/__pycache__/model.cpython-310.pyc
DELETED
Binary file (4.81 kB)
|
|
flux/__pycache__/sampling.cpython-310.pyc
DELETED
Binary file (6.72 kB)
|
|
flux/__pycache__/util.cpython-310.pyc
DELETED
Binary file (5.53 kB)
|
|
flux/model.py
CHANGED
@@ -4,8 +4,8 @@ import torch
|
|
4 |
from torch import Tensor, nn
|
5 |
|
6 |
from flux.modules.layers import (DoubleStreamBlock, EmbedND, LastLayer,
|
7 |
-
MLPEmbedder, SingleStreamBlock,
|
8 |
-
|
9 |
timestep_embedding)
|
10 |
|
11 |
|
|
|
4 |
from torch import Tensor, nn
|
5 |
|
6 |
from flux.modules.layers import (DoubleStreamBlock, EmbedND, LastLayer,
|
7 |
+
MLPEmbedder, SingleStreamBlock,
|
8 |
+
SingleStreamBlock_kv,DoubleStreamBlock_kv,
|
9 |
timestep_embedding)
|
10 |
|
11 |
|
flux/modules/__pycache__/autoencoder.cpython-310.pyc
DELETED
Binary file (9.03 kB)
|
|
flux/modules/__pycache__/conditioner.cpython-310.pyc
DELETED
Binary file (1.47 kB)
|
|
flux/modules/__pycache__/layers.cpython-310.pyc
DELETED
Binary file (15.9 kB)
|
|
models/__pycache__/kv_edit.cpython-310.pyc
DELETED
Binary file (6.89 kB)
|
|