rashidvyro commited on
Commit
f0e4577
·
1 Parent(s): d8e2f70

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -13
README.md CHANGED
@@ -55,33 +55,28 @@ Advanced Version: Upgraded from the base version of Imagine AI Art Generator
55
  ### Diffusers
56
 
57
  ```
58
- pip install diffusers transformers accelerate --upgrade
59
  ```
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
 
55
  ### Diffusers
56
 
57
  ```
58
+ pip install -r requirements.txt --no-cache
59
  ```
60
 
61
  - **Text-to-image**:
62
 
63
+ 1. Run the model:
 
 
 
 
 
 
64
  ```py
65
+ from stable_diffusion_custom_v4_1 import CustomStableDiffusionPipeline4_1
66
  import torch
67
 
68
+ pipe = CustomStableDiffusionPipeline4_1.from_pretrained("vyroAI/ImagineV4.1")
69
+ DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
70
 
71
  # To save GPU memory, torch.float16 can be used, but it may compromise image quality.
72
+ pipe.to(torch_device=DEVICE, torch_dtype=torch.float32)
73
 
74
  prompt = "Self-portrait oil painting, a beautiful cyborg with golden hair, 8k"
75
 
76
  # Can be set to 1~50 steps.
77
+ num_inference_steps = 20
78
 
79
+ res = pipe.inferPipe(prompt=prompt, num_inference_steps=num_inference_steps).images
80
  ```
81
 
82
  ### Out-of-Scope Use