Spaces:
Runtime error
Runtime error
Update check_app.py
Browse files- check_app.py +3 -0
check_app.py
CHANGED
|
@@ -182,6 +182,7 @@ def create_pipeline_logic(prompt_text, model_name, negative_prompt="", seed=42,
|
|
| 182 |
pipe_class = config["pipeline_class"]
|
| 183 |
global pipe
|
| 184 |
if ["pipeline_class"] != pipe_class:
|
|
|
|
| 185 |
pipe["pipeline_class"] = pipe_class
|
| 186 |
b_pipe = AutoPipelineForText2Image.from_pretrained(
|
| 187 |
config["repo_id"],
|
|
@@ -197,6 +198,8 @@ def create_pipeline_logic(prompt_text, model_name, negative_prompt="", seed=42,
|
|
| 197 |
print("ProgressPipeline specal")
|
| 198 |
else:
|
| 199 |
pipe["pipeline"] = b_pipe
|
|
|
|
|
|
|
| 200 |
|
| 201 |
gen_seed,image, images = generate_image_with_progress(
|
| 202 |
model_name,pipe["pipeline"], prompt_text, num_steps=num_inference_steps, guidance_scale=guidance_scale, seed=seed,negative_prompt = negative_prompt, randomize_seed = randomize_seed, width = width, height = height, progress=progress
|
|
|
|
| 182 |
pipe_class = config["pipeline_class"]
|
| 183 |
global pipe
|
| 184 |
if ["pipeline_class"] != pipe_class:
|
| 185 |
+
print(f"NO PIPE. LOADING NEW {model_name}")
|
| 186 |
pipe["pipeline_class"] = pipe_class
|
| 187 |
b_pipe = AutoPipelineForText2Image.from_pretrained(
|
| 188 |
config["repo_id"],
|
|
|
|
| 198 |
print("ProgressPipeline specal")
|
| 199 |
else:
|
| 200 |
pipe["pipeline"] = b_pipe
|
| 201 |
+
else:
|
| 202 |
+
print(f"HAS PIPE. LOADING EXISTIN {model_name}")
|
| 203 |
|
| 204 |
gen_seed,image, images = generate_image_with_progress(
|
| 205 |
model_name,pipe["pipeline"], prompt_text, num_steps=num_inference_steps, guidance_scale=guidance_scale, seed=seed,negative_prompt = negative_prompt, randomize_seed = randomize_seed, width = width, height = height, progress=progress
|