Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,12 @@ import torch
|
|
| 7 |
from diffusers import Flux2KleinPipeline
|
| 8 |
from huggingface_hub import login, hf_hub_download
|
| 9 |
from safetensors.torch import load_file
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
dtype = torch.bfloat16
|
| 13 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
|
| 7 |
from diffusers import Flux2KleinPipeline
|
| 8 |
from huggingface_hub import login, hf_hub_download
|
| 9 |
from safetensors.torch import load_file
|
| 10 |
+
try:
|
| 11 |
+
from color_matcher import ColorMatcher
|
| 12 |
+
except ImportError:
|
| 13 |
+
import subprocess
|
| 14 |
+
subprocess.check_call(["pip", "install", "color-matcher"])
|
| 15 |
+
from color_matcher import ColorMatcher
|
| 16 |
|
| 17 |
dtype = torch.bfloat16
|
| 18 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|