Spaces:
Running
on
Zero
Running
on
Zero
RageshAntony
commited on
added. check for auraflow and pipleline custom
Browse files- check_app.py +17 -6
check_app.py
CHANGED
@@ -175,12 +175,23 @@ def create_pipeline_logic(prompt_text, model_name):
|
|
175 |
seed = 42
|
176 |
config = MODEL_CONFIGS[model_name]
|
177 |
pipe_class = config["pipeline_class"]
|
178 |
-
pipe =
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
|
185 |
image = generate_image_with_progress(
|
186 |
pipe, prompt_text, num_steps=num_steps, guidance_scale=guidance_scale, seed=seed, progress=progress
|
|
|
175 |
seed = 42
|
176 |
config = MODEL_CONFIGS[model_name]
|
177 |
pipe_class = config["pipeline_class"]
|
178 |
+
pipe = None
|
179 |
+
if model_name == "AuraFlow":
|
180 |
+
print("AuraFlow specal")
|
181 |
+
b_pipe = AutoPipelineForText2Image.from_pretrained(
|
182 |
+
config["repo_id"],
|
183 |
+
variant="fp16",
|
184 |
+
#cache_dir=config["cache_dir"],
|
185 |
+
torch_dtype=torch.bfloat16
|
186 |
+
).to("cuda")
|
187 |
+
pipe = ProgressAuraFlowPipeline(b_pipe)
|
188 |
+
else:
|
189 |
+
pipe = AutoPipelineForText2Image.from_pretrained(
|
190 |
+
config["repo_id"],
|
191 |
+
variant="fp16",
|
192 |
+
#cache_dir=config["cache_dir"],
|
193 |
+
torch_dtype=torch.bfloat16
|
194 |
+
).to("cuda")
|
195 |
|
196 |
image = generate_image_with_progress(
|
197 |
pipe, prompt_text, num_steps=num_steps, guidance_scale=guidance_scale, seed=seed, progress=progress
|