Update app.py
Browse files
app.py
CHANGED
|
@@ -13,8 +13,10 @@ if torch.cuda.is_available():
|
|
| 13 |
else:
|
| 14 |
torch_dtype = torch.float32
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
|
|
|
|
|
|
| 18 |
|
| 19 |
MAX_SEED = np.iinfo(np.int32).max
|
| 20 |
MAX_IMAGE_SIZE = 1024
|
|
@@ -27,7 +29,7 @@ def infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance
|
|
| 27 |
|
| 28 |
generator = torch.Generator().manual_seed(seed)
|
| 29 |
|
| 30 |
-
image =
|
| 31 |
prompt = prompt,
|
| 32 |
negative_prompt = negative_prompt,
|
| 33 |
guidance_scale = guidance_scale,
|
|
|
|
| 13 |
else:
|
| 14 |
torch_dtype = torch.float32
|
| 15 |
|
| 16 |
+
from diffusers import DiffusionPipeline
|
| 17 |
+
|
| 18 |
+
pipeline = DiffusionPipeline.from_pretrained("John6666/mala-anime-mix-nsfw-pony-xl-v5-sdxl-spo")
|
| 19 |
+
pipeline.load_lora_weights(model_repo_id)
|
| 20 |
|
| 21 |
MAX_SEED = np.iinfo(np.int32).max
|
| 22 |
MAX_IMAGE_SIZE = 1024
|
|
|
|
| 29 |
|
| 30 |
generator = torch.Generator().manual_seed(seed)
|
| 31 |
|
| 32 |
+
image = pipeline(
|
| 33 |
prompt = prompt,
|
| 34 |
negative_prompt = negative_prompt,
|
| 35 |
guidance_scale = guidance_scale,
|