Update app.py
Browse files
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="stabilityai/stable-diffusion-xl-refiner-1.0", num_inference_steps=
|
49 |
try:
|
50 |
# Use Hugging Face's image-to-image API to refine the image
|
51 |
refined_image = client.image_to_image(
|
|
|
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=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(
|