Geek7 commited on
Commit
2c9a940
·
verified ·
1 Parent(s): cf7adf0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -45,7 +45,7 @@ def generate_image(prompt, negative_prompt=None, height=512, width=512, model="s
45
  return None
46
 
47
  # Function to refine an image using the refiner model
48
- def refine_image(image, prompt, negative_prompt=None, model="refiners/sd15.juggernaut.reborn.unet", num_inference_steps=15, guidance_scale=7.5):
49
  try:
50
  # Use Hugging Face's image-to-image API to refine the image
51
  refined_image = client.image_to_image(
@@ -73,7 +73,7 @@ def generate_api():
73
  num_inference_steps = data.get('num_inference_steps', 50) # Default number of inference steps
74
  guidance_scale = data.get('guidance_scale', 7.5) # Default guidance scale
75
  model_name = data.get('model', 'stabilityai/sd-3.5') # Base model
76
- refiner_model_name = 'refiners/sd15.juggernaut.reborn.unet' # Refiner model
77
  seed = data.get('seed', None) # Seed for reproducibility, default is None
78
 
79
  if not prompt:
 
45
  return None
46
 
47
  # Function to refine an image using the refiner model
48
+ def refine_image(image, prompt, negative_prompt=None, model="stabilityai/stable-diffusion-xl-refiner-1.0", num_inference_steps=50, guidance_scale=7.5):
49
  try:
50
  # Use Hugging Face's image-to-image API to refine the image
51
  refined_image = client.image_to_image(
 
73
  num_inference_steps = data.get('num_inference_steps', 50) # Default number of inference steps
74
  guidance_scale = data.get('guidance_scale', 7.5) # Default guidance scale
75
  model_name = data.get('model', 'stabilityai/sd-3.5') # Base model
76
+ refiner_model_name = 'stabilityai/sd-xl-refiner-1.0' # Refiner model
77
  seed = data.get('seed', None) # Seed for reproducibility, default is None
78
 
79
  if not prompt: