File size: 10,774 Bytes
22becd2
 
 
 
 
490f759
 
22d1d36
490f759
 
 
 
 
 
 
 
 
ed862e6
22becd2
9cdcc98
 
cfa1d05
 
fc12896
 
de13657
 
32a74d5
 
24a3114
 
7789416
 
 
 
24a3114
 
09f693d
 
093603f
 
4a3f01f
 
 
 
24a3114
 
8cc1ab0
 
321cac9
aa97ff7
617a11e
 
26bf699
 
97d6e84
 
aae3957
 
06da503
 
00b7f57
 
5a4665a
 
 
 
 
22994be
321cac9
 
aae6c33
8aa97dd
aae6c33
8aa97dd
aae6c33
8aa97dd
aae6c33
 
 
 
1d5f9df
 
 
 
aae6c33
22becd2
aae6c33
8aa97dd
aae6c33
22becd2
aae6c33
22becd2
aae6c33
8aa97dd
aae6c33
22becd2
aae6c33
8aa97dd
4a3f01f
 
 
 
 
 
22becd2
490f759
 
4a3f01f
490f759
22becd2
490f759
 
4a3f01f
490f759
22becd2
4a3f01f
 
 
 
 
b2d39bc
490f759
 
4a3f01f
 
 
 
 
 
 
 
 
 
490f759
 
 
b2d39bc
490f759
4a3f01f
490f759
b2d39bc
490f759
4a3f01f
490f759
4a3f01f
490f759
 
 
 
 
 
 
 
 
 
22becd2
 
490f759
 
 
4a3f01f
490f759
 
4a3f01f
 
22becd2
4a3f01f
22becd2
490f759
4a3f01f
490f759
 
 
22becd2
 
 
490f759
 
e70c2a5
490f759
 
 
e70c2a5
490f759
 
 
 
 
e70c2a5
490f759
 
 
 
 
 
 
 
 
 
 
 
 
22becd2
490f759
4a3f01f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
from IPython.display import display, HTML, clear_output
from ipywidgets import widgets, Layout
import os
from nenen88 import download, say, tempe

bura = "/home/studio-lab-user/forge/asd/cn-1_5.css"
bura2 = "/home/studio-lab-user/asd/asd/cn-1_5.css"

# Check if the file exists at the first location
if os.path.exists(bura):
    file_path = bura
else:
    file_path = bura2

with open(file_path, "r") as oppai:
    susu = oppai.read()
display(HTML(f"<style>{susu}</style>"))

