This commit is contained in:
Nicholas Koben Kao
2024-01-24 22:15:12 -08:00
parent 911cc8d16b
commit db04d02d34
7 changed files with 124 additions and 65 deletions
+3 -1
View File
@@ -47,6 +47,7 @@ machine_id_websocket_dict = {}
machine_id_status = {}
fly_instance_id = os.environ.get('FLY_ALLOC_ID', 'local').split('-')[0]
civitai_api_key = os.environ.get('FLY_ALLOC_ID', 'local').split('-')[0]
class FlyReplayMiddleware(BaseHTTPMiddleware):
@@ -272,7 +273,8 @@ async def upload_logic(body: UploadBody):
"checkpoint_id": body.checkpoint_id,
"volume_id": body.volume_id,
"folder_path": upload_path,
}
},
"civitai_api_key": os.environ.get('CIVITAI_API_KEY')
}
with open(f"{folder_path}/config.py", "w") as f:
f.write("config = " + json.dumps(config))