Skip to content

Commit 86ce539

Browse files
committed
cleanup
1 parent d6a61ab commit 86ce539

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

modules/shared.py

+21-21
Original file line numberDiff line numberDiff line change
@@ -146,29 +146,29 @@
146146
create_train_dreambooth_component = None
147147
username = ''
148148

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()]
164163
}
164+
}
165165

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)
172172

173173
def reload_hypernetworks():
174174
from modules.hypernetworks import hypernetwork

0 commit comments

Comments
 (0)