Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -106,6 +106,7 @@ def resize_image(input_path, output_path, target_height):
|
|
| 106 |
|
| 107 |
return output_path
|
| 108 |
|
|
|
|
| 109 |
def infer(use_custom_model, model_name, weight_name, custom_lora_weight, image_in, prompt, negative_prompt, preprocessor, controlnet_conditioning_scale, guidance_scale, inf_steps, seed, progress=gr.Progress(track_tqdm=True)):
|
| 110 |
|
| 111 |
pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
|
|
@@ -250,7 +251,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 250 |
|
| 251 |
""")
|
| 252 |
|
| 253 |
-
use_custom_model = gr.Checkbox(label="Use a
|
| 254 |
|
| 255 |
with gr.Box(visible=False) as custom_model_box:
|
| 256 |
with gr.Row():
|
|
|
|
| 106 |
|
| 107 |
return output_path
|
| 108 |
|
| 109 |
+
@spaces.GPU
|
| 110 |
def infer(use_custom_model, model_name, weight_name, custom_lora_weight, image_in, prompt, negative_prompt, preprocessor, controlnet_conditioning_scale, guidance_scale, inf_steps, seed, progress=gr.Progress(track_tqdm=True)):
|
| 111 |
|
| 112 |
pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
|
|
|
|
| 251 |
|
| 252 |
""")
|
| 253 |
|
| 254 |
+
use_custom_model = gr.Checkbox(label="Use a custom pre-trained LoRa model ? (optional)", value=False, info="To use a private model, you'll need to duplicate the space with your own access token.")
|
| 255 |
|
| 256 |
with gr.Box(visible=False) as custom_model_box:
|
| 257 |
with gr.Row():
|