Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -50,6 +50,7 @@ style_lora_base_path = "Shakker-Labs"
|
|
| 50 |
processor = ImageProcessor(base_path)
|
| 51 |
|
| 52 |
# Define the Gradio interface
|
|
|
|
| 53 |
def single_condition_generate_image(prompt, subject_img, spatial_img, height, width, seed, control_type, style_lora=None):
|
| 54 |
# Set the control type
|
| 55 |
if control_type == "subject":
|
|
@@ -84,6 +85,7 @@ def single_condition_generate_image(prompt, subject_img, spatial_img, height, wi
|
|
| 84 |
return image
|
| 85 |
|
| 86 |
# Define the Gradio interface
|
|
|
|
| 87 |
def multi_condition_generate_image(prompt, subject_img, spatial_img, height, width, seed):
|
| 88 |
subject_path = os.path.join(lora_base_path, "subject.safetensors")
|
| 89 |
inpainting_path = os.path.join(lora_base_path, "inpainting.safetensors")
|
|
|
|
| 50 |
processor = ImageProcessor(base_path)
|
| 51 |
|
| 52 |
# Define the Gradio interface
|
| 53 |
+
@spaces.GPU()
|
| 54 |
def single_condition_generate_image(prompt, subject_img, spatial_img, height, width, seed, control_type, style_lora=None):
|
| 55 |
# Set the control type
|
| 56 |
if control_type == "subject":
|
|
|
|
| 85 |
return image
|
| 86 |
|
| 87 |
# Define the Gradio interface
|
| 88 |
+
@spaces.GPU()
|
| 89 |
def multi_condition_generate_image(prompt, subject_img, spatial_img, height, width, seed):
|
| 90 |
subject_path = os.path.join(lora_base_path, "subject.safetensors")
|
| 91 |
inpainting_path = os.path.join(lora_base_path, "inpainting.safetensors")
|