Spaces:
Running
on
Zero
Running
on
Zero
Artiprocher
commited on
Commit
•
37e0538
1
Parent(s):
be940e8
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ os.system("pip install -r requirements.txt")
|
|
4 |
from huggingface_hub import login
|
5 |
login(token=os.getenv('HF_AK'))
|
6 |
from diffsynth import download_models
|
7 |
-
download_models(["
|
8 |
|
9 |
import gradio as gr
|
10 |
from diffsynth import ModelManager, SDImagePipeline, SDXLImagePipeline, SD3ImagePipeline, HunyuanDiTImagePipeline, FluxImagePipeline
|
@@ -132,7 +132,6 @@ def load_model(model_type, model_path):
|
|
132 |
|
133 |
model_dict = {}
|
134 |
load_model("FLUX", "FLUX.1-dev")
|
135 |
-
load_model("Kolors", "Kolors")
|
136 |
|
137 |
with gr.Blocks() as app:
|
138 |
gr.Markdown("# DiffSynth-Studio Painter")
|
@@ -140,8 +139,8 @@ with gr.Blocks() as app:
|
|
140 |
with gr.Column(scale=382, min_width=100):
|
141 |
|
142 |
with gr.Accordion(label="Model"):
|
143 |
-
model_type = gr.Dropdown(choices=["
|
144 |
-
model_path = gr.Dropdown(choices=["
|
145 |
|
146 |
@gr.on(inputs=model_type, outputs=model_path, triggers=model_type.change)
|
147 |
def model_type_to_model_path(model_type):
|
|
|
4 |
from huggingface_hub import login
|
5 |
login(token=os.getenv('HF_AK'))
|
6 |
from diffsynth import download_models
|
7 |
+
download_models(["FLUX.1-dev"], downloading_priority=["HuggingFace", "ModelScope"])
|
8 |
|
9 |
import gradio as gr
|
10 |
from diffsynth import ModelManager, SDImagePipeline, SDXLImagePipeline, SD3ImagePipeline, HunyuanDiTImagePipeline, FluxImagePipeline
|
|
|
132 |
|
133 |
model_dict = {}
|
134 |
load_model("FLUX", "FLUX.1-dev")
|
|
|
135 |
|
136 |
with gr.Blocks() as app:
|
137 |
gr.Markdown("# DiffSynth-Studio Painter")
|
|
|
139 |
with gr.Column(scale=382, min_width=100):
|
140 |
|
141 |
with gr.Accordion(label="Model"):
|
142 |
+
model_type = gr.Dropdown(choices=["FLUX"], label="Model type", value="FLUX")
|
143 |
+
model_path = gr.Dropdown(choices=["FLUX.1-dev"], interactive=True, label="Model path", value="FLUX.1-dev")
|
144 |
|
145 |
@gr.on(inputs=model_type, outputs=model_path, triggers=model_type.change)
|
146 |
def model_type_to_model_path(model_type):
|