K00B404 commited on
Commit
e0f4409
·
verified ·
1 Parent(s): 48568da

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -51,7 +51,7 @@ if not os.path.exists(CHARACTERS_FOLDER):
51
  os.makedirs(CHARACTERS_FOLDER)
52
 
53
 
54
- def generate_flux_image(final_prompt, is_negative, steps, cfg_scale, seed, strength):
55
  """
56
  Generate an image using the FLUX.1-Schnell-Serverless-enhanced model via Gradio client.
57
  Returns the image path, seed used, and prompt.
@@ -67,11 +67,11 @@ def generate_flux_image(final_prompt, is_negative, steps, cfg_scale, seed, stren
67
  is_negative=is_negative,
68
  steps=steps,
69
  cfg_scale=cfg_scale,
70
- sampler="Heun", # Default to Heun sampler
71
  seed=seed,
72
  strength=strength,
73
- width=512, # Default width
74
- height=512, # Default height
75
  api_name="/query"
76
  )
77
 
@@ -85,6 +85,7 @@ def generate_flux_image(final_prompt, is_negative, steps, cfg_scale, seed, stren
85
  print(f"Error in image generation: {str(e)}")
86
  raise gr.Error(f"Image generation failed: {str(e)}")
87
 
 
88
 
89
 
90
  def get_character_images():
 
51
  os.makedirs(CHARACTERS_FOLDER)
52
 
53
 
54
+ def generate_flux_image(final_prompt, is_negative, steps, cfg_scale, seed, strength, width, height, sampler):
55
  """
56
  Generate an image using the FLUX.1-Schnell-Serverless-enhanced model via Gradio client.
57
  Returns the image path, seed used, and prompt.
 
67
  is_negative=is_negative,
68
  steps=steps,
69
  cfg_scale=cfg_scale,
70
+ sampler=sampler,
71
  seed=seed,
72
  strength=strength,
73
+ width=width,
74
+ height=height,
75
  api_name="/query"
76
  )
77
 
 
85
  print(f"Error in image generation: {str(e)}")
86
  raise gr.Error(f"Image generation failed: {str(e)}")
87
 
88
+
89
 
90
 
91
  def get_character_images():