Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -37,19 +37,18 @@ pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
|
|
| 37 |
# Load lora (giving it a name makes it active when using the name in the prompt)
|
| 38 |
pipe.load_lora_weights("ostris/ikea-instructions-lora-sdxl", weight_name="ikea_instructions_xl_v1_5.safetensors", adapter_name="ikea")
|
| 39 |
pipe.load_lora_weights("nerijs/pixel-art-xl", weight_name="pixel-art-xl.safetensors", adapter_name="pixel")
|
| 40 |
-
pipe.disable_lora()
|
| 41 |
|
| 42 |
def activate_ikea_lora():
|
|
|
|
| 43 |
pipe.set_adapters("ikea")
|
| 44 |
-
pipe.to(device)
|
| 45 |
|
| 46 |
def activate_pixel_lora():
|
|
|
|
| 47 |
pipe.set_adapters("pixel")
|
| 48 |
-
pipe.to(device)
|
| 49 |
|
| 50 |
def disable_loras():
|
|
|
|
| 51 |
pipe.disable_lora()
|
| 52 |
-
pipe.to(device)
|
| 53 |
|
| 54 |
pipe.to(device)
|
| 55 |
|
|
|
|
| 37 |
# Load lora (giving it a name makes it active when using the name in the prompt)
|
| 38 |
pipe.load_lora_weights("ostris/ikea-instructions-lora-sdxl", weight_name="ikea_instructions_xl_v1_5.safetensors", adapter_name="ikea")
|
| 39 |
pipe.load_lora_weights("nerijs/pixel-art-xl", weight_name="pixel-art-xl.safetensors", adapter_name="pixel")
|
|
|
|
| 40 |
|
| 41 |
def activate_ikea_lora():
|
| 42 |
+
print("Activating IKEA LoRa")
|
| 43 |
pipe.set_adapters("ikea")
|
|
|
|
| 44 |
|
| 45 |
def activate_pixel_lora():
|
| 46 |
+
print("Activating pixel art LoRa")
|
| 47 |
pipe.set_adapters("pixel")
|
|
|
|
| 48 |
|
| 49 |
def disable_loras():
|
| 50 |
+
print("Deactivating LoRas")
|
| 51 |
pipe.disable_lora()
|
|
|
|
| 52 |
|
| 53 |
pipe.to(device)
|
| 54 |
|