weathon commited on
Commit
32006ad
·
1 Parent(s): b2b37a2

every=1, height=100

Browse files
app.py CHANGED
@@ -43,7 +43,7 @@ import json
43
  from datetime import datetime
44
  from pathlib import Path
45
  from uuid import uuid4
46
- IMAGE_DATASET_DIR = Path(f"{uuid4()}")
47
  IMAGE_DATASET_DIR.mkdir(parents=True, exist_ok=True)
48
  IMAGE_JSONL_PATH = IMAGE_DATASET_DIR / "metadata.jsonl"
49
 
@@ -52,6 +52,7 @@ scheduler = CommitScheduler(
52
  repo_type="dataset",
53
  folder_path=IMAGE_DATASET_DIR,
54
  path_in_repo=IMAGE_DATASET_DIR.name,
 
55
  )
56
 
57
  def save_image(prompt: str, negative_prompt: str, img_vsf: Image, img_nag: Image, parameters: dict) -> None:
@@ -169,18 +170,18 @@ with gr.Blocks(title="Value Sign Flip SD3.5 Demo") as demo:
169
 
170
  # gr.Markdown("# Value Sign Flip Wan 2.1 Demo \n\n This demo is based on Wan 2.1 T2V model and uses Value Sign Flip technique to generate videos with different guidance scales and biases. More on [GitHub](https://github.com/weathon/VSF/blob/main/wan.md)\n\nPositive prompt should be at least 2 sentence long or the results will be weird.")
171
 
172
- with gr.Row():
173
  pos = gr.Textbox(label="Positive Prompt", value="A polished bicycle frame leans against a weathered brick wall under soft morning light.")
174
  neg = gr.Textbox(label="Negative Prompt", value="wheels")
175
 
176
  # rephase = gr.Button("Rephrase Prompt")
177
- with gr.Row():
178
- sample = gr.Button("Load A Sample Prompt")
179
- sample.click(fn=load_sample, inputs=[], outputs=[pos, neg])
180
- anti_aesthetic_sample = gr.Button("Load An Anti-Aesthetic Sample Prompt")
181
- anti_aesthetic_sample.click(fn=load_anti_aesthetics_sample, inputs=[], outputs=[pos, neg])
182
- abstract_sample = gr.Button("Load An Abstract Prompt")
183
- abstract_sample.click(fn=load_abstract_prompt, inputs=[], outputs=[pos, neg])
184
  with gr.Row():
185
  gr.Markdown("## VSF Generation Parameters")
186
  guidance = gr.Slider(0, 5, step=0.1, label="Guidance Scale", value=3.0)
 
43
  from datetime import datetime
44
  from pathlib import Path
45
  from uuid import uuid4
46
+ IMAGE_DATASET_DIR = "/data"
47
  IMAGE_DATASET_DIR.mkdir(parents=True, exist_ok=True)
48
  IMAGE_JSONL_PATH = IMAGE_DATASET_DIR / "metadata.jsonl"
49
 
 
52
  repo_type="dataset",
53
  folder_path=IMAGE_DATASET_DIR,
54
  path_in_repo=IMAGE_DATASET_DIR.name,
55
+ every=1
56
  )
57
 
58
  def save_image(prompt: str, negative_prompt: str, img_vsf: Image, img_nag: Image, parameters: dict) -> None:
 
170
 
171
  # gr.Markdown("# Value Sign Flip Wan 2.1 Demo \n\n This demo is based on Wan 2.1 T2V model and uses Value Sign Flip technique to generate videos with different guidance scales and biases. More on [GitHub](https://github.com/weathon/VSF/blob/main/wan.md)\n\nPositive prompt should be at least 2 sentence long or the results will be weird.")
172
 
173
+ with gr.Row(height=100):
174
  pos = gr.Textbox(label="Positive Prompt", value="A polished bicycle frame leans against a weathered brick wall under soft morning light.")
175
  neg = gr.Textbox(label="Negative Prompt", value="wheels")
176
 
177
  # rephase = gr.Button("Rephrase Prompt")
178
+ with gr.Row():
179
+ sample = gr.Button("Load A Sample Prompt")
180
+ sample.click(fn=load_sample, inputs=[], outputs=[pos, neg])
181
+ anti_aesthetic_sample = gr.Button("Load An Anti-Aesthetic Sample Prompt")
182
+ anti_aesthetic_sample.click(fn=load_anti_aesthetics_sample, inputs=[], outputs=[pos, neg])
183
+ abstract_sample = gr.Button("Load An Abstract Prompt")
184
+ abstract_sample.click(fn=load_abstract_prompt, inputs=[], outputs=[pos, neg])
185
  with gr.Row():
186
  gr.Markdown("## VSF Generation Parameters")
187
  guidance = gr.Slider(0, 5, step=0.1, label="Guidance Scale", value=3.0)
src/__pycache__/__init__.cpython-310.pyc CHANGED
Binary files a/src/__pycache__/__init__.cpython-310.pyc and b/src/__pycache__/__init__.cpython-310.pyc differ
 
src/__pycache__/processor.cpython-310.pyc CHANGED
Binary files a/src/__pycache__/processor.cpython-310.pyc and b/src/__pycache__/processor.cpython-310.pyc differ
 
src/__pycache__/sd3_pipeline.cpython-310.pyc CHANGED
Binary files a/src/__pycache__/sd3_pipeline.cpython-310.pyc and b/src/__pycache__/sd3_pipeline.cpython-310.pyc differ
 
vsfwan/__pycache__/__init__.cpython-310.pyc CHANGED
Binary files a/vsfwan/__pycache__/__init__.cpython-310.pyc and b/vsfwan/__pycache__/__init__.cpython-310.pyc differ
 
vsfwan/__pycache__/pipeline.cpython-310.pyc CHANGED
Binary files a/vsfwan/__pycache__/pipeline.cpython-310.pyc and b/vsfwan/__pycache__/pipeline.cpython-310.pyc differ
 
vsfwan/__pycache__/processor.cpython-310.pyc CHANGED
Binary files a/vsfwan/__pycache__/processor.cpython-310.pyc and b/vsfwan/__pycache__/processor.cpython-310.pyc differ