Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
songquanpeng committed Oct 8, 2022
1 parent a815af2 commit 03193e6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion models/StarGANv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def init(device='cpu'):

# Load parameters
weight_path = "starganv2_afhq.ckpt"
download_path = "https://github.com/justsong-lab/releases/releases/download/v0.1/starganv2_afhq.ckpt"
download_path = "https://github.com/songquanpeng/pytorch-deployment/releases/download/v0.1.0/starganv2_afhq.ckpt"
weight_dict = load_weights(weight_path, download_path, args.device)

# Apply parameters to models
Expand Down
Binary file added static/placeholder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions templates/starganv2_afhq.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<label class="label">Source Image</label>
<div class="control">
<figure class="image is-256x256" style="margin-bottom: 8px">
<img src="https://cdn.jsdelivr.net/gh/justsong-lab/images/misc/placeholder.png" alt="src" id="showSrcImage" width="256" height="256">
<img src="{{ url_for('static', filename='placeholder.png') }}" alt="src" id="showSrcImage" width="256" height="256">
</figure>
<input id="srcImage" name="src_image" type="file" accept="image/*" style="display: none">
<input type="submit" class="button is-light" value="Select source image"
Expand All @@ -75,7 +75,7 @@
<label class="label">Reference Image</label>
<div class="control">
<figure class="image is-256x256" style="margin-bottom: 8px">
<img src="https://cdn.jsdelivr.net/gh/justsong-lab/images/misc/placeholder.png" alt="ref" id="showRefImage" width="256" height="256">
<img src="{{ url_for('static', filename='placeholder.png') }}" alt="ref" id="showRefImage" width="256" height="256">
</figure>
<input id="refImage" name="ref_image" type="file" accept="image/*" style="display: none">
<input type="submit" class="button is-light" value="Select reference image"
Expand All @@ -88,7 +88,7 @@
<label class="label">Generated Image</label>
<div class="control">
<figure class="image is-256x256" style="margin-bottom: 8px">
<img src="https://cdn.jsdelivr.net/gh/justsong-lab/images/misc/placeholder.png" alt="fake" id="showResImage" width="256" height="256">
<img src="{{ url_for('static', filename='placeholder.png') }}" alt="fake" id="showResImage" width="256" height="256">
</figure>
<input type="submit" class="button is-light" value="Generate"
onclick="StarGANv2Generate()">
Expand Down
2 changes: 1 addition & 1 deletion utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ def load_cfg(cfg_path="config.json"):
return cfg


data_path = './data'
cache_path = 'cache'
data_path = './data'


def load_weights(file_name, download_url, device):
Expand Down

0 comments on commit 03193e6

Please sign in to comment.