aryanbaghel commited on
Commit
f438a0a
·
verified ·
1 Parent(s): dd5c280

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -10
README.md CHANGED
@@ -31,23 +31,24 @@ A LoRA fine-tuned [Stable Diffusion XL (SDXL)](https://huggingface.co/stabilitya
31
  ## 📦 How to Use
32
 
33
  ```python
34
- from diffusers import StableDiffusionXLPipeline
 
 
 
35
  import torch
36
 
37
  # Load base SDXL model
38
- pipeline = StableDiffusionXLPipeline.from_pretrained(
39
- "stabilityai/stable-diffusion-xl-base-1.0",
40
- torch_dtype=torch.float16,
41
- use_safetensors=True,
42
- ).to("cuda")
43
 
44
  # Load LoRA weights
45
- pipeline.load_lora_weights("aryanbaghel/ui-generator-prototype")
46
 
47
  # Enable LoRA
48
- pipeline.fuse_lora()
49
 
50
  # Generate a UI screen
51
  prompt = "A mobile UI showing a hotel reservation screen with elegant typography and clean layout"
52
- image = pipeline(prompt=prompt).images[0]
53
- image.save("output.png")
 
 
31
  ## 📦 How to Use
32
 
33
  ```python
34
+ pip install diffusers
35
+
36
+ ```python
37
+ from diffusers import DiffusionPipeline
38
  import torch
39
 
40
  # Load base SDXL model
41
+ pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, use_safetensors=True, variant="fp16")
42
+ pipe.to("cuda")
 
 
 
43
 
44
  # Load LoRA weights
45
+ pipe.load_lora_weights("aryanbaghel/ui-generator-prototype")
46
 
47
  # Enable LoRA
48
+ pipe.fuse_lora()
49
 
50
  # Generate a UI screen
51
  prompt = "A mobile UI showing a hotel reservation screen with elegant typography and clean layout"
52
+ image = pipe(prompt=prompt).images[0]
53
+ image.save("output.png")
54
+ print("SUCCESS!")