sonar lint
This commit is contained in:
parent
4edb32aaac
commit
3b32cd4ac3
|
@ -216,24 +216,24 @@ def convert_model_source(conversion: ConversionContext, model):
|
||||||
|
|
||||||
|
|
||||||
def convert_model_network(conversion: ConversionContext, model):
|
def convert_model_network(conversion: ConversionContext, model):
|
||||||
format = source_format(model)
|
model_format = source_format(model)
|
||||||
|
model_type = model["type"]
|
||||||
name = model["name"]
|
name = model["name"]
|
||||||
network_type = model["type"]
|
|
||||||
source = model["source"]
|
source = model["source"]
|
||||||
|
|
||||||
if network_type == "control":
|
if model_type == "control":
|
||||||
dest = fetch_model(
|
dest = fetch_model(
|
||||||
conversion,
|
conversion,
|
||||||
name,
|
name,
|
||||||
source,
|
source,
|
||||||
format=format,
|
format=model_format,
|
||||||
)
|
)
|
||||||
|
|
||||||
convert_diffusion_control(
|
convert_diffusion_control(
|
||||||
conversion,
|
conversion,
|
||||||
model,
|
model,
|
||||||
dest,
|
dest,
|
||||||
path.join(conversion.model_path, network_type, name),
|
path.join(conversion.model_path, model_type, name),
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
model = model.get("model", None)
|
model = model.get("model", None)
|
||||||
|
@ -241,9 +241,9 @@ def convert_model_network(conversion: ConversionContext, model):
|
||||||
conversion,
|
conversion,
|
||||||
name,
|
name,
|
||||||
source,
|
source,
|
||||||
dest=path.join(conversion.model_path, network_type),
|
dest=path.join(conversion.model_path, model_type),
|
||||||
format=format,
|
format=model_format,
|
||||||
embeds=(network_type == "inversion" and model == "concept"),
|
embeds=(model_type == "inversion" and model == "concept"),
|
||||||
)
|
)
|
||||||
|
|
||||||
logger.info("finished downloading network: %s -> %s", source, dest)
|
logger.info("finished downloading network: %s -> %s", source, dest)
|
||||||
|
@ -256,8 +256,8 @@ def convert_model_diffusion(conversion: ConversionContext, model):
|
||||||
# update the model in-memory if the name changed
|
# update the model in-memory if the name changed
|
||||||
model["name"] = name
|
model["name"] = name
|
||||||
|
|
||||||
format = source_format(model)
|
model_format = source_format(model)
|
||||||
dest = fetch_model(conversion, name, model["source"], format=format)
|
dest = fetch_model(conversion, name, model["source"], format=model_format)
|
||||||
|
|
||||||
pipeline = model.get("pipeline", "txt2img")
|
pipeline = model.get("pipeline", "txt2img")
|
||||||
converter = model_converters.get(pipeline)
|
converter = model_converters.get(pipeline)
|
||||||
|
@ -265,7 +265,7 @@ def convert_model_diffusion(conversion: ConversionContext, model):
|
||||||
conversion,
|
conversion,
|
||||||
model,
|
model,
|
||||||
dest,
|
dest,
|
||||||
format,
|
model_format,
|
||||||
)
|
)
|
||||||
|
|
||||||
# make sure blending only happens once, not every run
|
# make sure blending only happens once, not every run
|
||||||
|
|
|
@ -13,6 +13,9 @@ class FileClient(BaseClient):
|
||||||
protocol = "file://"
|
protocol = "file://"
|
||||||
|
|
||||||
def __init__(self, _conversion: ConversionContext):
|
def __init__(self, _conversion: ConversionContext):
|
||||||
|
"""
|
||||||
|
Nothing to initialize for this client.
|
||||||
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def download(
|
def download(
|
||||||
|
|
Loading…
Reference in New Issue