url_list = {
    "PonyRealism_v21Lightning8SVAE (Pony)": [
    "https://huggingface.co/Carlos2312/models/resolve/main/ponyRealism_v21Lightning8SVAE.safetensors ponyRealism_v21Lightning8SVAE.safetensors"],
    "FastPonyMerge_version75 (Pony)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/fastPonyMerge_version75.safetensors fastPonyMerge_version75.safetensors"],
    "PonyRealism_v20VAE (Pony)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/ponyRealism_v20VAE.safetensors ponyRealism_v20VAE.safetensors"],
    "PonyRealism_v21MainVAE (Pony)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/ponyRealism_v21MainVAE.safetensors ponyRealism_v21MainVAE.safetensors"],
    "RealDream_turboLCM7SD15 (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/realDream_turboLCM7SD15.safetensors realDream_turboLCM7SD15.safetensors"],
    "Anithing_v20 (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/anithing_v20.safetensors anithing_v20.safetensors"],
    "RealisticVisionFULLV60B1_v51HyperVAE (1.5 Hyper)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/realisticVisionFULLV60B1_v51HyperVAE.safetensors realisticVisionFULLV60B1_v51HyperVAE.safetensors"],
    "RealisticVisionV60B1_v51HyperVAE (1.5 Hyper)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/realisticVisionV60B1_v51HyperVAE.safetensors realisticVisionV60B1_v51HyperVAE.safetensors"],
    "PornmasterPro_v7 (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/pornmasterPro_v7.safetensors pornmasterPro_v7.safetensors"],
    "Epicphotogasm_ultimateFidelity (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/epicphotogasm_ultimateFidelity.safetensors epicphotogasm_ultimateFidelity.safetensors"],
    "WildcardxREALNSFWSFW_Hyper (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/wildcardxREALNSFWSFW_Hyper.safetensors wildcardxREALNSFWSFW_Hyper.safetensors"],
    "Realisian_v60 (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/realisian_v60.safetensors realisian_v60.safetensors"],
    "Moomoofusion_v10 (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/moomoofusion_v10.safetensors moomoofusion_v10.safetensors"],
    "RealDream_14Hyper (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/realDream_14Hyper.safetensors realDream_14Hyper.safetensors"],
    "WildcardxREALNSFWSFW_nsfwSFW (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/wildcardxREALNSFWSFW_nsfwSFW.safetensors wildcardxREALNSFWSFW_nsfwSFW.safetensors"],
    "CyberrealisticLCM41 (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/cyberrealisticLCM_cyberrealistic41.safetensors cyberrealisticLCM_cyberrealistic41.safetensors"],
    "Excursion_v10 (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/excursion_v10.safetensors excursion_v10.safetensors"],
    "DamnPonyxlRealistic_damnV10 (Pony)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/damnPonyxlRealistic_damnV10.safetensors damnPonyxlRealistic_damnV10.safetensors"],
    "TheTrualityEngine_trualityENGINEPRO (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/theTrualityEngine_trualityENGINEPRO.safetensors theTrualityEngine_trualityENGINEPRO.safetensors"],
    "RealDream_14 (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/realDream_14.safetensors realDream_14.safetensors"],
    "MergedAmateursMixed_v10-inpainting (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/mergedAmateursMixed_v10-inpainting.safetensors mergedAmateursMixed_v10-inpainting.safetensors"],
    "babesBYSTABLEYOGI_v4InstagramEdition (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/babesBYSTABLEYOGI_v4InstagramEdition.safetensors babesBYSTABLEYOGI_v4InstagramEdition.safetensors"],
    "MajicmixRealistic_v7-inpainting (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/majicmixRealistic_v7-inpainting.safetensors majicmixRealistic_v7-inpainting.safetensors"],
    "RealisticVisionV60B1_v51VAE-inpainting (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/realisticVisionV60B1_v51VAE-inpainting.safetensors realisticVisionV60B1_v51VAE-inpainting.safetensors"],
    "Cyberrealistic_v42-inpainting (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/cyberrealistic_v42-inpainting.safetensors cyberrealistic_v42-inpainting.safetensors"],
    "CyberrealisticLCM42 (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/cyberrealisticLCM_cyberrealistic42.safetensors cyberrealisticLCM_cyberrealistic42.safetensors"],
    "Cyberrealistic_v42 (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/cyberrealistic_v42.safetensors cyberrealistic_v42.safetensors"],
    "Epicphotogasm_lastUnicorn (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/epicphotogasm_lastUnicorn.safetensors epicphotogasm_lastUnicorn.safetensors"],
    "Epicrealismxl_flashgordon (XL)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/epicrealismxl_flashgordon.safetensors epicrealismxl_flashgordon.safetensors"],
    "JuggernautXL_v9Rdphoto2Lightning (XL)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/juggernautXL_v9Rdphoto2Lightning.safetensors juggernautXL_v9Rdphoto2Lightning.safetensors"],
    "Juggernaut_reborn (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/juggernaut_reborn.safetensors juggernaut_reborn.safetensors"],
    "lazymixRealAmateur_v40 FP16 (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/lazymixRealAmateur_v40.safetensors lazymixRealAmateur_v40.safetensors"],
    "lazymixRealAmateur_v40 CKPT (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/lazymixRealAmateur_v40.ckpt lazymixRealAmateur_v40.ckpt"],
    "Marduk191sPseudoModern_v10_XL (XL)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/marduk191sPseudoModern_v10.safetensors marduk191sPseudoModern_v10.safetensors"],
    "Meinapastel_v6Pastel (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/meinapastel_v6Pastel.safetensors meinapastel_v6Pastel.safetensors"],
    "PicxReal_10 (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/picxReal_10.safetensors picxReal_10.safetensors"],
    "PicxReal_10Lcm (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/picxReal_10Lcm.safetensors picxReal_10Lcm.safetensors"],
    "RealDream_turboLCM6 (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/realDream_turboLCM6.safetensors realDream_turboLCM6.safetensors"],
    "RealismBYSTABLEYOGI_v4LCM (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/realismBYSTABLEYOGI_v4LCM.safetensors realismBYSTABLEYOGI_v4LCM.safetensors"],
    "SourceOfTheGoddess_003LCM (1.5)": [
        "https://huggingface.co/Carlos2312/models/resolve/main/sourceOfTheGoddess_003LCM.safetensors sourceOfTheGoddess_003LCM.safetensors"]}

