Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -60,7 +60,7 @@ def generate_image(
|
|
60 |
apply_refiner: bool = False,
|
61 |
):
|
62 |
client = Client("hysts/SDXL")
|
63 |
-
|
64 |
prompt="((Seamless texture)), versatile pattern, high resolution, detailed design, subtle patterns, non-repetitive, smooth edges, square, "+prompt,
|
65 |
negative_prompt=negative_prompt,
|
66 |
prompt_2=prompt_2,
|
@@ -78,13 +78,7 @@ def generate_image(
|
|
78 |
apply_refiner=apply_refiner,
|
79 |
api_name="/run",
|
80 |
)
|
81 |
-
|
82 |
-
try:
|
83 |
-
image_bytes = base64.b64decode(result)
|
84 |
-
except binascii.Error:
|
85 |
-
raise ValueError("Error decoding the Base64 string. Please check the input.")
|
86 |
-
image = Image.open(BytesIO(image_bytes)) # Ensure the result is converted to a PIL Image
|
87 |
-
normal_map = generate_normal_map(image)
|
88 |
return image, normal_map
|
89 |
|
90 |
examples = [
|
|
|
60 |
apply_refiner: bool = False,
|
61 |
):
|
62 |
client = Client("hysts/SDXL")
|
63 |
+
image = client.predict(
|
64 |
prompt="((Seamless texture)), versatile pattern, high resolution, detailed design, subtle patterns, non-repetitive, smooth edges, square, "+prompt,
|
65 |
negative_prompt=negative_prompt,
|
66 |
prompt_2=prompt_2,
|
|
|
78 |
apply_refiner=apply_refiner,
|
79 |
api_name="/run",
|
80 |
)
|
81 |
+
normal_map = generate_normal_map(Image.open(image))
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
return image, normal_map
|
83 |
|
84 |
examples = [
|