Skip to content

Commit

Permalink
add file
Browse files Browse the repository at this point in the history
  • Loading branch information
ivy-lv11 committed Jun 12, 2024
1 parent aeb287f commit e60d439
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
5 changes: 4 additions & 1 deletion python/llm/example/CPU/StableDiffusion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@ python ./sdxl.py

Arguments info:
- `--repo-id-or-model-path REPO_ID_OR_MODEL_PATH`: argument defining the huggingface repo id for the stable diffusion xl model (e.g. `stabilityai/stable-diffusion-xl-base-1.0`) to be downloaded, or the path to the huggingface checkpoint folder. It is default to be `'stabilityai/stable-diffusion-xl-base-1.0'`.
- `--prompt PROMPT`: argument defining the prompt to be infered. It is default to be `'A lovely dog on the table, detailed, 8k'`.
- `--prompt PROMPT`: argument defining the prompt to be infered. It is default to be `'An astronaut in the forest, detailed, 8k'`.
- `--save-path`: argument defining the path to save the generated figure. It is default to be `sdxl-cpu.png`.
- `--num-steps`: argument defining the number of inference steps. It is default to be `20`.

The sample output image looks like below.
![image](https://llm-assets.readthedocs.io/en/latest/_images/sdxl-cpu.png)

#### 4.2 LCM-LoRA Example
The example shows how to performing inference with LCM-LoRA on Intel CPU.
```bash
Expand Down
2 changes: 1 addition & 1 deletion python/llm/example/CPU/StableDiffusion/sdxl.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def main(args):
parser = argparse.ArgumentParser(description="Stable Diffusion")
parser.add_argument('--repo-id-or-model-path', type=str, default="stabilityai/stable-diffusion-xl-base-1.0",
help='The huggingface repo id for the stable diffusion model checkpoint')
parser.add_argument('--prompt', type=str, default="A lovely dog on the table, detailed, 8k",
parser.add_argument('--prompt', type=str, default="An astronaut in the forest, detailed, 8k",
help='Prompt to infer')
parser.add_argument('--save-path',type=str,default="sdxl-cpu.png",
help="Path to save the generated figure")
Expand Down
6 changes: 5 additions & 1 deletion python/llm/example/GPU/StableDiffusion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,14 @@ python ./sdxl.py

Arguments info:
- `--repo-id-or-model-path REPO_ID_OR_MODEL_PATH`: argument defining the huggingface repo id for the stable diffusion xl model (e.g. `stabilityai/stable-diffusion-xl-base-1.0`) to be downloaded, or the path to the huggingface checkpoint folder. It is default to be `'stabilityai/stable-diffusion-xl-base-1.0'`.
- `--prompt PROMPT`: argument defining the prompt to be infered. It is default to be `'A lovely dog on the table, detailed, 8k'`.
- `--prompt PROMPT`: argument defining the prompt to be infered. It is default to be `'An astronaut in the forest, detailed, 8k'`.
- `--save-path`: argument defining the path to save the generated figure. It is default to be `sdxl-gpu.png`.
- `--num-steps`: argument defining the number of inference steps. It is default to be `20`.


The sample output image looks like below.
![image](https://llm-assets.readthedocs.io/en/latest/_images/sdxl-gpu.png)

#### 4.2 LCM-LoRA Example
The example shows how to performing inference with LCM-LoRA on Intel GPU.
```bash
Expand Down
2 changes: 1 addition & 1 deletion python/llm/example/GPU/StableDiffusion/sdxl.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def main(args):
parser = argparse.ArgumentParser(description="Stable Diffusion")
parser.add_argument('--repo-id-or-model-path', type=str, default="stabilityai/stable-diffusion-xl-base-1.0",
help='The huggingface repo id for the stable diffusion model checkpoint')
parser.add_argument('--prompt', type=str, default="A lovely dog on the table, detailed, 8k",
parser.add_argument('--prompt', type=str, default="An astronaut in the forest, detailed, 8k",
help='Prompt to infer')
parser.add_argument('--save-path',type=str,default="sdxl-gpu.png",
help="Path to save the generated figure")
Expand Down

0 comments on commit e60d439

Please sign in to comment.