Spaces:
Running
on
Zero
Running
on
Zero
Upload 5 files
Browse files- app.py +5 -7
- constants.py +12 -1
- env.py +1 -0
- requirements.txt +1 -1
- utils.py +2 -2
app.py
CHANGED
@@ -134,6 +134,7 @@ flux_pipe = FluxPipeline.from_pretrained(
|
|
134 |
).to("cuda")
|
135 |
components = flux_pipe.components
|
136 |
components.pop("transformer", None)
|
|
|
137 |
delete_model(flux_repo)
|
138 |
# components = None
|
139 |
|
@@ -226,10 +227,7 @@ class GuiSD:
|
|
226 |
yield f"Loading model: {model_name}"
|
227 |
|
228 |
if vae_model == "BakedVAE":
|
229 |
-
|
230 |
-
vae_model = model_name
|
231 |
-
else:
|
232 |
-
vae_model = None
|
233 |
elif vae_model:
|
234 |
vae_type = "SDXL" if "sdxl" in vae_model.lower() else "SD 1.5"
|
235 |
if model_type != vae_type:
|
@@ -453,10 +451,10 @@ class GuiSD:
|
|
453 |
self.model.stream_config(concurrency=concurrency, latent_resize_by=1, vae_decoding=False)
|
454 |
|
455 |
if task != "txt2img" and not image_control:
|
456 |
-
raise ValueError("
|
457 |
|
458 |
-
if task
|
459 |
-
raise ValueError("
|
460 |
|
461 |
if "https://" not in str(UPSCALER_DICT_GUI[upscaler_model_path]):
|
462 |
upscaler_model = upscaler_model_path
|
|
|
134 |
).to("cuda")
|
135 |
components = flux_pipe.components
|
136 |
components.pop("transformer", None)
|
137 |
+
components.pop("scheduler", None)
|
138 |
delete_model(flux_repo)
|
139 |
# components = None
|
140 |
|
|
|
227 |
yield f"Loading model: {model_name}"
|
228 |
|
229 |
if vae_model == "BakedVAE":
|
230 |
+
vae_model = model_name
|
|
|
|
|
|
|
231 |
elif vae_model:
|
232 |
vae_type = "SDXL" if "sdxl" in vae_model.lower() else "SD 1.5"
|
233 |
if model_type != vae_type:
|
|
|
451 |
self.model.stream_config(concurrency=concurrency, latent_resize_by=1, vae_decoding=False)
|
452 |
|
453 |
if task != "txt2img" and not image_control:
|
454 |
+
raise ValueError("Reference image is required. Please upload one in 'Image ControlNet/Inpaint/Img2img'.")
|
455 |
|
456 |
+
if task in ["inpaint", "repaint"] and not image_mask:
|
457 |
+
raise ValueError("Mask image not found. Upload one in 'Image Mask' to proceed.")
|
458 |
|
459 |
if "https://" not in str(UPSCALER_DICT_GUI[upscaler_model_path]):
|
460 |
upscaler_model = upscaler_model_path
|
constants.py
CHANGED
@@ -30,6 +30,7 @@ LOAD_DIFFUSERS_FORMAT_MODEL = [
|
|
30 |
'shauray/FluxDev-HyperSD-merged',
|
31 |
'mikeyandfriends/PixelWave_FLUX.1-dev_03',
|
32 |
'terminusresearch/FluxBooru-v0.3',
|
|
|
33 |
'ostris/OpenFLUX.1',
|
34 |
'shuttleai/shuttle-3-diffusion',
|
35 |
'Laxhar/noobai-XL-1.0',
|
@@ -45,12 +46,15 @@ LOAD_DIFFUSERS_FORMAT_MODEL = [
|
|
45 |
'John6666/ntr-mix-illustrious-xl-noob-xl-v777-sdxl',
|
46 |
'John6666/ntr-mix-illustrious-xl-noob-xl-v777forlora-sdxl',
|
47 |
'John6666/ntr-mix-illustrious-xl-noob-xl-xi-sdxl',
|
|
|
|
|
48 |
'John6666/mistoon-anime-v10illustrious-sdxl',
|
49 |
'John6666/hassaku-xl-illustrious-v10-sdxl',
|
50 |
'John6666/hassaku-xl-illustrious-v10style-sdxl',
|
51 |
'John6666/haruki-mix-illustrious-v10-sdxl',
|
52 |
'John6666/noobreal-v10-sdxl',
|
53 |
'John6666/complicated-noobai-merge-vprediction-sdxl',
|
|
|
54 |
'Laxhar/noobai-XL-Vpred-0.75s',
|
55 |
'Laxhar/noobai-XL-Vpred-0.75',
|
56 |
'Laxhar/noobai-XL-Vpred-0.65s',
|
@@ -77,6 +81,7 @@ LOAD_DIFFUSERS_FORMAT_MODEL = [
|
|
77 |
'John6666/meinaxl-v2-sdxl',
|
78 |
'Eugeoter/artiwaifu-diffusion-2.0',
|
79 |
'comin/IterComp',
|
|
|
80 |
'John6666/epicrealism-xl-v10kiss2-sdxl',
|
81 |
'John6666/epicrealism-xl-v8kiss-sdxl',
|
82 |
'misri/zavychromaxl_v80',
|
@@ -109,13 +114,17 @@ LOAD_DIFFUSERS_FORMAT_MODEL = [
|
|
109 |
'John6666/cyberrealistic-pony-v63-sdxl',
|
110 |
'John6666/cyberrealistic-pony-v64-sdxl',
|
111 |
'John6666/cyberrealistic-pony-v65-sdxl',
|
|
|
112 |
'GraydientPlatformAPI/realcartoon-pony-diffusion',
|
113 |
'John6666/nova-anime-xl-pony-v5-sdxl',
|
114 |
'John6666/autismmix-sdxl-autismmix-pony-sdxl',
|
115 |
'John6666/aimz-dream-real-pony-mix-v3-sdxl',
|
|
|
|
|
116 |
'John6666/duchaiten-pony-real-v11fix-sdxl',
|
117 |
'John6666/duchaiten-pony-real-v20-sdxl',
|
118 |
'John6666/duchaiten-pony-xl-no-score-v70-sdxl',
|
|
|
119 |
'KBlueLeaf/Kohaku-XL-Zeta',
|
120 |
'cagliostrolab/animagine-xl-3.1',
|
121 |
'yodayo-ai/kivotos-xl-2.0',
|
@@ -130,7 +139,9 @@ LOAD_DIFFUSERS_FORMAT_MODEL = [
|
|
130 |
'digiplay/darkphoenix3D_v1.1',
|
131 |
'digiplay/BeenYouLiteL11_diffusers',
|
132 |
'GraydientPlatformAPI/rev-animated2',
|
133 |
-
'
|
|
|
|
|
134 |
'youknownothing/deliberate-v6',
|
135 |
'GraydientPlatformAPI/deliberate-cyber3',
|
136 |
'GraydientPlatformAPI/picx-real',
|
|
|
30 |
'shauray/FluxDev-HyperSD-merged',
|
31 |
'mikeyandfriends/PixelWave_FLUX.1-dev_03',
|
32 |
'terminusresearch/FluxBooru-v0.3',
|
33 |
+
'black-forest-labs/FLUX.1-schnell',
|
34 |
'ostris/OpenFLUX.1',
|
35 |
'shuttleai/shuttle-3-diffusion',
|
36 |
'Laxhar/noobai-XL-1.0',
|
|
|
46 |
'John6666/ntr-mix-illustrious-xl-noob-xl-v777-sdxl',
|
47 |
'John6666/ntr-mix-illustrious-xl-noob-xl-v777forlora-sdxl',
|
48 |
'John6666/ntr-mix-illustrious-xl-noob-xl-xi-sdxl',
|
49 |
+
'John6666/ntr-mix-illustrious-xl-noob-xl-xii-sdxl',
|
50 |
+
'John6666/ntr-mix-illustrious-xl-noob-xl-xiii-sdxl',
|
51 |
'John6666/mistoon-anime-v10illustrious-sdxl',
|
52 |
'John6666/hassaku-xl-illustrious-v10-sdxl',
|
53 |
'John6666/hassaku-xl-illustrious-v10style-sdxl',
|
54 |
'John6666/haruki-mix-illustrious-v10-sdxl',
|
55 |
'John6666/noobreal-v10-sdxl',
|
56 |
'John6666/complicated-noobai-merge-vprediction-sdxl',
|
57 |
+
'Laxhar/noobai-XL-Vpred-0.9r',
|
58 |
'Laxhar/noobai-XL-Vpred-0.75s',
|
59 |
'Laxhar/noobai-XL-Vpred-0.75',
|
60 |
'Laxhar/noobai-XL-Vpred-0.65s',
|
|
|
81 |
'John6666/meinaxl-v2-sdxl',
|
82 |
'Eugeoter/artiwaifu-diffusion-2.0',
|
83 |
'comin/IterComp',
|
84 |
+
'John6666/epicrealism-xl-vxiabeast-sdxl',
|
85 |
'John6666/epicrealism-xl-v10kiss2-sdxl',
|
86 |
'John6666/epicrealism-xl-v8kiss-sdxl',
|
87 |
'misri/zavychromaxl_v80',
|
|
|
114 |
'John6666/cyberrealistic-pony-v63-sdxl',
|
115 |
'John6666/cyberrealistic-pony-v64-sdxl',
|
116 |
'John6666/cyberrealistic-pony-v65-sdxl',
|
117 |
+
'John6666/cyberrealistic-pony-v7-sdxl',
|
118 |
'GraydientPlatformAPI/realcartoon-pony-diffusion',
|
119 |
'John6666/nova-anime-xl-pony-v5-sdxl',
|
120 |
'John6666/autismmix-sdxl-autismmix-pony-sdxl',
|
121 |
'John6666/aimz-dream-real-pony-mix-v3-sdxl',
|
122 |
+
'John6666/prefectious-xl-nsfw-v10-sdxl',
|
123 |
+
'GraydientPlatformAPI/iniverseponyRealGuofeng49',
|
124 |
'John6666/duchaiten-pony-real-v11fix-sdxl',
|
125 |
'John6666/duchaiten-pony-real-v20-sdxl',
|
126 |
'John6666/duchaiten-pony-xl-no-score-v70-sdxl',
|
127 |
+
'Spestly/OdysseyXL-3.0',
|
128 |
'KBlueLeaf/Kohaku-XL-Zeta',
|
129 |
'cagliostrolab/animagine-xl-3.1',
|
130 |
'yodayo-ai/kivotos-xl-2.0',
|
|
|
139 |
'digiplay/darkphoenix3D_v1.1',
|
140 |
'digiplay/BeenYouLiteL11_diffusers',
|
141 |
'GraydientPlatformAPI/rev-animated2',
|
142 |
+
'myxlmynx/cyberrealistic_classic40',
|
143 |
+
'GraydientPlatformAPI/cyberreal6',
|
144 |
+
'GraydientPlatformAPI/cyberreal5',
|
145 |
'youknownothing/deliberate-v6',
|
146 |
'GraydientPlatformAPI/deliberate-cyber3',
|
147 |
'GraydientPlatformAPI/picx-real',
|
env.py
CHANGED
@@ -16,6 +16,7 @@ LOAD_DIFFUSERS_FORMAT_MODEL = [
|
|
16 |
'kayfahaarukku/irAsu-1.0',
|
17 |
'Eugeoter/artiwaifu-diffusion-2.0',
|
18 |
'comin/IterComp',
|
|
|
19 |
'OnomaAIResearch/Illustrious-xl-early-release-v0',
|
20 |
'Raelina/Rae-Diffusion-XL-V2',
|
21 |
'Raelina/Raemu-XL-V4',
|
|
|
16 |
'kayfahaarukku/irAsu-1.0',
|
17 |
'Eugeoter/artiwaifu-diffusion-2.0',
|
18 |
'comin/IterComp',
|
19 |
+
'Emanon14/NONAMEmix_v1',
|
20 |
'OnomaAIResearch/Illustrious-xl-early-release-v0',
|
21 |
'Raelina/Rae-Diffusion-XL-V2',
|
22 |
'Raelina/Raemu-XL-V4',
|
requirements.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
git+https://github.com/R3gm/stablepy.git@
|
2 |
torch==2.2.0
|
3 |
numpy<2
|
4 |
gdown
|
|
|
1 |
+
git+https://github.com/R3gm/stablepy.git@47c19f5 # -b refactor_sampler_fix
|
2 |
torch==2.2.0
|
3 |
numpy<2
|
4 |
gdown
|
utils.py
CHANGED
@@ -62,7 +62,7 @@ class ModelInformation:
|
|
62 |
self.download_url = json_data.get("downloadUrl", "")
|
63 |
self.model_url = f"https://civitai.com/models/{self.model_id}?modelVersionId={self.model_version_id}"
|
64 |
self.filename_url = next(
|
65 |
-
(v.get("name", "") for v in
|
66 |
)
|
67 |
self.filename_url = self.filename_url if self.filename_url else ""
|
68 |
self.description = json_data.get("description", "")
|
@@ -300,7 +300,7 @@ def get_model_type(repo_id: str):
|
|
300 |
default = "SD 1.5"
|
301 |
try:
|
302 |
if os.path.exists(repo_id):
|
303 |
-
tag, _, _ = checkpoint_model_type(repo_id)
|
304 |
return DIFFUSECRAFT_CHECKPOINT_NAME[tag]
|
305 |
else:
|
306 |
model = api.model_info(repo_id=repo_id, timeout=5.0)
|
|
|
62 |
self.download_url = json_data.get("downloadUrl", "")
|
63 |
self.model_url = f"https://civitai.com/models/{self.model_id}?modelVersionId={self.model_version_id}"
|
64 |
self.filename_url = next(
|
65 |
+
(v.get("name", "") for v in json_data.get("files", []) if str(self.model_version_id) in v.get("downloadUrl", "") and v.get("type", "Model") == "Model"), ""
|
66 |
)
|
67 |
self.filename_url = self.filename_url if self.filename_url else ""
|
68 |
self.description = json_data.get("description", "")
|
|
|
300 |
default = "SD 1.5"
|
301 |
try:
|
302 |
if os.path.exists(repo_id):
|
303 |
+
tag, _, _, _ = checkpoint_model_type(repo_id)
|
304 |
return DIFFUSECRAFT_CHECKPOINT_NAME[tag]
|
305 |
else:
|
306 |
model = api.model_info(repo_id=repo_id, timeout=5.0)
|