Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,6 +7,7 @@ import gradio as gr
|
|
| 7 |
from PIL import Image
|
| 8 |
from huggingface_hub import hf_hub_download
|
| 9 |
import spaces
|
|
|
|
| 10 |
|
| 11 |
hf_hub_download(repo_id="black-forest-labs/FLUX.1-Redux-dev", filename="flux1-redux-dev.safetensors", local_dir="models/style_models")
|
| 12 |
hf_hub_download(repo_id="black-forest-labs/FLUX.1-Depth-dev", filename="flux1-depth-dev.safetensors", local_dir="models/diffusion_models")
|
|
@@ -134,6 +135,14 @@ downloadandloaddepthanythingv2model = NODE_CLASS_MAPPINGS["DownloadAndLoadDepthA
|
|
| 134 |
DEPTH_MODEL = downloadandloaddepthanythingv2model.loadmodel(
|
| 135 |
model="depth_anything_v2_vitl_fp32.safetensors"
|
| 136 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 137 |
cliptextencode = CLIPTextEncode()
|
| 138 |
loadimage = LoadImage()
|
| 139 |
vaeencode = VAEEncode()
|
|
|
|
| 7 |
from PIL import Image
|
| 8 |
from huggingface_hub import hf_hub_download
|
| 9 |
import spaces
|
| 10 |
+
from comfy import model_management
|
| 11 |
|
| 12 |
hf_hub_download(repo_id="black-forest-labs/FLUX.1-Redux-dev", filename="flux1-redux-dev.safetensors", local_dir="models/style_models")
|
| 13 |
hf_hub_download(repo_id="black-forest-labs/FLUX.1-Depth-dev", filename="flux1-depth-dev.safetensors", local_dir="models/diffusion_models")
|
|
|
|
| 135 |
DEPTH_MODEL = downloadandloaddepthanythingv2model.loadmodel(
|
| 136 |
model="depth_anything_v2_vitl_fp32.safetensors"
|
| 137 |
)
|
| 138 |
+
|
| 139 |
+
model_management.load_models_gpu([
|
| 140 |
+
CLIP_MODEL[0].patcher,
|
| 141 |
+
VAE_MODEL[0].patcher,
|
| 142 |
+
UNET_MODEL[0],
|
| 143 |
+
CLIP_VISION_MODEL[0].patcher,
|
| 144 |
+
])
|
| 145 |
+
|
| 146 |
cliptextencode = CLIPTextEncode()
|
| 147 |
loadimage = LoadImage()
|
| 148 |
vaeencode = VAEEncode()
|