multimodalart HF Staff commited on
Commit
c1e7d42
·
verified ·
1 Parent(s): 8566172

klein-4b correct

Browse files
Files changed (1) hide show
  1. app.py +4 -13
app.py CHANGED
@@ -1,15 +1,6 @@
1
  import os
2
  import subprocess
3
  import sys
4
-
5
- subprocess.run([sys.executable, "-m", "pip", "uninstall", "-y", "diffusers"], check=False)
6
- subprocess.check_call(["unzip", "-o", "diffusers.zip", "-d", "diffusers_local"])
7
- subprocess.check_call([sys.executable, "-m", "pip", "install", "--no-cache-dir", "./diffusers_local"])
8
-
9
- subprocess.check_call(["pwd"])
10
- subprocess.check_call(["ls", "-la"])
11
-
12
-
13
  import io
14
  import gradio as gr
15
  import numpy as np
@@ -72,19 +63,19 @@ pipe_distilled.to("cuda")
72
  # Dictionary for easy access
73
  pipes = {
74
  "Distilled (4 steps)": pipe_distilled,
75
- "Regular (30 steps)": pipe_regular,
76
  }
77
 
78
  # Default steps for each mode
79
  DEFAULT_STEPS = {
80
  "Distilled (4 steps)": 4,
81
- "Regular (30 steps)": 30,
82
  }
83
 
84
  # Default CFG for each mode
85
  DEFAULT_CFG = {
86
  "Distilled (4 steps)": 1.0,
87
- "Regular (30 steps)": 4.0,
88
  }
89
 
90
  def image_to_data_uri(img):
@@ -267,7 +258,7 @@ FLUX.2 [Klein] is a... [[model](https://huggingface.co/black-forest-labs/FLUX.2-
267
 
268
  mode_choice = gr.Radio(
269
  label="Mode",
270
- choices=["Distilled (4 steps)", "Regular (30 steps)"],
271
  value="Distilled (4 steps)",
272
  )
273
 
 
1
  import os
2
  import subprocess
3
  import sys
 
 
 
 
 
 
 
 
 
4
  import io
5
  import gradio as gr
6
  import numpy as np
 
63
  # Dictionary for easy access
64
  pipes = {
65
  "Distilled (4 steps)": pipe_distilled,
66
+ "Base (50 steps)": pipe_regular,
67
  }
68
 
69
  # Default steps for each mode
70
  DEFAULT_STEPS = {
71
  "Distilled (4 steps)": 4,
72
+ "Base (50 steps)": 50,
73
  }
74
 
75
  # Default CFG for each mode
76
  DEFAULT_CFG = {
77
  "Distilled (4 steps)": 1.0,
78
+ "Base (50 steps)": 4.0,
79
  }
80
 
81
  def image_to_data_uri(img):
 
258
 
259
  mode_choice = gr.Radio(
260
  label="Mode",
261
+ choices=["Distilled (4 steps)", "Base (50 steps)"],
262
  value="Distilled (4 steps)",
263
  )
264