|
146 | 146 | create_train_dreambooth_component = None
|
147 | 147 | username = ''
|
148 | 148 |
|
149 |
| - response = requests.get(url=f'{api_endpoint}/sd/industrialmodel') |
150 |
| - if response.status_code == 200: |
151 |
| - industrial_model = response.text |
152 |
| - else: |
153 |
| - model_name = 'stable-diffusion-webui' |
154 |
| - model_description = model_name |
155 |
| - inputs = { |
156 |
| - 'model_algorithm': 'stable-diffusion-webui', |
157 |
| - 'model_name': model_name, |
158 |
| - 'model_description': model_description, |
159 |
| - 'model_extra': '{"visible": "false"}', |
160 |
| - 'model_samples': '', |
161 |
| - 'file_content': { |
162 |
| - 'data': [(lambda x: int(x))(x) for x in open(os.path.join(script_path, 'logo.ico'), 'rb').read()] |
163 |
| - } |
| 149 | +response = requests.get(url=f'{api_endpoint}/sd/industrialmodel') |
| 150 | +if response.status_code == 200: |
| 151 | + industrial_model = response.text |
| 152 | +else: |
| 153 | + model_name = 'stable-diffusion-webui' |
| 154 | + model_description = model_name |
| 155 | + inputs = { |
| 156 | + 'model_algorithm': 'stable-diffusion-webui', |
| 157 | + 'model_name': model_name, |
| 158 | + 'model_description': model_description, |
| 159 | + 'model_extra': '{"visible": "false"}', |
| 160 | + 'model_samples': '', |
| 161 | + 'file_content': { |
| 162 | + 'data': [(lambda x: int(x))(x) for x in open(os.path.join(script_path, 'logo.ico'), 'rb').read()] |
164 | 163 | }
|
| 164 | + } |
165 | 165 |
|
166 |
| - response = requests.post(url=f'{api_endpoint}/industrialmodel', json = inputs) |
167 |
| - if response.status_code == 200: |
168 |
| - body = json.loads(response.text) |
169 |
| - industrial_model = body['id'] |
170 |
| - else: |
171 |
| - print(response.text) |
| 166 | + response = requests.post(url=f'{api_endpoint}/industrialmodel', json = inputs) |
| 167 | + if response.status_code == 200: |
| 168 | + body = json.loads(response.text) |
| 169 | + industrial_model = body['id'] |
| 170 | + else: |
| 171 | + print(response.text) |
172 | 172 |
|
173 | 173 | def reload_hypernetworks():
|
174 | 174 | from modules.hypernetworks import hypernetwork
|
|
0 commit comments