vilarin commited on
Commit
e2531dc
1 Parent(s): 7f71885

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -32,17 +32,18 @@ JS = """function () {
32
  if torch.cuda.is_available():
33
  pipe = FluxPipeline.from_pretrained(model, torch_dtype=torch.bfloat16)
34
  pipe.load_lora_weights(hf_hub_download("ByteDance/Hyper-SD", "Hyper-FLUX.1-dev-8steps-lora.safetensors"))
35
- pipe.fuse_lora(lora_scale=0.125)
 
36
  pipe.to(device="cuda", dtype=torch.bfloat16)
37
 
38
  # Function
39
  @spaces.GPU(duration=120)
40
  def generate_image(
41
  prompt,
42
- width=1024,
43
  height=1024,
44
  scales=5,
45
- steps=8,
46
  seed: int =-1,
47
  nums=1,
48
  progress=gr.Progress(track_tqdm=True)):
@@ -91,7 +92,7 @@ examples = [
91
 
92
  with gr.Blocks(css=CSS, js=JS, theme="soft") as demo:
93
  gr.HTML("<h1><center>Flux Labs</center></h1>")
94
- gr.HTML("<p><center>Model Now: Hyper-FLUX-8steps-LoRA<br>🙇‍♂️Frequent model changes</center></p>")
95
  with gr.Row():
96
  with gr.Column(scale=4):
97
  img = gr.Gallery(label='flux Generated Image', columns = 1, preview=True, height=600)
@@ -105,7 +106,7 @@ with gr.Blocks(css=CSS, js=JS, theme="soft") as demo:
105
  minimum=512,
106
  maximum=1280,
107
  step=8,
108
- value=1024,
109
  )
110
  height = gr.Slider(
111
  label="Height",
@@ -126,7 +127,7 @@ with gr.Blocks(css=CSS, js=JS, theme="soft") as demo:
126
  minimum=1,
127
  maximum=100,
128
  step=1,
129
- value=8,
130
  )
131
  seed = gr.Slider(
132
  label="Seeds",
 
32
  if torch.cuda.is_available():
33
  pipe = FluxPipeline.from_pretrained(model, torch_dtype=torch.bfloat16)
34
  pipe.load_lora_weights(hf_hub_download("ByteDance/Hyper-SD", "Hyper-FLUX.1-dev-8steps-lora.safetensors"))
35
+ pipe.load_lora_weights("Shakker-Labs/FLUX.1-dev-LoRA-blended-realistic-illustration", weight_name="FLUX-dev-lora-blended_realistic_illustration.safetensors")
36
+ pipe.fuse_lora(lora_scale=1.0)
37
  pipe.to(device="cuda", dtype=torch.bfloat16)
38
 
39
  # Function
40
  @spaces.GPU(duration=120)
41
  def generate_image(
42
  prompt,
43
+ width=768,
44
  height=1024,
45
  scales=5,
46
+ steps=24,
47
  seed: int =-1,
48
  nums=1,
49
  progress=gr.Progress(track_tqdm=True)):
 
92
 
93
  with gr.Blocks(css=CSS, js=JS, theme="soft") as demo:
94
  gr.HTML("<h1><center>Flux Labs</center></h1>")
95
+ gr.HTML("<p><center>Model Now: Shakker-Labs/FLUX.1-dev-LoRA-blended-realistic-illustration<br>🙇‍♂️Frequent model changes</center></p>")
96
  with gr.Row():
97
  with gr.Column(scale=4):
98
  img = gr.Gallery(label='flux Generated Image', columns = 1, preview=True, height=600)
 
106
  minimum=512,
107
  maximum=1280,
108
  step=8,
109
+ value=768,
110
  )
111
  height = gr.Slider(
112
  label="Height",
 
127
  minimum=1,
128
  maximum=100,
129
  step=1,
130
+ value=24,
131
  )
132
  seed = gr.Slider(
133
  label="Seeds",