model volume rename, env for flyio, public and private volumes tested tgt, everything is a public model (#3)
This commit is contained in:
parent
95e454e687
commit
ac5aba2aa9
@ -5,3 +5,4 @@ CIVITAI_API_KEY=
|
||||
# On production set to False
|
||||
DEPLOY_TEST_FLAG=True
|
||||
CIVITAI_API_KEY=
|
||||
PUBLIC_MODEL_VOLUME_NAME=
|
||||
|
@ -47,7 +47,8 @@ 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]
|
||||
civitai_api_key = os.environ.get('FLY_ALLOC_ID', 'local')
|
||||
public_model_volume_name = os.environ.get('PUBLIC_MODEL_VOLUME_NAME', 'local')
|
||||
|
||||
|
||||
class FlyReplayMiddleware(BaseHTTPMiddleware):
|
||||
@ -388,7 +389,7 @@ async def build_logic(item: Item):
|
||||
"name": item.name,
|
||||
"deploy_test": os.environ.get("DEPLOY_TEST_FLAG", "False"),
|
||||
"gpu": item.gpu,
|
||||
"public_model_volume": "model-store",
|
||||
"public_model_volume": public_model_volume_name,
|
||||
"private_model_volume": item.model_volume_name,
|
||||
"pip": list(pip_modules)
|
||||
}
|
||||
|
BIN
web/bun.lockb
BIN
web/bun.lockb
Binary file not shown.
1
web/drizzle/0044_panoramic_mister_fear.sql
Normal file
1
web/drizzle/0044_panoramic_mister_fear.sql
Normal file
@ -0,0 +1 @@
|
||||
ALTER TABLE "comfyui_deploy"."models" ALTER COLUMN "is_public" SET DEFAULT true;
|
1289
web/drizzle/meta/0044_snapshot.json
Normal file
1289
web/drizzle/meta/0044_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -309,6 +309,13 @@
|
||||
"when": 1706241449348,
|
||||
"tag": "0043_wealthy_nicolaos",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 44,
|
||||
"version": "5",
|
||||
"when": 1706317908300,
|
||||
"tag": "0044_panoramic_mister_fear",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
@ -90,7 +90,7 @@ export const columns: ColumnDef<ModelItemList>[] = [
|
||||
</span>
|
||||
|
||||
{model.is_public
|
||||
? <Badge variant="green">Public</Badge>
|
||||
? <></>
|
||||
: <Badge variant="orange">Private</Badge>}
|
||||
</>
|
||||
);
|
||||
|
@ -414,7 +414,7 @@ export const modelTable = dbSchema.table("models", {
|
||||
s3_url: text("s3_url"),
|
||||
user_url: text("client_url"),
|
||||
|
||||
is_public: boolean("is_public").notNull().default(false),
|
||||
is_public: boolean("is_public").notNull().default(true),
|
||||
status: resourceUpload("status").notNull().default("started"),
|
||||
upload_machine_id: text("upload_machine_id"), // TODO: review if actually needed
|
||||
upload_type: modelUploadType("upload_type").notNull(),
|
||||
|
@ -90,11 +90,10 @@ export async function addModelVolume() {
|
||||
.values({
|
||||
user_id: userId,
|
||||
org_id: orgId,
|
||||
volume_name: `checkpoints_${userId}`,
|
||||
// created_at and updated_at will be set to current timestamp by default
|
||||
disabled: false, // Default value
|
||||
volume_name: `models_${orgId ? orgId: userId}`, // if orgid is avalible use as part of the volume name
|
||||
disabled: false,
|
||||
})
|
||||
.returning(); // Returns the inserted row
|
||||
.returning();
|
||||
return insertedVolume;
|
||||
}
|
||||
|
||||
@ -121,7 +120,6 @@ export const addCivitaiModel = withServerPromise(
|
||||
const civitaiModelRes = await fetch(url)
|
||||
.then((x) => x.json())
|
||||
.then((a) => {
|
||||
console.log(a);
|
||||
return CivitaiModelResponse.parse(a);
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user