RageshAntony commited on
Commit
cc32d9c
·
verified ·
1 Parent(s): fbcf80b

AutoPipelineForText2Image for all

Browse files
Files changed (1) hide show
  1. check_app.py +6 -15
check_app.py CHANGED
@@ -97,21 +97,12 @@ def create_pipeline_logic(prompt_text, model_name):
97
  seed = 42
98
  config = MODEL_CONFIGS[model_name]
99
  pipe_class = config["pipeline_class"]
100
- pipe = None
101
- if model_name == "Kandinsky" or model_name == "AuraFlow":
102
- print("Kandinsky or AuraFlow Special")
103
- pipe = AutoPipelineForText2Image.from_pretrained(
104
- config["repo_id"],
105
- variant="fp16",
106
- #cache_dir=config["cache_dir"],
107
- torch_dtype=torch.bfloat16
108
- ).to("cuda")
109
- else:
110
- pipe = pipe_class.from_pretrained(
111
- config["repo_id"],
112
- #cache_dir=config["cache_dir"],
113
- torch_dtype=torch.bfloat16
114
- ).to("cuda")
115
 
116
  image = generate_image_with_progress(
117
  pipe, prompt_text, num_steps=num_steps, guidance_scale=guidance_scale, seed=seed, progress=progress
 
97
  seed = 42
98
  config = MODEL_CONFIGS[model_name]
99
  pipe_class = config["pipeline_class"]
100
+ pipe = AutoPipelineForText2Image.from_pretrained(
101
+ config["repo_id"],
102
+ variant="fp16",
103
+ #cache_dir=config["cache_dir"],
104
+ torch_dtype=torch.bfloat16
105
+ ).to("cuda")
 
 
 
 
 
 
 
 
 
106
 
107
  image = generate_image_with_progress(
108
  pipe, prompt_text, num_steps=num_steps, guidance_scale=guidance_scale, seed=seed, progress=progress