LLDDWW commited on
Commit
88cbfb6
·
1 Parent(s): 5e231af

fix: change image model to SDXL (FLUX access restricted)

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -17,7 +17,7 @@ from transformers import (
17
  )
18
 
19
  VL_MODEL_ID = "Qwen/Qwen2.5-VL-7B-Instruct"
20
- IMAGE_MODEL_ID = "black-forest-labs/FLUX.1-schnell"
21
 
22
 
23
  def _load_font():
@@ -322,11 +322,10 @@ def generate_cartoon_image(prompt: str) -> Image.Image:
322
 
323
  image = IMAGE_PIPELINE(
324
  prompt=enhanced_prompt,
325
- num_inference_steps=4,
326
- guidance_scale=0.0,
327
  height=768,
328
  width=1024,
329
- max_sequence_length=256,
330
  ).images[0]
331
  return image
332
  except Exception as e:
 
17
  )
18
 
19
  VL_MODEL_ID = "Qwen/Qwen2.5-VL-7B-Instruct"
20
+ IMAGE_MODEL_ID = "stabilityai/stable-diffusion-xl-base-1.0"
21
 
22
 
23
  def _load_font():
 
322
 
323
  image = IMAGE_PIPELINE(
324
  prompt=enhanced_prompt,
325
+ num_inference_steps=30,
326
+ guidance_scale=7.5,
327
  height=768,
328
  width=1024,
 
329
  ).images[0]
330
  return image
331
  except Exception as e: