Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ from huggingface_hub import hf_hub_download
|
|
9 |
import spaces
|
10 |
from typing import Union, Sequence, Mapping, Any
|
11 |
|
12 |
-
#
|
13 |
print("Python version:", sys.version)
|
14 |
print("Torch version:", torch.__version__)
|
15 |
print("CUDA dispon铆vel:", torch.cuda.is_available())
|
@@ -23,9 +23,10 @@ comfyui_path = os.path.join(current_dir, "ComfyUI")
|
|
23 |
sys.path.append(comfyui_path)
|
24 |
|
25 |
# Importar ComfyUI components
|
26 |
-
|
27 |
-
from
|
28 |
import folder_paths
|
|
|
29 |
|
30 |
# Configura莽茫o de diret贸rios
|
31 |
BASE_DIR = os.path.dirname(os.path.realpath(__file__))
|
@@ -33,9 +34,8 @@ output_dir = os.path.join(BASE_DIR, "output")
|
|
33 |
os.makedirs(output_dir, exist_ok=True)
|
34 |
folder_paths.set_output_directory(output_dir)
|
35 |
|
36 |
-
# Inicializar
|
37 |
-
|
38 |
-
init_extra_nodes()
|
39 |
|
40 |
# Helper function
|
41 |
def get_value_at_index(obj: Union[Sequence, Mapping], index: int) -> Any:
|
@@ -54,7 +54,7 @@ def download_models():
|
|
54 |
("black-forest-labs/FLUX.1-dev", "ae.safetensors", "models/vae"),
|
55 |
("black-forest-labs/FLUX.1-dev", "flux1-dev.safetensors", "models/diffusion_models"), # Corrigido aqui
|
56 |
("google/siglip-so400m-patch14-384", "model.safetensors", "models/clip_vision"),
|
57 |
-
("nftnik/NFTNIK-FLUX.1-dev-LoRA", "
|
58 |
]
|
59 |
|
60 |
for repo_id, filename, local_dir in models:
|
|
|
9 |
import spaces
|
10 |
from typing import Union, Sequence, Mapping, Any
|
11 |
|
12 |
+
# Diagn贸stico CUDA
|
13 |
print("Python version:", sys.version)
|
14 |
print("Torch version:", torch.__version__)
|
15 |
print("CUDA dispon铆vel:", torch.cuda.is_available())
|
|
|
23 |
sys.path.append(comfyui_path)
|
24 |
|
25 |
# Importar ComfyUI components
|
26 |
+
import execution
|
27 |
+
from nodes import NODE_CLASS_MAPPINGS
|
28 |
import folder_paths
|
29 |
+
from comfy import model_management
|
30 |
|
31 |
# Configura莽茫o de diret贸rios
|
32 |
BASE_DIR = os.path.dirname(os.path.realpath(__file__))
|
|
|
34 |
os.makedirs(output_dir, exist_ok=True)
|
35 |
folder_paths.set_output_directory(output_dir)
|
36 |
|
37 |
+
# Inicializar execu莽茫o
|
38 |
+
execution.init()
|
|
|
39 |
|
40 |
# Helper function
|
41 |
def get_value_at_index(obj: Union[Sequence, Mapping], index: int) -> Any:
|
|
|
54 |
("black-forest-labs/FLUX.1-dev", "ae.safetensors", "models/vae"),
|
55 |
("black-forest-labs/FLUX.1-dev", "flux1-dev.safetensors", "models/diffusion_models"), # Corrigido aqui
|
56 |
("google/siglip-so400m-patch14-384", "model.safetensors", "models/clip_vision"),
|
57 |
+
("nftnik/NFTNIK-FLUX.1-dev-LoRA", "NFTNIK_V1.safetensors", "models/lora")
|
58 |
]
|
59 |
|
60 |
for repo_id, filename, local_dir in models:
|