# Split the list into thirds
list_third = len(url_list) // 3
third_list_1 = dict(list(url_list.items())[:list_third])
third_list_2 = dict(list(url_list.items())[list_third:2*list_third])
third_list_3 = dict(list(url_list.items())[2*list_third:])

cb1 = widgets.VBox(
    [widgets.Checkbox(value=False, description=name, style={'description_width': '0px'})
     for name in third_list_1])
cb1.add_class("checkbox-group1")

cb2 = widgets.VBox(
    [widgets.Checkbox(value=False, description=name, style={'description_width': '0px'})
     for name in third_list_2])
cb2.add_class("checkbox-group2")

cb3 = widgets.VBox(
    [widgets.Checkbox(value=False, description=name, style={'description_width': '0px'})
     for name in third_list_3])
cb3.add_class("checkbox-group3")

db = widgets.Button(description="Download")
db.add_class("download-button")
dbo = widgets.Output()

# Arrange the checkboxes in a grid
cbc = widgets.GridBox(
    [cb1, cb2, cb3],
    layout=widgets.Layout(
        width='100%',
        grid_template_columns="33% 33% 33%",
        align_items='flex-start'
    )
)

gariz3 = """<div class="gradient-cn2">forge</div>"""
garis3 = widgets.Output()

def sa_cb(b):
    for checkbox in cb1.children + cb2.children + cb3.children:
        checkbox.value = True

def usa_cb(b):
    for checkbox in cb1.children + cb2.children + cb3.children:
        checkbox.value = False

sab = widgets.Button(description="Select All")
sab.add_class("select-all-button")
sab.on_click(sa_cb)

usab = widgets.Button(description="Unselect All")
usab.add_class("unselect-all-button")
usab.on_click(usa_cb)

bs = widgets.Button(description="")
bs.add_class("border-style")

bl = widgets.HBox([sab, usab, db, bs])
boks2 = widgets.VBox([bl, cbc], layout=Layout(
    display='flex',
    flex_flow='column',
    width='800px',  # Ensure the width is enough for three columns
    height='455px',
    align_items='center',
    padding='10px'
))
boks2.add_class("boks2")

def d_b_click(b):
    surl = []
    for checkbox, key in zip(cb1.children + cb2.children + cb3.children, list(url_list.keys())):
        if checkbox.value:
            surl.extend(url_list[key])
            
    widgets.Widget.close(boks2)
    dbo.clear_output()
    
    with garis3:
        display(HTML(gariz3))

    # Define the two directory paths
    dir_path_1 = "/home/studio-lab-user/forge/models/Stable-diffusion/tmp_ckpt"
    dir_path_2 = "/home/studio-lab-user/asd/models/Stable-diffusion/tmp_ckpt"

    # Check if the directory exists at the first location
    if os.path.exists(dir_path_1):
        directory_path = dir_path_1
    else:
        directory_path = dir_path_2

    # Change the current directory to the selected directory
    with dbo:
        say("【{red} Downloading{cyan} Models{magenta} Models{yellow} 】{red}")
        os.chdir(directory_path)
        
        for url in surl:
            download(url)
            
        with garis3:
            garis3.clear_output()
            
        say("【{red} Done{d} 】{red}")
            
tempe()
display(boks2, dbo, garis3)
db.on_click(d_b_click)