Spaces:
Running
on
Zero
Running
on
Zero
Alexander Bagus
commited on
Commit
·
7d86fa0
1
Parent(s):
24e6f1d
22
Browse files
app.py
CHANGED
|
@@ -91,10 +91,12 @@ def generate_lora(
|
|
| 91 |
ulid = str(ULID()).lower()[:12]
|
| 92 |
print(f"ulid: {ulid}")
|
| 93 |
|
| 94 |
-
input_images = [Image.open(filepath).convert("RGB") for filepath, _ in input_images]
|
| 95 |
if not input_images:
|
| 96 |
print("images are empty.")
|
|
|
|
| 97 |
|
|
|
|
|
|
|
| 98 |
# Model inference
|
| 99 |
with torch.no_grad():
|
| 100 |
embs = QwenImageUnit_Image2LoRAEncode().process(pipe_lora, image2lora_images=input_images)
|
|
|
|
| 91 |
ulid = str(ULID()).lower()[:12]
|
| 92 |
print(f"ulid: {ulid}")
|
| 93 |
|
|
|
|
| 94 |
if not input_images:
|
| 95 |
print("images are empty.")
|
| 96 |
+
return False
|
| 97 |
|
| 98 |
+
input_images = [Image.open(filepath).convert("RGB") for filepath, _ in input_images]
|
| 99 |
+
|
| 100 |
# Model inference
|
| 101 |
with torch.no_grad():
|
| 102 |
embs = QwenImageUnit_Image2LoRAEncode().process(pipe_lora, image2lora_images=input_images)
|