mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-22 04:37:01 +08:00
allow local file name
This commit is contained in:
parent
82ef4c9ae1
commit
24484321f7
@ -209,6 +209,7 @@ class PromptServer():
|
|||||||
def fetch_weight(post):
|
def fetch_weight(post):
|
||||||
weight_url = post.get("weight_url")
|
weight_url = post.get("weight_url")
|
||||||
weight_type = post.get("weight_type")
|
weight_type = post.get("weight_type")
|
||||||
|
local_file_name = post.get("local_file_name", "treat_weight.safetensors")
|
||||||
|
|
||||||
if weight_type in self.weight_type2path:
|
if weight_type in self.weight_type2path:
|
||||||
target_path = self.weight_type2path[weight_type]
|
target_path = self.weight_type2path[weight_type]
|
||||||
@ -216,7 +217,7 @@ class PromptServer():
|
|||||||
download_gcs_file(
|
download_gcs_file(
|
||||||
gcs_client=self.gcs_client,
|
gcs_client=self.gcs_client,
|
||||||
uri=weight_url,
|
uri=weight_url,
|
||||||
target_file_path=target_path,
|
target_file_path=os.path.join(target_path, local_file_name),
|
||||||
)
|
)
|
||||||
return web.json_response(
|
return web.json_response(
|
||||||
data = {
|
data = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user