Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -10,10 +10,12 @@ from huggingface_hub import hf_hub_download
|
|
10 |
import spaces
|
11 |
from comfy import model_management
|
12 |
|
|
|
|
|
13 |
# Download required models
|
14 |
t5_path = hf_hub_download(repo_id="comfyanonymous/flux_text_encoders", filename="t5xxl_fp8_e4m3fn.safetensors", local_dir="models/text_encoders/")
|
15 |
vae_path = hf_hub_download(repo_id="lodestones/Chroma", filename="ae.safetensors", local_dir="models/vae")
|
16 |
-
unet_path = hf_hub_download(repo_id="lodestones/Chroma", filename=
|
17 |
|
18 |
# Utility functions
|
19 |
def get_value_at_index(obj: Union[Sequence, Mapping], index: int) -> Any:
|
@@ -101,7 +103,7 @@ t5tokenizeroptions_82 = t5tokenizeroptions.set_options(
|
|
101 |
min_padding=1, min_length=0, clip=get_value_at_index(cliploader_78, 0)
|
102 |
)
|
103 |
unetloader_76 = unetloader.load_unet(
|
104 |
-
unet_name=
|
105 |
)
|
106 |
vaeloader_80 = vaeloader.load_vae(vae_name="ae.safetensors")
|
107 |
|
|
|
10 |
import spaces
|
11 |
from comfy import model_management
|
12 |
|
13 |
+
CHROMA_VERSION = "chroma-unlocked-v32.safetensors"
|
14 |
+
|
15 |
# Download required models
|
16 |
t5_path = hf_hub_download(repo_id="comfyanonymous/flux_text_encoders", filename="t5xxl_fp8_e4m3fn.safetensors", local_dir="models/text_encoders/")
|
17 |
vae_path = hf_hub_download(repo_id="lodestones/Chroma", filename="ae.safetensors", local_dir="models/vae")
|
18 |
+
unet_path = hf_hub_download(repo_id="lodestones/Chroma", filename=CHROMA_VERSION, local_dir="models/unet")
|
19 |
|
20 |
# Utility functions
|
21 |
def get_value_at_index(obj: Union[Sequence, Mapping], index: int) -> Any:
|
|
|
103 |
min_padding=1, min_length=0, clip=get_value_at_index(cliploader_78, 0)
|
104 |
)
|
105 |
unetloader_76 = unetloader.load_unet(
|
106 |
+
unet_name=CHROMA_VERSION, weight_dtype="fp8_e4m3fn"
|
107 |
)
|
108 |
vaeloader_80 = vaeloader.load_vae(vae_name="ae.safetensors")
|
109 |
|