Dagfinn1962 commited on
Commit
4bc77d9
·
verified ·
1 Parent(s): 2f73345

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -10
app.py CHANGED
@@ -20,7 +20,8 @@ MAX_IMAGE_SIZE = 2048
20
 
21
  pipe.flux_pipe_call_that_returns_an_iterable_of_images = flux_pipe_call_that_returns_an_iterable_of_images.__get__(pipe)
22
 
23
- @spaces.GPU(duration=75)
 
24
  def infer(prompt, seed=42, randomize_seed=False, width=1024, height=1024, guidance_scale=3.5, num_inference_steps=28, progress=gr.Progress(track_tqdm=True)):
25
  if randomize_seed:
26
  seed = random.randint(0, MAX_SEED)
@@ -39,25 +40,24 @@ def infer(prompt, seed=42, randomize_seed=False, width=1024, height=1024, guidan
39
  yield img, seed
40
 
41
  examples = [
42
- "a tiny astronaut hatching from an egg on the moon",
43
- "a cat holding a sign that says hello world",
44
- "an anime illustration of a wiener schnitzel",
45
  ]
46
 
47
  css="""
48
  #col-container {
49
  margin: 0 auto;
50
- max-width: 520px;
 
51
  }
52
  """
53
 
54
- with gr.Blocks(css=css) as demo:
55
 
56
  with gr.Column(elem_id="col-container"):
57
- gr.Markdown(f"""# FLUX.1 [dev]
58
- 12B param rectified flow transformer guidance-distilled from [FLUX.1 [pro]](https://blackforestlabs.ai/)
59
- [[non-commercial license](https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md)] [[blog](https://blackforestlabs.ai/announcing-black-forest-labs/)] [[model](https://huggingface.co/black-forest-labs/FLUX.1-dev)]
60
- """)
61
 
62
  with gr.Row():
63
 
@@ -65,6 +65,7 @@ with gr.Blocks(css=css) as demo:
65
  label="Prompt",
66
  show_label=False,
67
  max_lines=1,
 
68
  placeholder="Enter your prompt",
69
  container=False,
70
  )
 
20
 
21
  pipe.flux_pipe_call_that_returns_an_iterable_of_images = flux_pipe_call_that_returns_an_iterable_of_images.__get__(pipe)
22
 
23
+ #@spaces.GPU(duration=75)
24
+ @spaces.GPU(enable_queue=True)
25
  def infer(prompt, seed=42, randomize_seed=False, width=1024, height=1024, guidance_scale=3.5, num_inference_steps=28, progress=gr.Progress(track_tqdm=True)):
26
  if randomize_seed:
27
  seed = random.randint(0, MAX_SEED)
 
40
  yield img, seed
41
 
42
  examples = [
43
+ "Super-Realistic potrait of Ariana Grande standing at photoshoot location, worn a detailed texture chic casual outfit, Cinematic lighting, accent lighting, 35mm lens, beautiful",
44
+ "full body pose candid photo of 20 years old english schoolgirl , petite body, perky , wearing only a sexy string and bra, light straight blond hair standing in bathroom, morning atmosphere, (Realistic fingers:0.5). vibrent colored room , The entire room is well-lit, with no shadows obscuring her features. The background is blured. masterpiece 4 K",
45
+ "A woman with long brunette hair is seated on a large tree branch in a park. She's dressed in a simple white, spaghetti strap crop top with a plunging neckline. Her legs are bent up revealing her smooth skin under her flowing white skirt. Her expression is relaxed, with a slight smile playing on her lips. The background of the image reveals a serene setting with trees and greenery. The lighting in the scene is natural, suggesting an overcast day with soft, diffused light casting gentle shadows around the woman.",
46
  ]
47
 
48
  css="""
49
  #col-container {
50
  margin: 0 auto;
51
+ min-width: 520px;
52
+ max-width: 1200px;
53
  }
54
  """
55
 
56
+ with gr.Blocks(css=css, theme="Yntec/HaleyCH_Theme_Orange") as demo:
57
 
58
  with gr.Column(elem_id="col-container"):
59
+ gr.Markdown(f"""# Black-forest-labs/FLUX.1-schnell <br>
60
+ Our Easy App using the latest Flux models""")
 
 
61
 
62
  with gr.Row():
63
 
 
65
  label="Prompt",
66
  show_label=False,
67
  max_lines=1,
68
+ max_lines=10,
69
  placeholder="Enter your prompt",
70
  container=False,
71
  )