Blane187 commited on
Commit
e2146ba
·
verified ·
1 Parent(s): 6346053

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -13,8 +13,10 @@ if torch.cuda.is_available():
13
  else:
14
  torch_dtype = torch.float32
15
 
16
- pipe = DiffusionPipeline.from_pretrained(model_repo_id, torch_dtype=torch_dtype)
17
- pipe = pipe.to(device)
 
 
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 = pipe(
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,