Spaces:
Runtime error
Runtime error
Remove width and height params
Browse files
app.py
CHANGED
@@ -15,8 +15,6 @@ SUPPORTED_MODELS = [
|
|
15 |
]
|
16 |
DEFAULT_MODEL = "stabilityai/stable-diffusion-xl-refiner-1.0"
|
17 |
|
18 |
-
MAX_IMAGE_SIZE = 1024
|
19 |
-
|
20 |
|
21 |
model = os.environ.get("MODEL_ID", DEFAULT_MODEL)
|
22 |
gpu_duration = int(os.environ.get("GPU_DURATION", 60))
|
@@ -44,8 +42,6 @@ def infer(
|
|
44 |
prompt: str,
|
45 |
init_image: Image.Image,
|
46 |
negative_prompt: str,
|
47 |
-
width: int,
|
48 |
-
height: int,
|
49 |
strength: float,
|
50 |
num_inference_steps: int,
|
51 |
guidance_scale: float,
|
@@ -74,8 +70,6 @@ def infer(
|
|
74 |
prompt=prompt,
|
75 |
image=init_image,
|
76 |
negative_prompt=negative_prompt,
|
77 |
-
width=width,
|
78 |
-
height=height,
|
79 |
**additional_args,
|
80 |
).images
|
81 |
return images[0]
|
@@ -117,23 +111,6 @@ with gr.Blocks(css=css) as demo:
|
|
117 |
placeholder="Enter a negative prompt",
|
118 |
)
|
119 |
|
120 |
-
with gr.Row():
|
121 |
-
width = gr.Slider(
|
122 |
-
label="Width",
|
123 |
-
minimum=256,
|
124 |
-
maximum=MAX_IMAGE_SIZE,
|
125 |
-
step=32,
|
126 |
-
value=1024,
|
127 |
-
)
|
128 |
-
|
129 |
-
height = gr.Slider(
|
130 |
-
label="Height",
|
131 |
-
minimum=256,
|
132 |
-
maximum=MAX_IMAGE_SIZE,
|
133 |
-
step=32,
|
134 |
-
value=1024,
|
135 |
-
)
|
136 |
-
|
137 |
with gr.Row():
|
138 |
strength = gr.Slider(
|
139 |
label="Strength",
|
@@ -165,8 +142,6 @@ with gr.Blocks(css=css) as demo:
|
|
165 |
prompt,
|
166 |
init_image,
|
167 |
negative_prompt,
|
168 |
-
width,
|
169 |
-
height,
|
170 |
strength,
|
171 |
num_inference_steps,
|
172 |
guidance_scale,
|
|
|
15 |
]
|
16 |
DEFAULT_MODEL = "stabilityai/stable-diffusion-xl-refiner-1.0"
|
17 |
|
|
|
|
|
18 |
|
19 |
model = os.environ.get("MODEL_ID", DEFAULT_MODEL)
|
20 |
gpu_duration = int(os.environ.get("GPU_DURATION", 60))
|
|
|
42 |
prompt: str,
|
43 |
init_image: Image.Image,
|
44 |
negative_prompt: str,
|
|
|
|
|
45 |
strength: float,
|
46 |
num_inference_steps: int,
|
47 |
guidance_scale: float,
|
|
|
70 |
prompt=prompt,
|
71 |
image=init_image,
|
72 |
negative_prompt=negative_prompt,
|
|
|
|
|
73 |
**additional_args,
|
74 |
).images
|
75 |
return images[0]
|
|
|
111 |
placeholder="Enter a negative prompt",
|
112 |
)
|
113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
with gr.Row():
|
115 |
strength = gr.Slider(
|
116 |
label="Strength",
|
|
|
142 |
prompt,
|
143 |
init_image,
|
144 |
negative_prompt,
|
|
|
|
|
145 |
strength,
|
146 |
num_inference_steps,
|
147 |
guidance_scale,
|