Spaces:
Running
on
Zero
Running
on
Zero
Upload app.py
Browse files
app.py
CHANGED
@@ -134,7 +134,7 @@ def load_pipeline(repo_id: str, cn_on: bool, model_type: str, task: str, dtype_s
|
|
134 |
if ".gguf" in file_url: transformer = transformer_model.from_single_file(file_url, subfolder="transformer",
|
135 |
quantization_config=GGUFQuantizationConfig(compute_dtype=dtype), torch_dtype=dtype, config=single_file_base_model)
|
136 |
else: transformer = transformer_model.from_single_file(file_url, subfolder="transformer", torch_dtype=dtype, config=single_file_base_model)
|
137 |
-
if not transformer:
|
138 |
pipe = pipeline.from_pretrained(single_file_base_model, transformer=transformer, torch_dtype=dtype, token=hf_token, **kwargs)
|
139 |
pipe_i2i = pipeline_i2i.from_pretrained(single_file_base_model, vae=pipe.vae, transformer=pipe.transformer,
|
140 |
text_encoder=pipe.text_encoder, tokenizer=pipe.tokenizer, text_encoder_2=pipe.text_encoder_2, tokenizer_2=pipe.tokenizer_2,
|
|
|
134 |
if ".gguf" in file_url: transformer = transformer_model.from_single_file(file_url, subfolder="transformer",
|
135 |
quantization_config=GGUFQuantizationConfig(compute_dtype=dtype), torch_dtype=dtype, config=single_file_base_model)
|
136 |
else: transformer = transformer_model.from_single_file(file_url, subfolder="transformer", torch_dtype=dtype, config=single_file_base_model)
|
137 |
+
if not transformer: transformer = transformer_model.from_pretrained(single_file_base_model, subfolder="transformer", torch_dtype=dtype, token=hf_token)
|
138 |
pipe = pipeline.from_pretrained(single_file_base_model, transformer=transformer, torch_dtype=dtype, token=hf_token, **kwargs)
|
139 |
pipe_i2i = pipeline_i2i.from_pretrained(single_file_base_model, vae=pipe.vae, transformer=pipe.transformer,
|
140 |
text_encoder=pipe.text_encoder, tokenizer=pipe.tokenizer, text_encoder_2=pipe.text_encoder_2, tokenizer_2=pipe.tokenizer_2,
|