OzzyGT HF Staff commited on
Commit
db98262
·
1 Parent(s): 423284e

simpler names

Browse files
Files changed (1) hide show
  1. app.py +5 -8
app.py CHANGED
@@ -72,9 +72,9 @@ DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
72
  BRUSH_COLOR = "#ff00ff"
73
 
74
  MODE_LABELS = {
75
- "Vision only (no LoRA)": "off",
76
- "Append refs (Ostris edit LoRA)": "append",
77
- "Prepend source (Identity-Edit LoRA)": "prepend",
78
  }
79
 
80
  MASK_MODE_LABELS = {
@@ -253,9 +253,6 @@ def generate(
253
  randomize_seed,
254
  progress=gr.Progress(),
255
  ):
256
- if not (prompt or "").strip():
257
- raise gr.Error("Enter a prompt.")
258
-
259
  progress(0.0, desc="Loading model")
260
  pipe = get_pipe(model_choice)
261
  # `pipe.blocks` hands back a deepcopy; the pipeline runs `_blocks`, so the shim has to go there.
@@ -274,7 +271,7 @@ def generate(
274
  generator = torch.Generator("cpu").manual_seed(int(seed))
275
 
276
  kwargs = {
277
- "prompt": prompt,
278
  "height": int(height),
279
  "width": int(width),
280
  "num_inference_steps": int(steps),
@@ -314,7 +311,7 @@ with gr.Blocks(title="Krea 2 — reference conditioning") as demo:
314
  with gr.Row():
315
  mode = gr.Dropdown(
316
  choices=list(MODE_LABELS),
317
- value="Vision only (no LoRA)",
318
  label="Reference mode",
319
  )
320
  mask_mode = gr.Dropdown(
 
72
  BRUSH_COLOR = "#ff00ff"
73
 
74
  MODE_LABELS = {
75
+ "Vision only": "off",
76
+ "Style reference": "append",
77
+ "Identity edit": "prepend",
78
  }
79
 
80
  MASK_MODE_LABELS = {
 
253
  randomize_seed,
254
  progress=gr.Progress(),
255
  ):
 
 
 
256
  progress(0.0, desc="Loading model")
257
  pipe = get_pipe(model_choice)
258
  # `pipe.blocks` hands back a deepcopy; the pipeline runs `_blocks`, so the shim has to go there.
 
271
  generator = torch.Generator("cpu").manual_seed(int(seed))
272
 
273
  kwargs = {
274
+ "prompt": prompt or "",
275
  "height": int(height),
276
  "width": int(width),
277
  "num_inference_steps": int(steps),
 
311
  with gr.Row():
312
  mode = gr.Dropdown(
313
  choices=list(MODE_LABELS),
314
+ value="Vision only",
315
  label="Reference mode",
316
  )
317
  mask_mode = gr.Dropdown(