Update app_demo.py
Browse files- app_demo.py +10 -4
app_demo.py
CHANGED
|
@@ -27,13 +27,19 @@ executor = ThreadPoolExecutor()
|
|
| 27 |
model_cache = {}
|
| 28 |
|
| 29 |
model_id = "Lykon/dreamshaper-xl-v2-turbo"
|
| 30 |
-
custom_pipe = DiffusionPipeline.from_pretrained(model_id, custom_pipeline="latent_consistency_txt2img", custom_revision="main")
|
| 31 |
pipe = DiffusionPipeline.from_pretrained("SimianLuo/LCM_Dreamshaper_v7", custom_pipeline="latent_consistency_txt2img", custom_revision="main")
|
| 32 |
pipe.to(torch_device="cpu", torch_dtype=DTYPE)
|
| 33 |
pipe.safety_checker = None
|
| 34 |
-
pipe = StableDiffusionPipeline.from_pretrained(
|
| 35 |
-
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
def randomize_seed_fn(seed: int, randomize_seed: bool) -> int:
|
| 39 |
return random.randint(0, MAX_SEED) if randomize_seed else seed
|
|
|
|
| 27 |
model_cache = {}
|
| 28 |
|
| 29 |
model_id = "Lykon/dreamshaper-xl-v2-turbo"
|
| 30 |
+
#custom_pipe = DiffusionPipeline.from_pretrained(model_id, custom_pipeline="latent_consistency_txt2img", custom_revision="main")
|
| 31 |
pipe = DiffusionPipeline.from_pretrained("SimianLuo/LCM_Dreamshaper_v7", custom_pipeline="latent_consistency_txt2img", custom_revision="main")
|
| 32 |
pipe.to(torch_device="cpu", torch_dtype=DTYPE)
|
| 33 |
pipe.safety_checker = None
|
| 34 |
+
#pipe = StableDiffusionPipeline.from_pretrained( model_id, safety_checker=None, torch_dtype=DTYPE, use_safetensors=True).to("cpu")
|
| 35 |
+
|
| 36 |
+
custom_pipe = DiffusionPipeline.from_pretrained(
|
| 37 |
+
model_id,
|
| 38 |
+
custom_pipeline="latent_consistency_txt2img",
|
| 39 |
+
custom_revision="main",
|
| 40 |
+
safety_checker=None,
|
| 41 |
+
feature_extractor=None
|
| 42 |
+
)
|
| 43 |
|
| 44 |
def randomize_seed_fn(seed: int, randomize_seed: bool) -> int:
|
| 45 |
return random.randint(0, MAX_SEED) if randomize_seed else seed
|