goodmodeler commited on
Commit
c269ab0
·
1 Parent(s): 09fb2db
Files changed (3) hide show
  1. README.md +2 -0
  2. image_download.py +1 -1
  3. inference.py +2 -2
README.md CHANGED
@@ -37,6 +37,8 @@ accelerate launch \
37
  --report_to="tensorboard" \
38
  --logging_dir="./nyc-ad-model/logs"
39
 
 
 
40
 
41
 
42
  export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
 
37
  --report_to="tensorboard" \
38
  --logging_dir="./nyc-ad-model/logs"
39
 
40
+ fine tune a trained model: --pretrained_model_name_or_path="./nyc-ad-model/checkpoint-400" \
41
+
42
 
43
 
44
  export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
image_download.py CHANGED
@@ -11,7 +11,7 @@ flickr = flickrapi.FlickrAPI(FLICKR_PUBLIC, FLICKR_SECRET, format='parsed-json')
11
 
12
  # Search for images with relevant tags
13
  results = flickr.photos.search(
14
- text='brooklyn advertisement',
15
  per_page=50,
16
  media='photos',
17
  sort='relevance',
 
11
 
12
  # Search for images with relevant tags
13
  results = flickr.photos.search(
14
+ text='advertisement',
15
  per_page=50,
16
  media='photos',
17
  sort='relevance',
inference.py CHANGED
@@ -7,8 +7,8 @@ pipe = StableDiffusionPipeline.from_pretrained(
7
  torch_dtype=torch.float16,
8
  ).to("cuda") # use "cpu" if no GPU
9
 
10
- prompt = "fried chicken advertisement poster: a fried chicken in brooklyn street"
11
- image = pipe(prompt, num_inference_steps=50, guidance_scale=7.5).images[0]
12
 
13
  # Display or save the image
14
  image.save("output_nyc_ad.png")
 
7
  torch_dtype=torch.float16,
8
  ).to("cuda") # use "cpu" if no GPU
9
 
10
+ prompt = "brand name: xyc, fried chicken advertisement poster: a fried chicken in brooklyn street"
11
+ image = pipe(prompt, num_inference_steps=500, guidance_scale=7.5).images[0]
12
 
13
  # Display or save the image
14
  image.save("output_nyc_ad.png")