Skip to content

Commit

Permalink
fix stablediffusion_model.py
Browse files Browse the repository at this point in the history
fix stablediffusion_model.py
  • Loading branch information
cmgzn authored Sep 19, 2024
2 parents 6269fc7 + 190d580 commit 0387662
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/agentscope/models/stablediffusion_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import base64
import json
import time
from typing import Any, Optional, Union, List, Sequence
from typing import Any, Optional, Union, Sequence

import requests
from loguru import logger
Expand Down Expand Up @@ -231,7 +231,7 @@ def __call__(
# step3: parse the response
return self._parse_response(response)

def format(self, *args: Msg | Sequence[Msg]) -> List[dict] | str:
def format(self, *args: Union[Msg, Sequence[Msg]]) -> str:
# This is a temporary implementation to focus on the prompt
# on single-turn image generation by preserving only the system prompt
# and the last user message. This logic might change in the future
Expand Down

0 comments on commit 0387662

Please sign in to comment.