nupurkmr9 commited on
Commit
9c83d9b
1 Parent(s): 6d2b1a5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -1
README.md CHANGED
@@ -18,12 +18,15 @@ Here we give an example model fine-tuned using 5 images of a cat downloaded from
18
  ```python
19
 
20
  from diffusers import StableDiffusionPipeline
 
21
 
22
  device = 'cuda'
23
- model_id = 'nupurkmr9/custom_diffusion_cat/cat'
24
  pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
25
  pipe = pipe.to(device)
26
 
 
 
27
  prompt = "<new1> cat swimming in a pool"
28
  images = pipe(prompt, num_inference_steps=200, guidance_scale=6., eta=1.).images
29
  ```
 
18
  ```python
19
 
20
  from diffusers import StableDiffusionPipeline
21
+ from src import diffuser_training
22
 
23
  device = 'cuda'
24
+ model_id = "CompVis/stable-diffusion-v1-4"
25
  pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
26
  pipe = pipe.to(device)
27
 
28
+ diffuser_training.load_model(pipe.text_encoder, pipe.tokenizer, pipe.unet, 'custom_diffusion_cat.bin')
29
+
30
  prompt = "<new1> cat swimming in a pool"
31
  images = pipe(prompt, num_inference_steps=200, guidance_scale=6., eta=1.).images
32
  ```