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