rashidvyro commited on
Commit
20542a8
·
1 Parent(s): dee524f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +17 -5
README.md CHANGED
@@ -60,16 +60,28 @@ pip install diffusers transformers accelerate --upgrade
60
 
61
  - **Text-to-image**:
62
 
 
 
 
 
 
 
 
63
  ```py
64
- from diffusers import stable_diffusion_custom_v4_1
65
  import torch
66
 
67
- pipe = AutoPipelineForText2Image.from_pretrained("vyroAI/ImagineV4.1", torch_dtype=torch.float16, variant="fp16")
68
- pipe.to("cuda")
 
 
 
 
69
 
70
- prompt = "A cinematic shot of a baby panda wearing an italian priest robe."
 
71
 
72
- image = pipe(prompt=prompt, num_inference_steps=30).images[0]
73
  ```
74
 
75
  ### Out-of-Scope Use
 
60
 
61
  - **Text-to-image**:
62
 
63
+ To run the model yourself, you can leverage the 🧨 Diffusers library:
64
+ 1. Install the library:
65
+ ```
66
+ pip install --upgrade diffusers
67
+ ```
68
+
69
+ 2. Run the model:
70
  ```py
71
+ from TBA import CustomStableDiffusionPipeline4_1
72
  import torch
73
 
74
+ pipe = DiffusionPipeline.from_pretrained("vyroAI/ImagineV4.1")
75
+
76
+ # To save GPU memory, torch.float16 can be used, but it may compromise image quality.
77
+ pipe.to(torch_device="cuda", torch_dtype=torch.float16)
78
+
79
+ prompt = "Self-portrait oil painting, a beautiful cyborg with golden hair, 8k"
80
 
81
+ # Can be set to 1~50 steps.
82
+ num_inference_steps = 30
83
 
84
+ images = pipe(prompt=prompt, num_inference_steps=num_inference_steps).images
85
  ```
86
 
87
  ### Out-of-Scope Use