JoPmt commited on
Commit
dc25496
1 Parent(s): d7fc85a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -21
app.py CHANGED
@@ -124,29 +124,11 @@ def plex(prompt,neg_prompt,modil,stips,scaly,nut,wei,hei,los,loca,gaul,progress=
124
  except:
125
  print("no card")
126
  try:
127
- pipe=accelerator.prepare(DiffusionPipeline.from_pretrained(""+modil+"",torch_dtype=torch.bfloat16, variant="fp16", use_safetensors=True, safety_checker=None))
128
  except:
129
  gc.collect()
130
- try:
131
- pipe=accelerator.prepare(DiffusionPipeline.from_pretrained(""+modil+"",torch_dtype=torch.float32, variant="fp32", use_safetensors=True, safety_checker=None))
132
- except:
133
- gc.collect()
134
- try:
135
- pipe=accelerator.prepare(DiffusionPipeline.from_pretrained(""+modil+"",torch_dtype=torch.bfloat16, variant="fp16", use_safetensors=False, safety_checker=None))
136
- except:
137
- gc.collect()
138
- try:
139
- pipe=accelerator.prepare(DiffusionPipeline.from_pretrained(""+modil+"",torch_dtype=torch.float32, variant="fp32", use_safetensors=False, safety_checker=None))
140
- except:
141
- gc.collect()
142
- try:
143
- pipe=accelerator.prepare(DiffusionPipeline.from_pretrained(""+modil+"",torch_dtype=torch.float, variant=None, use_safetensors=True, safety_checker=None))
144
- except:
145
- gc.collect()
146
- try:
147
- pipe=accelerator.prepare(DiffusionPipeline.from_pretrained(""+modil+"",torch_dtype=torch.float, variant=None, use_safetensors=False, safety_checker=None))
148
- except:
149
- print("no pipe")
150
  if los:
151
  try:
152
  lrda=ModelCard.load(""+los+"")
 
124
  except:
125
  print("no card")
126
  try:
127
+ pipe = accelerator.prepare(DiffusionPipeline.from_pretrained(""+modil+"",torch_dtype=torch.bfloat16,variant="fp16",use_safetensors=True,safety_checker=None)) or accelerator.prepare(DiffusionPipeline.from_pretrained(""+modil+"",torch_dtype=torch.float32,variant="fp32",use_safetensors=True,safety_checker=None)) or accelerator.prepare(DiffusionPipeline.from_pretrained(""+modil+"",torch_dtype=torch.bfloat16,variant="fp16",use_safetensors=False,safety_checker=None))
128
  except:
129
  gc.collect()
130
+ pipe = accelerator.prepare(DiffusionPipeline.from_pretrained(""+modil+"",torch_dtype=torch.float32,variant="fp32",use_safetensors=False,safety_checker=None)) or accelerator.prepare(DiffusionPipeline.from_pretrained(""+modil+"",torch_dtype=torch.float,variant=None,use_safetensors=True,safety_checker=None)) or accelerator.prepare(DiffusionPipeline.from_pretrained(""+modil+"",torch_dtype=torch.float,variant=None,use_safetensors=False,safety_checker=None))
131
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  if los:
133
  try:
134
  lrda=ModelCard.load(""+los+"")